@cloudbase/weda-ui-mp 3.10.0 → 3.10.2
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/components/wd-input/inner-input/wd-input.wxss +3 -0
- package/components/wd-input-wrap/wd-input-wrap.wxss +3 -0
- package/components/wd-menu-layout/index.js +4 -0
- package/components/wd-menu-layout/index.wxml +1 -1
- package/components/wd-menu-list/index.js +12 -2
- package/components/wd-select/select.wxss +4 -0
- package/components/wd-tabbar/wd-tabbar.wxss +3 -0
- package/package.json +1 -1
|
@@ -1387,6 +1387,9 @@ textarea {
|
|
|
1387
1387
|
display: flex;
|
|
1388
1388
|
align-items: center;
|
|
1389
1389
|
}
|
|
1390
|
+
.wd-form-input-wrap__content .weui-cell_active:active::after {
|
|
1391
|
+
background-color: unset;
|
|
1392
|
+
}
|
|
1390
1393
|
.wd-form-input-wrap.wd-input-input-search.template.search-box.color-grey.is-pc-bordered {
|
|
1391
1394
|
background-color: #f2f2f2;
|
|
1392
1395
|
border-color: #f2f2f2;
|
|
@@ -119,6 +119,9 @@
|
|
|
119
119
|
display: flex;
|
|
120
120
|
align-items: center;
|
|
121
121
|
}
|
|
122
|
+
.wd-form-input-wrap__content .weui-cell_active:active::after {
|
|
123
|
+
background-color: unset;
|
|
124
|
+
}
|
|
122
125
|
.wd-form-input-wrap.wd-input-input-search.template.search-box.color-grey.is-pc-bordered {
|
|
123
126
|
background-color: #f2f2f2;
|
|
124
127
|
border-color: #f2f2f2;
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
|
|
51
51
|
<view class="{{classPrefix + '-menulayout-h5__drawer'}} {{classPrefix + '-menulayout-menu'}}">
|
|
52
52
|
<view hidden="{{!visible}}">
|
|
53
|
-
<wd-menu-list menu="{{menu}}" defaultOpened="{{defaultOpened}}" bind:menuClick="menuClick" />
|
|
53
|
+
<wd-menu-list menu="{{menu}}" defaultOpened="{{defaultOpened}}" selectedMenuKey="{{selectedMenuKey}}" bind:menuClick="menuClick" />
|
|
54
54
|
</view>
|
|
55
55
|
<view hidden="{{!visible}}" class="{{classPrefix + '-menulayout-h5__drawer-slot'}} is-not-content">
|
|
56
56
|
<view class="{{classPrefix + '-menulayout__slot'}} {{classPrefix + '-menulayout-body__footer'}}">
|
|
@@ -42,6 +42,10 @@ Component({
|
|
|
42
42
|
type: Boolean,
|
|
43
43
|
value: true,
|
|
44
44
|
},
|
|
45
|
+
selectedMenuKey: {
|
|
46
|
+
type: String,
|
|
47
|
+
value: '',
|
|
48
|
+
},
|
|
45
49
|
},
|
|
46
50
|
data: {
|
|
47
51
|
classPrefix: WD_PREFIX,
|
|
@@ -52,6 +56,8 @@ Component({
|
|
|
52
56
|
attached() {
|
|
53
57
|
this.updateWidgetAPI();
|
|
54
58
|
this.init();
|
|
59
|
+
this.properties.selectedMenuKey &&
|
|
60
|
+
this.setData({ selectedKey: this.properties.selectedMenuKey });
|
|
55
61
|
},
|
|
56
62
|
},
|
|
57
63
|
observers: {
|
|
@@ -62,6 +68,9 @@ Component({
|
|
|
62
68
|
this.findSelectItem(menuData);
|
|
63
69
|
this.init(menu, defaultOpened);
|
|
64
70
|
},
|
|
71
|
+
selectedMenuKey: function (selectedMenuKey) {
|
|
72
|
+
selectedMenuKey && this.setData({ selectedKey: selectedMenuKey });
|
|
73
|
+
},
|
|
65
74
|
},
|
|
66
75
|
methods: {
|
|
67
76
|
updateWidgetAPI() {
|
|
@@ -74,7 +83,7 @@ Component({
|
|
|
74
83
|
* 设置选中菜单项
|
|
75
84
|
* @param {*} params
|
|
76
85
|
*/
|
|
77
|
-
setSelectedInfo(params, isNavigate = false) {
|
|
86
|
+
setSelectedInfo({ params, isNavigate = false } = {}) {
|
|
78
87
|
const { key, item } = params || {};
|
|
79
88
|
let selectItem = item;
|
|
80
89
|
if (key || !item) {
|
|
@@ -84,6 +93,7 @@ Component({
|
|
|
84
93
|
: this.data.menuData) || [];
|
|
85
94
|
selectItem = this.findSelectItem(menuData, key) || {};
|
|
86
95
|
}
|
|
96
|
+
if (!selectItem) return;
|
|
87
97
|
this.setData({ selectedKey: selectItem?.key });
|
|
88
98
|
isNavigate && this.navigateTo(selectItem);
|
|
89
99
|
},
|
|
@@ -123,7 +133,7 @@ Component({
|
|
|
123
133
|
(menu.isMultiTerminal ? menu.mobileMenuData : menu.menuData) || []
|
|
124
134
|
);
|
|
125
135
|
const selectItem = this.findSelectItem(menuData) || {};
|
|
126
|
-
this.setSelectedInfo({ item: selectItem });
|
|
136
|
+
this.setSelectedInfo({ params: { item: selectItem } });
|
|
127
137
|
this.setData({
|
|
128
138
|
menuData: this.generateMenuData({
|
|
129
139
|
menuData,
|