// component/popup/popup.js Component({ /** * 组件的属性列表 */ properties: { typeOf: { type: "String", value: '' }, title: { type: "String", value: '' }, headTextOne: { type: "String", value: '' }, headTextTwo: { type: "String", value: '' }, content: { type: "Array", value: '' }, btnContent: { type: "String", value: '' } }, /** * 组件的初始数据 */ data: { flag: true }, /** * 组件的方法列表 */ methods: { close: function () { this.setData({ flag: !this.data.flag }) this.triggerEvent('Close', {}) }, launchGroup: function () { this.triggerEvent('Group', {}) } } })