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