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