|
@@ -35,6 +35,9 @@ export class CommonTips extends BaseView {
|
|
|
this.cancelBtnTx.string = StringUtil.getLanguageData('取消');
|
|
|
this.confirmBtnTx.string = StringUtil.getLanguageData('确定');
|
|
|
this.closeBtnTx.string = StringUtil.getLanguageData('关闭');
|
|
|
+ this.closeBtn.active = false;
|
|
|
+ this.cancelBtn.active = false;
|
|
|
+ this.confirmBtn.active = false;
|
|
|
}
|
|
|
|
|
|
protected onDestroy() {
|
|
@@ -42,17 +45,14 @@ export class CommonTips extends BaseView {
|
|
|
}
|
|
|
|
|
|
//UI开打时会调用,如果有初始化代码应该放到此函数
|
|
|
- onOpen(openType: TipsOpereteEnum, content: string, callback?:void) {
|
|
|
- this._callback = callback;
|
|
|
- this.contentTx.string = content;
|
|
|
- if (openType==TipsOpereteEnum.yes) {
|
|
|
- this.cancelBtn.active = false;
|
|
|
- this.confirmBtn.active = false;
|
|
|
+ onOpen(args) {
|
|
|
+ this._callback = args.callback;
|
|
|
+ this.contentTx.string = args.content;
|
|
|
+ if (args.openType==TipsOpereteEnum.yes) {
|
|
|
this.closeBtn.active = true;
|
|
|
- } else if (openType==TipsOpereteEnum.yes_no) {
|
|
|
+ } else if (args.openType==TipsOpereteEnum.yes_no) {
|
|
|
this.cancelBtn.active = true;
|
|
|
this.confirmBtn.active = true;
|
|
|
- this.closeBtn.active = false;
|
|
|
}
|
|
|
}
|
|
|
|