@cloudbase/weda-ui-mp 3.13.7 → 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.
- package/components/grid/index.js +4 -11
- package/components/swiper/index.js +20 -0
- package/components/swiper/index.wxml +1 -1
- package/components/wd-image/wd-image.wxss +17 -0
- package/components/wd-store-product/index.js +12 -0
- package/components/wd-store-product/index.wxml +1 -1
- package/package.json +1 -1
package/components/grid/index.js
CHANGED
|
@@ -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--
|
|
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>
|
|
@@ -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 {
|
|
@@ -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" />
|