// component/commondialog/commondialog.js Component({ // mixins: [require('../../mixin/themeChanged')], options: { addGlobalClass: true }, /** * 组件的属性列表 */ properties: { show: { type: Boolean, value: false }, title: { type: String, value: "" }, content: { type: String, value: "" }, yes: { type: String, value: "" }, no: { type: String, value: "取消" }, showBtn: { type: Boolean, value: true } }, /** * 组件的初始数据 */ data: { }, /** * 组件的方法列表 */ methods: { _onClose: function (e) { this.setData({ show: false }) this.triggerEvent('close') }, _onConfirm: function (e) { this.triggerEvent('confirm') } } })