// components/menu/menu.js Component({ /** * ����������б� */ properties: { mainmodel: { type: Object, value: {} }, menulist: { type: Object, value: [] } }, //使用全局样式 options: { addGlobalClass: true, }, /** * ����ij�ʼ���� */ data: { showmenus:true, }, /** * ����ķ����б� */ methods: { showclick:function(){ let isshow = !this.data.showmenus; this.setData({ showmenus: isshow, }) }, itemclick:function(e){ this.showclick(); let info = e.currentTarget.dataset.item; if (info){ this.triggerEvent('menuItemClick', { "iteminfo":info }) } } } })