@cloudbase/weda-ui-mp 3.13.6 → 3.14.0

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.
@@ -68,6 +68,7 @@ Component({
68
68
  },
69
69
  _dataNullRef: { current: {} }, // 将最近的对象属性设置null后存储下来
70
70
  _oldData: undefined,
71
+ _dataSourceData: [],
71
72
  },
72
73
  methods: {
73
74
  handleEvent: function (params) {
@@ -105,10 +106,7 @@ Component({
105
106
  record: this.data._oldData,
106
107
  refresh,
107
108
  deleteOne,
108
- dataSourceVersion:
109
- this.properties.datasource?.extra?.methodName === 'wedaGetRecordsV2'
110
- ? 'v2'
111
- : 'v1',
109
+ dataSourceVersion: this.properties.datasource?.extra?.methodName === 'wedaGetRecordsV2' ? 'v2' : 'v1',
112
110
  });
113
111
  },
114
112
  },
@@ -116,6 +114,11 @@ Component({
116
114
  _oldData: function () {
117
115
  this.updateWidgetAPI();
118
116
  },
117
+ dataSourceData: function (dataSourceData) {
118
+ if (!equal(dataSourceData, this.data._dataSourceData)) {
119
+ this.setData({ _dataSourceData: [].concat(dataSourceData) });
120
+ }
121
+ },
119
122
  },
120
123
  lifetimes: {
121
124
  attached: function () {
@@ -3,7 +3,7 @@
3
3
  className="weda-data-view__container {{className}}"
4
4
  style="{{style}}"
5
5
  datasource="{{datasource}}"
6
- dataSourceData="{{dataSourceData}}"
6
+ dataSourceData="{{_dataSourceData}}"
7
7
  bindConnectMetadata="{{bindConnectMetadata}}"
8
8
  connectorMethod="{{connectorMethod}}"
9
9
  connectorParams="{{connectorParams}}"
@@ -145,6 +145,7 @@
145
145
  .wd-form-item-wrap__label > label {
146
146
  display: inline-block;
147
147
  line-height: var(--wd-font-line-height-default);
148
+ width: 100%;
148
149
  }
149
150
  .wd-form-item-wrap__label-explain {
150
151
  margin-left: var(--wd-space-base);
@@ -51,25 +51,18 @@ Component({
51
51
  });
52
52
  },
53
53
  init() {
54
- const {
55
- gutterX,
56
- gutterY,
57
- className: userClassName,
58
- avoidScrollbar,
59
- } = this.data;
54
+ const { gutterX, gutterY, className: userClassName, avoidScrollbar } = this.data;
60
55
  const gutterXValue =
61
56
  typeof gutterX === 'number' && !isNaN(gutterX)
62
57
  ? gutterX
63
- : GUTTER_VALUE.find((item) => item.gutterValue === gutterX)
64
- ?.styleValue || 0;
58
+ : GUTTER_VALUE.find((item) => item.gutterValue === gutterX)?.styleValue || 0;
65
59
  const gutterYValue =
66
60
  typeof gutterY === 'number' && !isNaN(gutterY)
67
61
  ? gutterY
68
- : GUTTER_VALUE.find((item) => item.gutterValue === gutterY)
69
- ?.styleValue || 0;
62
+ : GUTTER_VALUE.find((item) => item.gutterValue === gutterY)?.styleValue || 0;
70
63
  const actalClassName = classNames({
71
64
  'wd-grid': true,
72
- 'wd-grid--gap': avoidScrollbar,
65
+ 'wd-grid--avoid-scrollbar': avoidScrollbar,
73
66
  [`wd-grid-gx-${gutterXValue}`]: !isNil(gutterXValue),
74
67
  // 产品要求guterX 同时间决定row一个换行的间距和 row之间的间距
75
68
  [`wd-grid-gy-${gutterYValue}`]: !isNil(gutterYValue),
@@ -53,6 +53,26 @@ Component({
53
53
  type: String,
54
54
  value: 'rgba(0, 0, 0, 0.9)',
55
55
  },
56
+ layoutType: {
57
+ type: String,
58
+ value: 'normal',
59
+ },
60
+ transformType: {
61
+ type: String,
62
+ value: 'scaleAndFade',
63
+ },
64
+ nextMargin: {
65
+ type: String,
66
+ value: '0px',
67
+ },
68
+ previousMargin: {
69
+ type: String,
70
+ value: '0px',
71
+ },
72
+ easingFunction: {
73
+ type: String,
74
+ value: 'default',
75
+ },
56
76
  },
57
77
  methods: {
58
78
  ...handleEvents([
@@ -1,3 +1,3 @@
1
- <swiper id="{{id}}" class="weda-ui {{className}}" style="{{style}}" indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" current="{{current}}" interval="{{interval}}" duration="{{duration}}" circular="{{circular}}" vertical="{{vertical}}" indicator-color="{{indicatorColor}}" indicator-active-color="{{indicatorActiveColor}}">
1
+ <swiper id="{{id}}" class="weda-ui {{className}}" style="{{style}}" indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" current="{{current}}" interval="{{interval}}" duration="{{duration}}" circular="{{circular}}" vertical="{{vertical}}" indicator-color="{{indicatorColor}}" indicator-active-color="{{indicatorActiveColor}}" layout-type="{{layoutType}}" transform-type="{{transformType}}" next-margin="{{nextMargin}}" previous-margin="{{previousMargin}}" easing-function="{{easingFunction}}">
2
2
  <slot></slot>
3
3
  </swiper>
@@ -145,6 +145,7 @@
145
145
  .wd-form-item-wrap__label > label {
146
146
  display: inline-block;
147
147
  line-height: var(--wd-font-line-height-default);
148
+ width: 100%;
148
149
  }
149
150
  .wd-form-item-wrap__label-explain {
150
151
  margin-left: var(--wd-space-base);
@@ -145,6 +145,7 @@
145
145
  .wd-form-item-wrap__label > label {
146
146
  display: inline-block;
147
147
  line-height: var(--wd-font-line-height-default);
148
+ width: 100%;
148
149
  }
149
150
  .wd-form-item-wrap__label-explain {
150
151
  margin-left: var(--wd-space-base);
@@ -145,6 +145,7 @@
145
145
  .wd-form-item-wrap__label > label {
146
146
  display: inline-block;
147
147
  line-height: var(--wd-font-line-height-default);
148
+ width: 100%;
148
149
  }
149
150
  .wd-form-item-wrap__label-explain {
150
151
  margin-left: var(--wd-space-base);
@@ -33,6 +33,23 @@
33
33
  bottom: 0;
34
34
  width: 80%;
35
35
  margin: 0 auto;
36
+ display: flex;
37
+ align-items: center;
38
+ justify-content: center;
39
+ }
40
+
41
+ .wd-pc-image-preview {
42
+ max-width: 80%;
43
+ max-height: 80%;
44
+ margin-top: 50px;
45
+ }
46
+
47
+ .wd-image-preview-img {
48
+ max-width: 100%;
49
+ max-height: 100%;
50
+ background-size: contain;
51
+ background-position: center center;
52
+ background-repeat: no-repeat;
36
53
  }
37
54
 
38
55
  .wd-image-mask {
@@ -307,6 +307,7 @@
307
307
  .wd-form-item-wrap__label > label {
308
308
  display: inline-block;
309
309
  line-height: var(--wd-font-line-height-default);
310
+ width: 100%;
310
311
  }
311
312
  .wd-form-item-wrap__label-explain {
312
313
  margin-left: var(--wd-space-base);
@@ -180,6 +180,7 @@
180
180
  .wd-form-item-wrap__label > label {
181
181
  display: inline-block;
182
182
  line-height: var(--wd-font-line-height-default);
183
+ width: 100%;
183
184
  }
184
185
  .wd-form-item-wrap__label-explain {
185
186
  margin-left: var(--wd-space-base);
@@ -170,6 +170,7 @@
170
170
  .wd-form-item-wrap__label > label {
171
171
  display: inline-block;
172
172
  line-height: var(--wd-font-line-height-default);
173
+ width: 100%;
173
174
  }
174
175
  .wd-form-item-wrap__label-explain {
175
176
  margin-left: var(--wd-space-base);
@@ -28,6 +28,18 @@ Component({
28
28
  customStyle: {
29
29
  type: Object,
30
30
  },
31
+ customContent: {
32
+ type: Boolean,
33
+ value: false,
34
+ },
35
+ openPage: {
36
+ type: String,
37
+ value: '',
38
+ },
39
+ logoPosition: {
40
+ type: String,
41
+ value: 'bottom-left',
42
+ },
31
43
  },
32
44
  methods: {
33
45
  ...handleEvents([
@@ -1 +1 @@
1
- <store-product id="{{id}}" appid="{{appid}}" product-id="{{productId}}" product-promotion-link="{{productPromotionLink}}" media-id="{{mediaId}}" custom-style="{{customStyle}}" bindentersuccess="bindentersuccess" bindentererror="bindentererror" />
1
+ <store-product id="{{id}}" appid="{{appid}}" product-id="{{productId}}" product-promotion-link="{{productPromotionLink}}" media-id="{{mediaId}}" custom-style="{{customStyle}}" custom-content="{{customContent}}" open-page="{{openPage}}" logo-position="{{logoPosition}}" bindentersuccess="bindentersuccess" bindentererror="bindentererror" />
@@ -266,6 +266,7 @@
266
266
  .wd-form-item-wrap__label > label {
267
267
  display: inline-block;
268
268
  line-height: var(--wd-font-line-height-default);
269
+ width: 100%;
269
270
  }
270
271
  .wd-form-item-wrap__label-explain {
271
272
  margin-left: var(--wd-space-base);
@@ -307,6 +307,7 @@
307
307
  .wd-form-item-wrap__label > label {
308
308
  display: inline-block;
309
309
  line-height: var(--wd-font-line-height-default);
310
+ width: 100%;
310
311
  }
311
312
  .wd-form-item-wrap__label-explain {
312
313
  margin-left: var(--wd-space-base);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "miniprogram": "./",
4
4
  "packageManager": "yarn@3.0.2",
5
5
  "dependencies": {},
6
- "version": "3.13.6",
6
+ "version": "3.14.0",
7
7
  "main": "./",
8
8
  "publishConfig": {
9
9
  "access": "public"