40 lines
746 B
TypeScript
40 lines
746 B
TypeScript
// e:\project\dy_video_all\初晴剧场\components\myModal\myModal.ts
|
|
Component({
|
|
data: {
|
|
maskFlag: false
|
|
},
|
|
properties: {
|
|
cancelText: {
|
|
type: String,
|
|
value: '取消'
|
|
},
|
|
confirmText: {
|
|
type: String,
|
|
value: '确定'
|
|
},
|
|
contentText: {
|
|
type: String,
|
|
value: ''
|
|
},
|
|
},
|
|
methods: {
|
|
show() {
|
|
this.setData({
|
|
maskFlag: true
|
|
})
|
|
},
|
|
hide() {
|
|
this.setData({
|
|
maskFlag: false
|
|
})
|
|
},
|
|
handelCancel() {
|
|
this.triggerEvent('handelCancel', { cancel: true, confirm: false });
|
|
this.hide();
|
|
},
|
|
handelConfirm() {
|
|
this.triggerEvent('handelConfirm', { cancel: false, confirm: true });
|
|
this.hide();
|
|
}
|
|
}
|
|
}) |