1234567891011121314151617181920212223 |
- import { _decorator, Component, EditBox, Node } from 'cc';
- const { ccclass, property } = _decorator;
- @ccclass('attributes_remark')
- export class attributes_remark extends Component {
- @property(Node) editBox:Node = null;
- private m_callback: Function = null;
- initView(callback:Function) {
- this.m_callback = callback
- }
- public update_att(remark:string){
- if(remark==undefined||remark==null){ remark = ''}
- this.editBox.getComponent(EditBox).string = remark
- }
- public editBoxEditingDidEnded(editBox: EditBox) {
- if(this.m_callback != null) {
- this.m_callback(editBox.string)
- }
- }
- }
|