1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- // 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
- })
- }
- }
-
- }
- })
|