mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
add update PlaceholderText for EditBoxImpl (#2843)
This commit is contained in:
@@ -198,6 +198,7 @@ let EditBox = cc.Class({
|
||||
default: 'Enter text here...',
|
||||
notify () {
|
||||
this._placeholderLabel.string = this.placeholder;
|
||||
this._impl.setPlaceholderText(this.placeholder);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -339,6 +340,7 @@ let EditBox = cc.Class({
|
||||
impl.setTabIndex(this.tabIndex);
|
||||
impl.setFontColor(this.fontColor);
|
||||
impl.setFontSize(this.fontSize);
|
||||
impl.setPlaceholderText(this.placeholder);
|
||||
|
||||
impl.setDelegate(this);
|
||||
|
||||
|
||||
@@ -146,6 +146,14 @@ let EditBoxImpl = cc.Class({
|
||||
return this._text;
|
||||
},
|
||||
|
||||
setPlaceholderText (text) {
|
||||
this._placeholderText = text;
|
||||
},
|
||||
|
||||
getPlaceholderText () {
|
||||
return this._placeholderText;
|
||||
},
|
||||
|
||||
setDelegate (delegate) {
|
||||
this._delegate = delegate;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user