@cloudbase/weda-ui-mp 3.6.1 → 3.6.3

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.
@@ -332,6 +332,9 @@ export default Behavior({
332
332
  if (form) {
333
333
  // 在 form 里面
334
334
  this._removeFormItem = form.addFormItem(this.data.name, this.$widget);
335
+ if (!Object.prototype.hasOwnProperty.call(form?.value, newName)) {
336
+ form?.updateFormContext(this.data.name, this.data.value);
337
+ }
335
338
  }
336
339
  });
337
340
  },
@@ -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}}"
@@ -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) &&
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "miniprogram": "./",
4
4
  "packageManager": "yarn@3.0.2",
5
5
  "dependencies": {},
6
- "version": "3.6.1",
6
+ "version": "3.6.3",
7
7
  "main": "./",
8
8
  "publishConfig": {
9
9
  "access": "public"