cyy-vue-material 1.1.30 → 1.1.31
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/package.json
CHANGED
|
@@ -14,7 +14,13 @@
|
|
|
14
14
|
class="golds"
|
|
15
15
|
:style="{ backgroundColor: props.backgroundColor, marginTop: props.marginTop + 'px', marginBottom: props.marginBottom + 'px' }"
|
|
16
16
|
>
|
|
17
|
-
<div
|
|
17
|
+
<div
|
|
18
|
+
class="golds-item"
|
|
19
|
+
:class="[props.navigationNum === 5 ? 'navigationNum5' : 'navigationNum4']"
|
|
20
|
+
v-for="(item, index) in resultArr"
|
|
21
|
+
:key="index"
|
|
22
|
+
@click="linkClick(item)"
|
|
23
|
+
>
|
|
18
24
|
<img
|
|
19
25
|
:class="[props.photoSize === 1 ? 'photoSizeBig' : 'photoSizeSmall']"
|
|
20
26
|
:style="{ borderRadius: props.photoCorner + '%' }"
|
|
@@ -71,10 +77,13 @@ export default {
|
|
|
71
77
|
marginTop: Number, //上边距
|
|
72
78
|
marginBottom: Number, //下边距
|
|
73
79
|
selectImg: Array, //添加图片
|
|
80
|
+
navigationNum: Number, //导航数量
|
|
74
81
|
},
|
|
75
82
|
},
|
|
76
83
|
mounted() {
|
|
77
|
-
|
|
84
|
+
if (this.props.navigationNum === 5) {
|
|
85
|
+
this.skeleton = ["导航1", "导航2", "导航3", "导航4", "导航5"];
|
|
86
|
+
}
|
|
78
87
|
},
|
|
79
88
|
computed: {
|
|
80
89
|
resultArr() {
|
|
@@ -140,7 +149,6 @@ export default {
|
|
|
140
149
|
flex-wrap: wrap;
|
|
141
150
|
.golds-item {
|
|
142
151
|
margin: 10px 0;
|
|
143
|
-
width: 25%;
|
|
144
152
|
display: flex;
|
|
145
153
|
flex-direction: column;
|
|
146
154
|
justify-content: center;
|
|
@@ -154,6 +162,12 @@ export default {
|
|
|
154
162
|
text-align: center;
|
|
155
163
|
}
|
|
156
164
|
}
|
|
165
|
+
.navigationNum4 {
|
|
166
|
+
width: 25%;
|
|
167
|
+
}
|
|
168
|
+
.navigationNum5 {
|
|
169
|
+
width: 20%;
|
|
170
|
+
}
|
|
157
171
|
}
|
|
158
172
|
.photoSizeBig {
|
|
159
173
|
width: 58px;
|
|
@@ -23,15 +23,14 @@
|
|
|
23
23
|
<div class="line"></div>
|
|
24
24
|
</div>
|
|
25
25
|
</div>
|
|
26
|
-
<div v-if="
|
|
26
|
+
<div v-if="props.selectImg" class="mainImage">
|
|
27
27
|
<img
|
|
28
28
|
:style="{
|
|
29
29
|
borderTopLeftRadius: `${props.cornerStyle}px`,
|
|
30
30
|
borderTopRightRadius: `${props.cornerStyle}px`,
|
|
31
31
|
}"
|
|
32
|
-
:src="
|
|
32
|
+
:src="props.selectImg"
|
|
33
33
|
alt="主图"
|
|
34
|
-
@click="linkClick(selectImgRule('link'))"
|
|
35
34
|
/>
|
|
36
35
|
</div>
|
|
37
36
|
|
|
@@ -98,8 +97,9 @@ export default {
|
|
|
98
97
|
props: {
|
|
99
98
|
props: {
|
|
100
99
|
arrange: Number,
|
|
101
|
-
selectImg:
|
|
102
|
-
|
|
100
|
+
selectImg: {
|
|
101
|
+
type: String,
|
|
102
|
+
},
|
|
103
103
|
selectGoods: Array,
|
|
104
104
|
markedPrice: Number,
|
|
105
105
|
purchaseIcon: Number,
|
|
@@ -138,31 +138,6 @@ export default {
|
|
|
138
138
|
mainTitleColor: this.props.arrange === 5,
|
|
139
139
|
};
|
|
140
140
|
},
|
|
141
|
-
selectImgRule() {
|
|
142
|
-
return (params) => {
|
|
143
|
-
if (params === "show") {
|
|
144
|
-
if (this.props.selectImg || this.props.selectImgs.length) {
|
|
145
|
-
return true;
|
|
146
|
-
}
|
|
147
|
-
return false;
|
|
148
|
-
}
|
|
149
|
-
if (params === "url") {
|
|
150
|
-
if (this.props.selectImg) {
|
|
151
|
-
return this.props.selectImg;
|
|
152
|
-
}
|
|
153
|
-
if (this.props.selectImgs.length) {
|
|
154
|
-
return this.props.selectImgs[0].imgUrl;
|
|
155
|
-
}
|
|
156
|
-
return "";
|
|
157
|
-
}
|
|
158
|
-
if (params === "link") {
|
|
159
|
-
if (this.props.selectImgs.length) {
|
|
160
|
-
return this.props.selectImgs[0];
|
|
161
|
-
}
|
|
162
|
-
return [{ link: "无操作" }];
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
},
|
|
166
141
|
},
|
|
167
142
|
components: {
|
|
168
143
|
vopLabel,
|
|
@@ -217,7 +192,7 @@ export default {
|
|
|
217
192
|
if (state === "1") {
|
|
218
193
|
return "预售中";
|
|
219
194
|
} else {
|
|
220
|
-
return "
|
|
195
|
+
return "无库存";
|
|
221
196
|
}
|
|
222
197
|
},
|
|
223
198
|
},
|