@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.
@@ -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
  });
@@ -1,6 +1,6 @@
1
1
  <scroll-view
2
2
  id="{{id}}"
3
- class="weda-ui {{className}}"
3
+ class="weda-ui g-scroll-view {{className}}"
4
4
  style="{{style}}"
5
5
  scroll-x="{{scrollX}}"
6
6
  scroll-y="{{scrollY}}"
@@ -495,4 +495,9 @@
495
495
 
496
496
  button::after {
497
497
  border: none;
498
+ }
499
+
500
+ button:not([size=mini]) {
501
+ margin: 0;
502
+ width: auto;
498
503
  }
@@ -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'}}" wx:if="{{contentState === 'show'}}">
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}}">
@@ -246,7 +246,7 @@ Component({
246
246
  methodName = methodGetItem;
247
247
  params = paramGetItem;
248
248
  }
249
- console.log('aaaa======', datasourceType);
249
+
250
250
  if (
251
251
  (datasourceType === 'expression' ||
252
252
  (formTypeWithInitValue.includes(formType) &&
@@ -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({ cls, fontSize, iconColor, width, height });
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="{{type ==='inner'}}" style="{{fontSize}}; {{iconColor}} ;{{style}}" class="{{cls}}" bind:tap="tap" bindload="load"> </view>
3
- <wd-image wx:if="{{type ==='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>
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>
@@ -1 +1,2 @@
1
1
  @import '../../style/wd-design.wxss';
2
+ @import './wd-input-group.wxss';
@@ -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: tabData.find((v) => v.selected)?.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.0",
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",
@@ -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
  }