Files
MiniProgram/ProjectLiaisonForm/pages/dialog/status/index.js

27 lines
655 B
JavaScript
Raw Normal View History

2025-08-15 14:05:08 +08:00
Component({
data: {
confirmBtn: { content: '确定', variant: 'base' },
dialogKey: '',
showConfirm: false,
showWarnConfirm: false,
showTooLongBtnContent: false,
showMultiBtn: false,
multiBtnList: [
{ content: '次要按钮', theme: 'light' },
{ content: '次要按钮', theme: 'light' },
{ content: '主要按钮', theme: 'primary' },
],
},
methods: {
showDialog(e) {
const { key } = e.currentTarget.dataset;
this.setData({ [key]: true, dialogKey: key });
},
closeDialog() {
const { dialogKey } = this.data;
this.setData({ [dialogKey]: false });
},
},
});