@cloudbase/weda-ui-mp 3.6.0 → 3.6.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/scrollView/index.js +26 -1
- package/components/scrollView/index.wxml +1 -1
- package/components/wd-button/wd-button.wxss +5 -0
- package/components/wd-card/index.wxml +1 -1
- package/components/wd-form/index.js +1 -1
- package/components/wd-icon/index.js +9 -1
- package/components/wd-icon/index.wxml +2 -2
- package/components/wd-input-group/index.wxss +1 -0
- package/components/wd-top-tab/index.js +5 -2
- package/package.json +4 -1
- package/style/wd-design.wxss +14 -0
|
@@ -99,9 +99,29 @@ Component({
|
|
|
99
99
|
value: false,
|
|
100
100
|
},
|
|
101
101
|
},
|
|
102
|
+
data: {
|
|
103
|
+
clientHeight: 0,
|
|
104
|
+
clientWidth: 0,
|
|
105
|
+
},
|
|
102
106
|
methods: {
|
|
107
|
+
getComponentClientHeight: function () {
|
|
108
|
+
const that = this;
|
|
109
|
+
const query = wx.createSelectorQuery().in(this);
|
|
110
|
+
query.select('.g-scroll-view').boundingClientRect();
|
|
111
|
+
query.exec((res) => {
|
|
112
|
+
that.setData({
|
|
113
|
+
clientHeight: res[0]?.height,
|
|
114
|
+
clientWidth: res[0]?.width,
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
},
|
|
118
|
+
scroll: function (event) {
|
|
119
|
+
const { clientHeight, clientWidth } = this.data;
|
|
120
|
+
const detail = { ...event.detail, clientHeight, clientWidth };
|
|
121
|
+
this.triggerEvent('scroll', detail);
|
|
122
|
+
},
|
|
103
123
|
...handleEvents([
|
|
104
|
-
{ name: 'scroll', title: '滚动时触发' },
|
|
124
|
+
// { name: 'scroll', title: '滚动时触发' },
|
|
105
125
|
{ name: 'scrolltolower', title: '滚动到底部/右边时触发' },
|
|
106
126
|
{ name: 'scrolltoupper', title: '滚动到顶部/左边时触发' },
|
|
107
127
|
{
|
|
@@ -116,4 +136,9 @@ Component({
|
|
|
116
136
|
{ name: 'refresherabort', title: '自定义下拉刷新被中止' },
|
|
117
137
|
]),
|
|
118
138
|
},
|
|
139
|
+
lifetimes: {
|
|
140
|
+
ready() {
|
|
141
|
+
this.getComponentClientHeight();
|
|
142
|
+
},
|
|
143
|
+
},
|
|
119
144
|
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<view class="{{classPrefix + '-card__header'}}" wx:if="{{showHeader}}">
|
|
3
3
|
<slot name="headerSlot"></slot>
|
|
4
4
|
</view>
|
|
5
|
-
<view class="{{classPrefix + '-card__body'}}
|
|
5
|
+
<view class="{{classPrefix + '-card__body'}} {{contentState !== 'show'?'hide':''}}">
|
|
6
6
|
<slot name="contentSlot"></slot>
|
|
7
7
|
</view>
|
|
8
8
|
<view class="{{classPrefix + '-card__footer'}}" wx:if="{{showFooter}}">
|
|
@@ -55,6 +55,7 @@ Component({
|
|
|
55
55
|
iconColor: '',
|
|
56
56
|
width: '',
|
|
57
57
|
height: '',
|
|
58
|
+
iconType: '',
|
|
58
59
|
},
|
|
59
60
|
lifetimes: {
|
|
60
61
|
attached() {
|
|
@@ -125,7 +126,14 @@ Component({
|
|
|
125
126
|
...classes,
|
|
126
127
|
[className]: className,
|
|
127
128
|
});
|
|
128
|
-
this.setData({
|
|
129
|
+
this.setData({
|
|
130
|
+
cls,
|
|
131
|
+
fontSize,
|
|
132
|
+
iconColor,
|
|
133
|
+
width,
|
|
134
|
+
height,
|
|
135
|
+
iconType: _type,
|
|
136
|
+
});
|
|
129
137
|
},
|
|
130
138
|
...handleEvents([{ title: '点击', name: 'tap' }]),
|
|
131
139
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<block bind:tap="tap" id="{{id}}">
|
|
2
|
-
<view wx:if="{{
|
|
3
|
-
<wd-image wx:if="{{
|
|
2
|
+
<view wx:if="{{iconType ==='inner'}}" style="{{fontSize}}; {{iconColor}} ;{{style}}" class="{{cls}}" bind:tap="tap" bindload="load"> </view>
|
|
3
|
+
<wd-image wx:if="{{iconType ==='custom'}}" style="{{width}}; {{height}}; {{style}}" className="{{cls}}" src="{{src ? src : 'https://qcloudimg.tencent-cloud.cn/raw/4a29d51b504f12b4933ce4490110b4dc.svg'}}" events="{{tap}}" maskClosable="{{false}}" lazyLoad="{{false}}"></wd-image>
|
|
4
4
|
</block>
|
|
@@ -104,10 +104,13 @@ Component({
|
|
|
104
104
|
this.setData({
|
|
105
105
|
tabsData: tabData,
|
|
106
106
|
});
|
|
107
|
+
|
|
108
|
+
this.updateWidgetAPI();
|
|
109
|
+
},
|
|
110
|
+
currentIndex: function (currentIndex) {
|
|
107
111
|
this.triggerEvent('change', {
|
|
108
|
-
value:
|
|
112
|
+
value: this.properties.list[currentIndex]?.value,
|
|
109
113
|
});
|
|
110
|
-
this.updateWidgetAPI();
|
|
111
114
|
},
|
|
112
115
|
},
|
|
113
116
|
});
|
package/package.json
CHANGED
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
"miniprogram": "./",
|
|
4
4
|
"packageManager": "yarn@3.0.2",
|
|
5
5
|
"dependencies": {},
|
|
6
|
-
"version": "3.6.
|
|
6
|
+
"version": "3.6.2",
|
|
7
7
|
"main": "./",
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
8
11
|
"peerDependencies": {
|
|
9
12
|
"@cloudbase/weda-client": ">=1.0.31",
|
|
10
13
|
"miniprogram-gesture": "^1",
|
package/style/wd-design.wxss
CHANGED
|
@@ -603,4 +603,18 @@ page,
|
|
|
603
603
|
--wd-form-weui-input-wrap-bg-focus: var(--wd-color-gray-1);
|
|
604
604
|
--wd-form-weui-input-wrap-text-disabled: var(--wd-color-text-form-disabled);
|
|
605
605
|
--wd-form-weui-input-group-addon-min-width: 5.125rem;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
page {
|
|
609
|
+
/* 修复小程序 Picker 组件滑动体验问题 */
|
|
610
|
+
touch-action: pan-y;
|
|
611
|
+
box-sizing: border-box;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
page,
|
|
615
|
+
page view,
|
|
616
|
+
page element,
|
|
617
|
+
page text,
|
|
618
|
+
page image {
|
|
619
|
+
box-sizing: border-box;
|
|
606
620
|
}
|