19 lines
370 B
JavaScript
19 lines
370 B
JavaScript
Component({
|
|
data: {
|
|
dialogKey: '',
|
|
showWithInput: false,
|
|
showTextAndTitleWithInput: false,
|
|
},
|
|
methods: {
|
|
showDialog(e) {
|
|
const { key } = e.currentTarget.dataset;
|
|
this.setData({ [key]: true, dialogKey: key });
|
|
},
|
|
|
|
closeDialog() {
|
|
const { dialogKey } = this.data;
|
|
this.setData({ [dialogKey]: false });
|
|
},
|
|
},
|
|
});
|