@cloudbase/weda-ui 0.2.16 → 1.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -169
- package/package.json +23 -11
- package/src/configs/components/calendar.json +4 -1
- package/src/configs/components/chart/bar.json +724 -0
- package/src/configs/components/chart/line.json +679 -0
- package/src/configs/components/chart/pie.json +497 -0
- package/src/configs/components/chart/statisticsCard.json +61 -13
- package/src/configs/components/container.json +7 -2
- package/src/configs/components/dataView.json +21 -6
- package/src/configs/components/form/checkbox.json +97 -5
- package/src/configs/components/form/radio.json +96 -4
- package/src/configs/components/form/select.json +245 -11
- package/src/configs/components/graphicCard.json +84 -73
- package/src/configs/components/image.json +7 -2
- package/src/configs/components/link.json +19 -3
- package/src/configs/components/listView.json +65 -18
- package/src/configs/components/lottery.json +151 -0
- package/src/configs/components/modal.json +37 -5
- package/src/configs/components/navLayout.json +87 -75
- package/src/configs/components/navigationBar.json +59 -0
- package/src/configs/components/richtextview.json +4 -1
- package/src/configs/components/scrollVeiw.json +74 -22
- package/src/configs/components/swiper.json +4 -1
- package/src/configs/components/tabs.json +51 -8
- package/src/configs/components/text.json +33 -25
- package/src/configs/components/wxOpenApi/phone.json +141 -0
- package/src/configs/components/wxOpenApi/phoneCode.json +121 -0
- package/src/configs/components/wxOpenApi/share.json +167 -0
- package/src/configs/components/wxOpenApi/userInfo.json +174 -0
- package/src/configs/index.js +20 -0
- package/src/index.js +2 -0
- package/src/mp/components/button/index.wxml +1 -2
- package/src/mp/components/chart/bar/index.js +258 -0
- package/src/mp/components/chart/bar/index.json +6 -0
- package/src/mp/components/chart/bar/index.wxml +3 -0
- package/src/mp/components/chart/bar/index.wxss +9 -0
- package/src/mp/components/chart/common/config/bar.js +50 -0
- package/src/mp/components/chart/common/config/global.js +16 -0
- package/src/mp/components/chart/common/config/line.js +48 -0
- package/src/mp/components/chart/common/config/pie.js +36 -0
- package/src/mp/components/chart/common/core/eChartBar.js +263 -0
- package/src/mp/components/chart/common/core/eChartBase.js +375 -0
- package/src/mp/components/chart/common/core/eChartLine.js +229 -0
- package/src/mp/components/chart/common/core/eChartPie.js +166 -0
- package/src/mp/components/chart/common/lib/echarts.min.js +18 -0
- package/src/mp/components/chart/ec-canvas/ec-canvas.js +277 -0
- package/src/mp/components/chart/ec-canvas/ec-canvas.json +4 -0
- package/src/mp/components/chart/ec-canvas/ec-canvas.wxml +4 -0
- package/src/mp/components/chart/ec-canvas/ec-canvas.wxss +4 -0
- package/src/mp/components/chart/ec-canvas/wx-canvas.js +107 -0
- package/src/mp/components/chart/line/index.js +247 -0
- package/src/mp/components/chart/line/index.json +6 -0
- package/src/mp/components/chart/line/index.wxml +3 -0
- package/src/mp/components/chart/line/index.wxss +9 -0
- package/src/mp/components/chart/pie/index.js +182 -0
- package/src/mp/components/chart/pie/index.json +6 -0
- package/src/mp/components/chart/pie/index.wxml +4 -0
- package/src/mp/components/chart/pie/index.wxss +9 -0
- package/src/mp/components/chart/statisticsCard/index.js +33 -6
- package/src/mp/components/form/checkbox/index.js +41 -2
- package/src/mp/components/form/checkbox/index.wxml +1 -1
- package/src/mp/components/form/form/index.wxml +1 -2
- package/src/mp/components/form/input/index.js +1 -1
- package/src/mp/components/form/location/index.js +43 -2
- package/src/mp/components/form/radio/index.js +38 -0
- package/src/mp/components/form/select/index.js +348 -40
- package/src/mp/components/form/select/index.wxml +21 -6
- package/src/mp/components/form/select/region/index.js +101 -0
- package/src/mp/components/form/textarea/index.wxml +6 -5
- package/src/mp/components/form/uploader/index.js +76 -44
- package/src/mp/components/form/uploader/index.wxml +15 -3
- package/src/mp/components/form/uploaderFile/index.js +61 -29
- package/src/mp/components/graphicCard/index.js +26 -28
- package/src/mp/components/listView/index.js +52 -64
- package/src/mp/components/listView/index.wxml +2 -2
- package/src/mp/components/listView/index.wxss +5 -0
- package/src/mp/components/lottery/index.js +270 -0
- package/src/mp/components/lottery/index.json +4 -0
- package/src/mp/components/lottery/index.wxml +43 -0
- package/src/mp/components/lottery/index.wxss +317 -0
- package/src/mp/components/navLayout/index.js +3 -3
- package/src/mp/components/navigationBar/index.js +193 -0
- package/src/mp/components/navigationBar/index.json +6 -0
- package/src/mp/components/navigationBar/index.wxml +88 -0
- package/src/mp/components/navigationBar/index.wxss +1257 -0
- package/src/mp/components/tabs/index.js +7 -2
- package/src/mp/components/tabs/index.wxml +2 -1
- package/src/mp/components/text/index.js +0 -25
- package/src/mp/components/text/index.wxml +3 -3
- package/src/mp/components/wxOpenApi/phone/index.js +117 -0
- package/src/mp/components/wxOpenApi/phone/index.json +4 -0
- package/src/mp/components/wxOpenApi/phone/index.wxml +15 -0
- package/src/mp/components/wxOpenApi/phone/index.wxss +22 -0
- package/src/mp/components/wxOpenApi/phoneCode/index.js +89 -0
- package/src/mp/components/wxOpenApi/phoneCode/index.json +4 -0
- package/src/mp/components/wxOpenApi/phoneCode/index.wxml +15 -0
- package/src/mp/components/wxOpenApi/phoneCode/index.wxss +22 -0
- package/src/mp/components/wxOpenApi/share/index.js +117 -0
- package/src/mp/components/wxOpenApi/share/index.json +4 -0
- package/src/mp/components/wxOpenApi/share/index.wxml +15 -0
- package/src/mp/components/wxOpenApi/share/index.wxss +22 -0
- package/src/mp/components/wxOpenApi/userInfo/index.js +88 -0
- package/src/mp/components/wxOpenApi/userInfo/index.json +4 -0
- package/src/mp/components/wxOpenApi/userInfo/index.wxml +14 -0
- package/src/mp/components/wxOpenApi/userInfo/index.wxss +22 -0
- package/src/mp/index.json +10 -1
- package/src/mp/style/weda-ui.wxss +2 -0
- package/src/mp/utils/constant.js +15 -0
- package/src/mp/utils/destr.js +48 -0
- package/src/mp/utils/lodash.js +2 -0
- package/src/mp/utils/platform.js +25 -0
- package/src/mp/utils/tcb.js +44 -0
- package/src/setupTests.js +2 -1
- package/src/web/components/button/index.css +8 -1
- package/src/web/components/button/index.tsx +3 -2
- package/src/web/components/chart/bar/index.tsx +140 -0
- package/src/web/components/chart/common/config/bar.js +49 -0
- package/src/web/components/chart/common/config/global.js +16 -0
- package/src/web/components/chart/common/config/line.js +50 -0
- package/src/web/components/chart/common/config/pie.js +37 -0
- package/src/web/components/chart/common/core/eChartBar.js +265 -0
- package/src/web/components/chart/common/core/eChartBase.ts +383 -0
- package/src/web/components/chart/common/core/eChartLine.js +231 -0
- package/src/web/components/chart/common/core/eChartPie.js +170 -0
- package/src/web/components/chart/common/core/type.ts +34 -0
- package/src/web/components/chart/common/echart.css +106 -0
- package/src/web/components/chart/common/echarts.ts +33 -0
- package/src/web/components/chart/common/useChart.tsx +69 -0
- package/src/web/components/chart/line/index.tsx +136 -0
- package/src/web/components/chart/pie/index.tsx +99 -0
- package/src/web/components/chart/statisticsCard/index.tsx +29 -8
- package/src/web/components/form/checkbox/index.tsx +61 -23
- package/src/web/components/form/formcell/index.tsx +10 -5
- package/src/web/components/form/location/components/LocationH5/location.h5.jsx +3 -3
- package/src/web/components/form/location/components/LocationPC/location.PC.jsx +2 -2
- package/src/web/components/form/radio/index.tsx +90 -53
- package/src/web/components/form/select/h5.tsx +371 -72
- package/src/web/components/form/select/index.css +10 -0
- package/src/web/components/form/select/index.tsx +392 -145
- package/src/web/components/form/select/region/index.ts +122 -31
- package/src/web/components/form/select/time.jsx +90 -0
- package/src/web/components/form/select/year.tsx +170 -0
- package/src/web/components/form/tips/index.css +4 -0
- package/src/web/components/form/tips/index.tsx +4 -3
- package/src/web/components/form/uploader/uploader.h5.tsx +28 -19
- package/src/web/components/form/uploader/uploader.pc.tsx +17 -20
- package/src/web/components/form/uploaderFile/uploadFile.h5.tsx +48 -44
- package/src/web/components/form/uploaderFile/uploadFile.pc.tsx +28 -26
- package/src/web/components/graphicCard/index.css +1 -5
- package/src/web/components/graphicCard/index.tsx +4 -3
- package/src/web/components/image/image.tsx +1 -1
- package/src/web/components/image/index.tsx +1 -1
- package/src/web/components/index.js +13 -2
- package/src/web/components/link/index.tsx +6 -3
- package/src/web/components/listView/index.css +4 -0
- package/src/web/components/listView/index.tsx +10 -18
- package/src/web/components/lottery/index.css +327 -0
- package/src/web/components/lottery/index.tsx +567 -0
- package/src/web/components/lottery/lotteryUtil.ts +130 -0
- package/src/web/components/modal/index.tsx +3 -1
- package/src/web/components/navigationBar/chevron-right--double.svg +3 -0
- package/src/web/components/navigationBar/common.tsx +198 -0
- package/src/web/components/navigationBar/h5Menu.tsx +179 -0
- package/src/web/components/navigationBar/horizontalMenu.tsx +200 -0
- package/src/web/components/navigationBar/index.css +762 -0
- package/src/web/components/navigationBar/index.tsx +231 -0
- package/src/web/components/navigationBar/type.d.ts +111 -0
- package/src/web/components/navigationBar/verticalMenu.tsx +81 -0
- package/src/web/components/phone/index.css +0 -0
- package/src/web/components/phone/index.tsx +22 -0
- package/src/web/components/phoneCode/index.css +0 -0
- package/src/web/components/phoneCode/index.tsx +22 -0
- package/src/web/components/richTextView/index.tsx +3 -5
- package/src/web/components/share/index.css +0 -0
- package/src/web/components/share/index.tsx +38 -0
- package/src/web/components/tabs/index.tsx +2 -0
- package/src/web/components/tabs/tabs.h5.tsx +43 -33
- package/src/web/components/tabs/tabs.pc.tsx +23 -10
- package/src/web/components/text/index.tsx +6 -14
- package/src/web/components/userInfo/index.css +0 -0
- package/src/web/components/userInfo/index.tsx +30 -0
- package/src/web/utils/{constant.js → constant.ts} +17 -2
- package/src/web/utils/lodash.ts +2 -0
- package/src/web/utils/platform.js +10 -1
- package/src/web/utils/tcb.js +20 -6
- package/src/web/weda-ui.css +2 -0
- package/CHANGELOG.md +0 -240
- package/src/.DS_Store +0 -0
- package/src/configs/.DS_Store +0 -0
- package/src/mp/.gitignore +0 -10
- package/src/web/.DS_Store +0 -0
- package/src/web/components/form/select/region/cities.ts +0 -2410
- package/src/web/components/form/select/region/provinces.ts +0 -240
- package/src/web/components/form/select/region/regions.ts +0 -20645
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import destr from '../../utils/destr';
|
|
2
|
+
import { isUrl } from '../../utils/platform';
|
|
3
|
+
import { getAppCustomNav } from '../../utils/tcb';
|
|
4
|
+
|
|
5
|
+
Component({
|
|
6
|
+
properties: {
|
|
7
|
+
className: {
|
|
8
|
+
type: String,
|
|
9
|
+
value: '',
|
|
10
|
+
},
|
|
11
|
+
style: {
|
|
12
|
+
type: String,
|
|
13
|
+
value: '',
|
|
14
|
+
},
|
|
15
|
+
navigationbar: { type: Object, value: {} },
|
|
16
|
+
},
|
|
17
|
+
data: {
|
|
18
|
+
defaultLogoUrl:
|
|
19
|
+
'https://imgcache.qq.com/qcloud/tcloud_dtc/static/static_source_business/43d3b2b7-445c-4858-8eb0-50ac5d5cc08e.svg',
|
|
20
|
+
visible: false,
|
|
21
|
+
selectedKey: 'index',
|
|
22
|
+
menuData: [],
|
|
23
|
+
navigationStyle: {
|
|
24
|
+
isHorizontal: false,
|
|
25
|
+
showMenuIcon: true,
|
|
26
|
+
fixedTop: true,
|
|
27
|
+
menuFontSize: 14,
|
|
28
|
+
menuBackgroundColor: '#fff',
|
|
29
|
+
menuColor: '#000',
|
|
30
|
+
menuHoverColor: '#f3f3f3',
|
|
31
|
+
showTitle: true,
|
|
32
|
+
title: '标题',
|
|
33
|
+
showLogo: true,
|
|
34
|
+
logoUrl:
|
|
35
|
+
'https://imgcache.qq.com/qcloud/tcloud_dtc/static/static_source_business/43d3b2b7-445c-4858-8eb0-50ac5d5cc08e.svg ',
|
|
36
|
+
titleFontSize: '18',
|
|
37
|
+
titleColor: '#000',
|
|
38
|
+
logoWidth: '32',
|
|
39
|
+
logoHeight: '32',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
observers: {
|
|
43
|
+
navigationbar: function (navigationbar) {
|
|
44
|
+
this.getMenusByapi(navigationbar);
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
methods: {
|
|
48
|
+
getMenusByapi(navigationbar) {
|
|
49
|
+
getAppCustomNav()
|
|
50
|
+
.then((res) => {
|
|
51
|
+
const { Content } = res;
|
|
52
|
+
const navigationData = destr(Content);
|
|
53
|
+
if (navigationData?.navigationStyle) {
|
|
54
|
+
const {
|
|
55
|
+
menuData,
|
|
56
|
+
navigationStyle,
|
|
57
|
+
isMultiTerminal,
|
|
58
|
+
mobileMenuData,
|
|
59
|
+
} = navigationData;
|
|
60
|
+
let menus = isMultiTerminal ? mobileMenuData : menuData;
|
|
61
|
+
let selectedKey = this.defaultSelectedMenu(menus);
|
|
62
|
+
this.setData({
|
|
63
|
+
menuData: this.generateMenuData(
|
|
64
|
+
menus,
|
|
65
|
+
{ key: selectedKey },
|
|
66
|
+
true
|
|
67
|
+
),
|
|
68
|
+
navigationStyle,
|
|
69
|
+
selectedKey,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
})
|
|
73
|
+
.catch((error) => {
|
|
74
|
+
console.log(error);
|
|
75
|
+
const { menuData, navigationStyle } = navigationbar;
|
|
76
|
+
let selectedKey = this.defaultSelectedMenu(menuData);
|
|
77
|
+
|
|
78
|
+
this.setData({
|
|
79
|
+
menuData: this.generateMenuData(
|
|
80
|
+
menuData,
|
|
81
|
+
{ key: selectedKey },
|
|
82
|
+
true
|
|
83
|
+
),
|
|
84
|
+
navigationStyle,
|
|
85
|
+
selectedKey,
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
},
|
|
89
|
+
generateMenuData(menuData, menuItem, init = false) {
|
|
90
|
+
let menus = JSON.parse(JSON.stringify(menuData));
|
|
91
|
+
return menus?.map((i) => {
|
|
92
|
+
let { iconUrl = 'td:view-module', children } = i;
|
|
93
|
+
let iconType = 'image';
|
|
94
|
+
let ticon = '';
|
|
95
|
+
if (!isUrl(iconUrl)) {
|
|
96
|
+
iconType = 'icon';
|
|
97
|
+
if (iconUrl.includes('td:')) {
|
|
98
|
+
iconType = 't-icon';
|
|
99
|
+
ticon = iconUrl?.replace('td:', '');
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
if (init) {
|
|
103
|
+
i.expand = this.hasSelectedMenu(i, menuItem.key);
|
|
104
|
+
} else if (i.key === menuItem.key) {
|
|
105
|
+
i.expand = menuItem.expand;
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
...i,
|
|
109
|
+
iconType,
|
|
110
|
+
iconUrl,
|
|
111
|
+
ticon,
|
|
112
|
+
children: this.generateMenuData(children || [], menuItem, init),
|
|
113
|
+
};
|
|
114
|
+
});
|
|
115
|
+
},
|
|
116
|
+
showMenu() {
|
|
117
|
+
this.setData({ visible: !this.data.visible });
|
|
118
|
+
},
|
|
119
|
+
menuClick(itemInfo) {
|
|
120
|
+
const menu = itemInfo?.currentTarget?.dataset?.menu;
|
|
121
|
+
const { path, type, key, children, expand } = menu;
|
|
122
|
+
if (children.length) {
|
|
123
|
+
this.setData({
|
|
124
|
+
menuData: this.generateMenuData(this.data.menuData, {
|
|
125
|
+
...menu,
|
|
126
|
+
expand: !expand,
|
|
127
|
+
}),
|
|
128
|
+
});
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
if (type === 'route') {
|
|
132
|
+
let { app } = getApp();
|
|
133
|
+
app.navigateTo({
|
|
134
|
+
pageId: path?.replace('/', ''),
|
|
135
|
+
packageName: '',
|
|
136
|
+
mode: 'weDa',
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
hasSelectedMenu(menu, selectedkey) {
|
|
141
|
+
let opened = false;
|
|
142
|
+
if (menu.key === selectedkey) {
|
|
143
|
+
return true;
|
|
144
|
+
}
|
|
145
|
+
menu?.children?.forEach((i) => {
|
|
146
|
+
if (i.key === selectedkey) {
|
|
147
|
+
opened = true;
|
|
148
|
+
}
|
|
149
|
+
if (i?.children?.length) {
|
|
150
|
+
opened = this.hasSelectedMenu(i, selectedkey);
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
return opened;
|
|
154
|
+
},
|
|
155
|
+
findMenuItemByPath(menus, targetPath) {
|
|
156
|
+
const queue = [];
|
|
157
|
+
let targetNode = null;
|
|
158
|
+
menus.forEach((node) => queue.push(node));
|
|
159
|
+
|
|
160
|
+
while (queue.length) {
|
|
161
|
+
const node = queue.shift();
|
|
162
|
+
if (!node) return null;
|
|
163
|
+
|
|
164
|
+
if (node.path === targetPath) {
|
|
165
|
+
// 添加节点
|
|
166
|
+
targetNode = node;
|
|
167
|
+
break;
|
|
168
|
+
} else {
|
|
169
|
+
node.children?.forEach((node) => queue.push(node));
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return targetNode;
|
|
174
|
+
},
|
|
175
|
+
defaultSelectedMenu(menu) {
|
|
176
|
+
try {
|
|
177
|
+
// eslint-disable-next-line no-undef
|
|
178
|
+
const pages = getCurrentPages();
|
|
179
|
+
const currentpage = pages[pages.length - 1];
|
|
180
|
+
let path = currentpage.route.split('/');
|
|
181
|
+
path = path[1];
|
|
182
|
+
let selectedKey = '';
|
|
183
|
+
const targetMenu = this.findMenuItemByPath(menu, `/${path}`);
|
|
184
|
+
if (targetMenu) {
|
|
185
|
+
selectedKey = targetMenu.key;
|
|
186
|
+
}
|
|
187
|
+
return selectedKey;
|
|
188
|
+
} catch (error) {
|
|
189
|
+
return '';
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
});
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<view class="weda-menu weda-menu-mobile" style="display: {{menuData.length?'block':'none'}};">
|
|
2
|
+
<view class="weda-menu__wrapper" style="background:{{navigationStyle.menuBackgroundColor}}">
|
|
3
|
+
<view class="weda-menu__bar-main">
|
|
4
|
+
<view class="weda-menu__main-logo">
|
|
5
|
+
<image wx:if="{{navigationStyle.showLogo}}" class="weda-menu__main-icon" style="width:{{navigationStyle.logoWidth}};height:{{navigationStyle.logoHeight}};" src="{{navigationStyle.logoUrl||defaultLogoUrl}}"></image>
|
|
6
|
+
<text wx:if="{{navigationStyle.showTitle}}" style="font-size:{{navigationStyle.titleFontSize}};color:{{navigationStyle.titleColor}};line-height: 2px;">
|
|
7
|
+
{{navigationStyle.title}}
|
|
8
|
+
</text>
|
|
9
|
+
</view>
|
|
10
|
+
</view>
|
|
11
|
+
<view class="weda-menu__bar-extra">
|
|
12
|
+
<view wx:if="{{!visible}}" class=".weda-menu__bar-btn weda-icon t-icon t-icon-view-list" bindtap="showMenu" style="color:{{navigationStyle.titleColor}}"></view>
|
|
13
|
+
<view wx:else class="weda-menu__bar-btn--close weda-icon t-icon t-icon-close" bindtap="showMenu" style="color:{{navigationStyle.titleColor}}"></view>
|
|
14
|
+
</view>
|
|
15
|
+
</view>
|
|
16
|
+
<view class="menu-solt">
|
|
17
|
+
<slot></slot>
|
|
18
|
+
</view>
|
|
19
|
+
</view>
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
<view class="weda-menu-mobile__drawer" wx-if="{{visible}}">
|
|
23
|
+
|
|
24
|
+
<view class="weda-menu weda-menu-mobile">
|
|
25
|
+
<view class="weda-menu__wrapper" style="background:{{navigationStyle.menuBackgroundColor}}">
|
|
26
|
+
<view class="weda-menu__bar-main">
|
|
27
|
+
<view class="weda-menu__main-logo">
|
|
28
|
+
<image wx:if="{{navigationStyle.showLogo}}" class="weda-menu__main-icon" style="width:{{navigationStyle.logoWidth}};height:{{navigationStyle.logoHeight}};" src="{{navigationStyle.logoUrl||defaultLogoUrl}}"></image>
|
|
29
|
+
<text wx:if="{{navigationStyle.showTitle}}" style="font-size:{{navigationStyle.titleFontSize}};color:{{navigationStyle.titleColor}};line-height: 2px;">
|
|
30
|
+
{{navigationStyle.title}}
|
|
31
|
+
</text>
|
|
32
|
+
</view>
|
|
33
|
+
</view>
|
|
34
|
+
<view class="weda-menu__bar-extra">
|
|
35
|
+
<view wx:if="{{!visible}}" class=".weda-menu__bar-btn weda-icon t-icon t-icon-view-list" bindtap="showMenu" style="color:{{navigationStyle.titleColor}}"></view>
|
|
36
|
+
<view wx:else class="weda-menu__bar-btn--close weda-icon t-icon t-icon-close" bindtap="showMenu" style="color:{{navigationStyle.titleColor}}"></view>
|
|
37
|
+
</view>
|
|
38
|
+
</view>
|
|
39
|
+
</view>
|
|
40
|
+
<view class="weda-drawer-drawer__body">
|
|
41
|
+
<scroll-view class="weda-drawer-menu weda-menu__drawer-menu weda-drawer-menu--light" scroll-y >
|
|
42
|
+
<view class="weda-drawer-menu weda-menu__drawer-menu weda-drawer-menu--light" style="background:{{navigationStyle.menuBackgroundColor}}">
|
|
43
|
+
<view class="weda-drawer-menu__body">
|
|
44
|
+
<view class="weda-drawer-menu__list">
|
|
45
|
+
<block wx:for="{{menuData}}" wx:key="menuIndex" wx:for-item="menu">
|
|
46
|
+
<view class="{{menu.children ? 'weda-drawer-menu__submenu' : ''}} {{menu.expand?'expand':''}}" >
|
|
47
|
+
<view class="weda-drawer-menu__item" style="background-color:{{selectedKey===menu.key?navigationStyle.menuHoverColor:'unset'}};" bindtap="menuClick" data-menu="{{menu}}">
|
|
48
|
+
<view wx:if="{{navigationStyle.showMenuIcon && menu.iconType!=='image'}}" class="weda-grid-navigation__icon">
|
|
49
|
+
<view wx:if="{{menu.iconType === 't-icon'}}" class="weda-icon t-icon t-icon-{{menu.ticon}}" style="font-size:{{navigationStyle.menuFontSize}};color:{{navigationStyle.menuColor}}"></view>
|
|
50
|
+
<view wx:if="{{menu.iconType !== 't-icon'}}" class="weda-icon lcap-icon-padding lcap-icon lcap-icon-{{menu.iconUrl}}" style="font-size:{{navigationStyle.menuFontSize}};color:{{navigationStyle.menuColor}}">
|
|
51
|
+
</view>
|
|
52
|
+
</view>
|
|
53
|
+
<image wx:if="{{navigationStyle.showMenuIcon && menu.iconType==='image'}}" class="weda-drawer-menu__list-icon" src="{{menu.iconUrl}}" alt="icon"></image>
|
|
54
|
+
<view class="weda-drawer-menu__text" style="font-size:{{navigationStyle.menuFontSize}};color:{{navigationStyle.menuColor}}">{{menu.title}}</view>
|
|
55
|
+
<view wx-if="{{menu.children.length>0}}" class="weda-menu__bar-btn-expand lcap-icon lcap-icon-chevrondown"></view>
|
|
56
|
+
</view>
|
|
57
|
+
<view class="weda-drawer-menu__list">
|
|
58
|
+
<block wx-if="{{menu.children}}">
|
|
59
|
+
<block wx:for="{{menu.children}}" wx:key="secondIndex" wx:for-item="secondMenu">
|
|
60
|
+
<view class="{{secondMenu.children ? 'weda-drawer-menu__submenu weda-menu__submenu' : ''}} {{secondMenu.expand?'expand':''}}">
|
|
61
|
+
<view class="weda-drawer-menu__item" style="background-color:{{selectedKey===secondMenu.key?navigationStyle.menuHoverColor:'unset'}};" bindtap="menuClick" data-menu="{{secondMenu}}">
|
|
62
|
+
<view class="weda-drawer-menu__text" style="font-size:{{navigationStyle.menuFontSize}};color:{{navigationStyle.menuColor}}">{{secondMenu.title}}</view>
|
|
63
|
+
<view wx-if="{{secondMenu.children.length>0}}" class="weda-menu__bar-btn-expand lcap-icon lcap-icon-chevrondown"></view>
|
|
64
|
+
</view>
|
|
65
|
+
<view class="weda-drawer-menu__list">
|
|
66
|
+
<block wx-if="{{secondMenu.children}}">
|
|
67
|
+
<block wx:for="{{secondMenu.children}}" wx:key="thridIndex" wx:for-item="thridMenu">
|
|
68
|
+
<view class="">
|
|
69
|
+
<view class="weda-drawer-menu__item" style="background-color:{{selectedKey===thridMenu.key?navigationStyle.menuHoverColor:'unset'}};" bindtap="menuClick" data-menu="{{thridMenu}}">
|
|
70
|
+
<view class="weda-drawer-menu__text" style="font-size:{{navigationStyle.menuFontSize}};color:{{navigationStyle.menuColor}}">{{thridMenu.title}}</view>
|
|
71
|
+
</view>
|
|
72
|
+
</view>
|
|
73
|
+
</block>
|
|
74
|
+
</block>
|
|
75
|
+
</view>
|
|
76
|
+
</view>
|
|
77
|
+
</block>
|
|
78
|
+
</block>
|
|
79
|
+
</view>
|
|
80
|
+
</view>
|
|
81
|
+
</block>
|
|
82
|
+
</view>
|
|
83
|
+
</view>
|
|
84
|
+
</view>
|
|
85
|
+
</scroll-view>
|
|
86
|
+
</view>
|
|
87
|
+
|
|
88
|
+
</view>
|