cyy-vue-material 7.0.19 → 7.0.21

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.
Files changed (38) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +34 -34
  3. package/src/App.vue +149 -149
  4. package/src/api/http.js +16 -16
  5. package/src/api/index.js +21 -21
  6. package/src/api/urlQuery.js +20 -20
  7. package/src/common/js/constant.js +5 -5
  8. package/src/common/js/index.js +1 -1
  9. package/src/components/vop-label.vue +29 -29
  10. package/src/index.dev.js +4 -4
  11. package/src/package/cyy-ArsenalActivity/components/u-cont-down.vue +316 -316
  12. package/src/package/cyy-ArsenalActivity/components/u-line-progress.vue +150 -150
  13. package/src/package/cyy-ArsenalActivity/cyy-ArsenalActivity.vue +820 -820
  14. package/src/package/cyy-ArsenalCarousel/cyy-ArsenalCarousel.vue +137 -137
  15. package/src/package/cyy-ArsenalClass/cyy-ArsenalClass.vue +564 -564
  16. package/src/package/cyy-ArsenalMyNavigation/cyy-ArsenalMyNavigation.vue +128 -125
  17. package/src/package/cyy-ArsenalMyTop/cyy-ArsenalMyTop.vue +211 -211
  18. package/src/package/cyy-ArsenalNavigation/cyy-ArsenalNavigation.vue +236 -236
  19. package/src/package/cyy-ArsenalPicture/cyy-ArsenalPicture.vue +228 -228
  20. package/src/package/cyy-ArsenalPromotion/cyy-ArsenalPromotion.vue +913 -899
  21. package/src/package/cyy-ArsenalRecommend/cyy-ArsenalRecommend.vue +56 -56
  22. package/src/package/cyy-ArsenalTop/cyy-ArsenalTop.vue +328 -328
  23. package/src/package/cyy-collocation/cyy-collocation.vue +639 -639
  24. package/src/package/cyy-goods/cyy-goods.vue +317 -317
  25. package/src/package/cyy-goodsOne/consult.vue +267 -267
  26. package/src/package/cyy-goodsOne/cyy-goodsOne.vue +217 -217
  27. package/src/package/cyy-image/cyy-image.vue +64 -64
  28. package/src/package/cyy-live/cyy-live.vue +196 -196
  29. package/src/package/cyy-new-product/cyy-new-product.vue +834 -834
  30. package/src/package/cyy-notice/cyy-notice.vue +137 -137
  31. package/src/package/cyy-search/cyy-search.vue +57 -57
  32. package/src/package/cyy-slider/cyy-slider.vue +117 -117
  33. package/src/package/cyy-title/cyy-title.vue +38 -38
  34. package/src/package/cyy-video/cyy-video.vue +49 -49
  35. package/src/package/index.js +21 -21
  36. package/src/utils/checkEnv.js +16 -16
  37. package/src/utils/fetchFactory.js +100 -100
  38. package/src/utils/index.js +2 -2
@@ -1,228 +1,228 @@
1
- <template>
2
- <div>
3
- <div v-if="!props.selectImg.length" class="holder">请选择添加图片</div>
4
- <template v-else>
5
- <div
6
- :class="[props.showStyle === 1 ? 'ArsenalPicture-colunm' : 'ArsenalPicture']"
7
- :style="{ marginTop: props.marginTop + 'px', marginBottom: props.marginBottom + 'px' }"
8
- >
9
- <div
10
- v-for="(item, index) in resultArr"
11
- :key="index"
12
- :class="{
13
- 'classA-show': classOptions.showA,
14
- 'classB-show': classOptions.showB,
15
- 'classC-show': classOptions.showC,
16
- 'classD-show': classOptions.showD,
17
- 'classE-show': classOptions.showE,
18
- 'classF-show': classOptions.showF,
19
- 'classG-show': classOptions.showG,
20
- 'classH-show': classOptions.showH,
21
- 'classI-show': classOptions.showI,
22
- 'classJ-show': classOptions.showJ,
23
- }"
24
- >
25
- <img
26
- v-if="classOptions.showJ || classOptions.showI"
27
- class="ArsenalImg-classIJ"
28
- mode="widthFix"
29
- :src="item['imgUrl']"
30
- alt=""
31
- :style="{
32
- borderRadius: props.cornerStyle + 'px',
33
- }"
34
- @click="linkClick(item)"
35
- />
36
- <img
37
- v-else
38
- class="ArsenalImg"
39
- mode="widthFix"
40
- :src="item['imgUrl']"
41
- alt=""
42
- :style="{
43
- borderRadius: props.cornerStyle + 'px',
44
- }"
45
- @click="linkClick(item)"
46
- />
47
- </div>
48
- </div>
49
- </template>
50
- </div>
51
- </template>
52
-
53
- <script>
54
- import pick from "lodash-es/pick.js";
55
- import omit from "lodash-es/omit.js";
56
- import { handlePlat } from "../../utils/index.js";
57
- import { isEmpty, isUndefined } from "lodash-es";
58
- export default {
59
- name: "cyy-ArsenalPicture",
60
- data() {
61
- return {
62
- classOptions: {
63
- showA: false,
64
- showB: false,
65
- showC: false,
66
- showD: false,
67
- showE: false,
68
- showF: false,
69
- showG: false,
70
- showH: false,
71
- showI: false,
72
- showJ: false,
73
- },
74
- imgStyle: {
75
- width: "100%",
76
- boxSizing: "border-box",
77
- },
78
- };
79
- },
80
- props: {
81
- props: {
82
- showStyle: Number, //展示风格
83
- cornerStyle: Number, //边角样式
84
- spacing: Number, //图片间距 @unwhrite@
85
- marginTop: Number, //上边距
86
- marginBottom: Number, //下边距
87
- selectImg: Array, //添加图片
88
- defaultValue: Array,
89
- },
90
- },
91
- mounted() {
92
- console.log(this.props, 2007);
93
- this.whitchClass();
94
- },
95
- computed: {
96
- resultArr() {
97
- const { selectImg, defaultValue } = this.props;
98
- const computedArr = selectImg.filter((item) => !isUndefined(item)).filter((item) => !Object.values(item).every((citem) => isUndefined(citem)));
99
- let arr = defaultValue;
100
- if (!isEmpty(computedArr)) {
101
- arr = computedArr;
102
- }
103
- console.log(52, arr);
104
- return arr;
105
- },
106
- },
107
- methods: {
108
- whitchClass() {
109
- if (this.props.showStyle === 1) {
110
- if (this.props.spacing != 0) {
111
- this.classOptions.showJ = true;
112
- return;
113
- }
114
- this.classOptions.showI = true;
115
- return;
116
- }
117
- if (this.props.spacing != 0) {
118
- switch (this.props.selectImg.length) {
119
- case 1:
120
- this.classOptions.showE = true;
121
- break;
122
- case 2:
123
- this.classOptions.showF = true;
124
- break;
125
- case 3:
126
- this.classOptions.showG = true;
127
- break;
128
- case 4:
129
- this.classOptions.showH = true;
130
- break;
131
- default:
132
- }
133
- return;
134
- }
135
- switch (this.resultArr.length) {
136
- case 1:
137
- this.classOptions.showA = true;
138
- break;
139
- case 2:
140
- this.classOptions.showB = true;
141
- break;
142
- case 3:
143
- this.classOptions.showC = true;
144
- break;
145
- case 4:
146
- this.classOptions.showD = true;
147
- break;
148
- default:
149
- }
150
- },
151
- linkClick(item) {
152
- this.$emit("linkClick", item);
153
- },
154
- },
155
- };
156
- </script>
157
- <style lang="less" scoped>
158
- .holder {
159
- width: 100%;
160
- height: 180px;
161
- line-height: 180px;
162
- font-size: 30px;
163
- background-color: #ccc;
164
- color: #aaa;
165
- text-align: center;
166
- }
167
- .ArsenalPicture {
168
- width: 100%;
169
- display: flex;
170
- justify-content: space-between;
171
- .classA-show {
172
- aspect-ratio: 1 / 1; /* 设置宽高比为1:1 */
173
- width: 100%;
174
- color: red;
175
- }
176
- .classB-show {
177
- aspect-ratio: 1 / 1; /* 设置宽高比为1:1 */
178
- width: 50%;
179
- color: orange;
180
- }
181
- .classC-show {
182
- aspect-ratio: 1 / 1; /* 设置宽高比为1:1 */
183
- width: 33.33%;
184
- color: yellow;
185
- }
186
- .classD-show {
187
- aspect-ratio: 1 / 1; /* 设置宽高比为1:1 */
188
- width: 25%;
189
- }
190
- .classE-show {
191
- height: 392px;
192
- width: 392px;
193
- }
194
- .classF-show {
195
- height: 180px;
196
- width: 180px;
197
- }
198
- .classG-show {
199
- height: 120px;
200
- width: 120px;
201
- }
202
- .classH-show {
203
- height: 80px;
204
- width: 80px;
205
- }
206
- .ArsenalImg {
207
- width: 100%;
208
- height: 100% !important;
209
- }
210
- }
211
- .ArsenalPicture-colunm {
212
- width: 100%;
213
- .classI-show {
214
- width: 100%;
215
- }
216
- .classJ-show {
217
- width: 100%;
218
- margin-bottom: 20px;
219
- }
220
- .ArsenalImg {
221
- width: 100%;
222
- height: 100% !important;
223
- }
224
- .ArsenalImg-classIJ {
225
- width: 100%;
226
- }
227
- }
228
- </style>
1
+ <template>
2
+ <div>
3
+ <div v-if="!props.selectImg.length" class="holder">请选择添加图片</div>
4
+ <template v-else>
5
+ <div
6
+ :class="[props.showStyle === 1 ? 'ArsenalPicture-colunm' : 'ArsenalPicture']"
7
+ :style="{ marginTop: props.marginTop + 'px', marginBottom: props.marginBottom + 'px' }"
8
+ >
9
+ <div
10
+ v-for="(item, index) in resultArr"
11
+ :key="index"
12
+ :class="{
13
+ 'classA-show': classOptions.showA,
14
+ 'classB-show': classOptions.showB,
15
+ 'classC-show': classOptions.showC,
16
+ 'classD-show': classOptions.showD,
17
+ 'classE-show': classOptions.showE,
18
+ 'classF-show': classOptions.showF,
19
+ 'classG-show': classOptions.showG,
20
+ 'classH-show': classOptions.showH,
21
+ 'classI-show': classOptions.showI,
22
+ 'classJ-show': classOptions.showJ,
23
+ }"
24
+ >
25
+ <img
26
+ v-if="classOptions.showJ || classOptions.showI"
27
+ class="ArsenalImg-classIJ"
28
+ mode="widthFix"
29
+ :src="item['imgUrl']"
30
+ alt=""
31
+ :style="{
32
+ borderRadius: props.cornerStyle + 'px',
33
+ }"
34
+ @click="linkClick(item)"
35
+ />
36
+ <img
37
+ v-else
38
+ class="ArsenalImg"
39
+ mode="widthFix"
40
+ :src="item['imgUrl']"
41
+ alt=""
42
+ :style="{
43
+ borderRadius: props.cornerStyle + 'px',
44
+ }"
45
+ @click="linkClick(item)"
46
+ />
47
+ </div>
48
+ </div>
49
+ </template>
50
+ </div>
51
+ </template>
52
+
53
+ <script>
54
+ import pick from "lodash-es/pick.js";
55
+ import omit from "lodash-es/omit.js";
56
+ import { handlePlat } from "../../utils/index.js";
57
+ import { isEmpty, isUndefined } from "lodash-es";
58
+ export default {
59
+ name: "cyy-ArsenalPicture",
60
+ data() {
61
+ return {
62
+ classOptions: {
63
+ showA: false,
64
+ showB: false,
65
+ showC: false,
66
+ showD: false,
67
+ showE: false,
68
+ showF: false,
69
+ showG: false,
70
+ showH: false,
71
+ showI: false,
72
+ showJ: false,
73
+ },
74
+ imgStyle: {
75
+ width: "100%",
76
+ boxSizing: "border-box",
77
+ },
78
+ };
79
+ },
80
+ props: {
81
+ props: {
82
+ showStyle: Number, //展示风格
83
+ cornerStyle: Number, //边角样式
84
+ spacing: Number, //图片间距 @unwhrite@
85
+ marginTop: Number, //上边距
86
+ marginBottom: Number, //下边距
87
+ selectImg: Array, //添加图片
88
+ defaultValue: Array,
89
+ },
90
+ },
91
+ mounted() {
92
+ console.log(this.props, 2007);
93
+ this.whitchClass();
94
+ },
95
+ computed: {
96
+ resultArr() {
97
+ const { selectImg, defaultValue } = this.props;
98
+ const computedArr = selectImg.filter((item) => !isUndefined(item)).filter((item) => !Object.values(item).every((citem) => isUndefined(citem)));
99
+ let arr = defaultValue;
100
+ if (!isEmpty(computedArr)) {
101
+ arr = computedArr;
102
+ }
103
+ console.log(52, arr);
104
+ return arr;
105
+ },
106
+ },
107
+ methods: {
108
+ whitchClass() {
109
+ if (this.props.showStyle === 1) {
110
+ if (this.props.spacing != 0) {
111
+ this.classOptions.showJ = true;
112
+ return;
113
+ }
114
+ this.classOptions.showI = true;
115
+ return;
116
+ }
117
+ if (this.props.spacing != 0) {
118
+ switch (this.props.selectImg.length) {
119
+ case 1:
120
+ this.classOptions.showE = true;
121
+ break;
122
+ case 2:
123
+ this.classOptions.showF = true;
124
+ break;
125
+ case 3:
126
+ this.classOptions.showG = true;
127
+ break;
128
+ case 4:
129
+ this.classOptions.showH = true;
130
+ break;
131
+ default:
132
+ }
133
+ return;
134
+ }
135
+ switch (this.resultArr.length) {
136
+ case 1:
137
+ this.classOptions.showA = true;
138
+ break;
139
+ case 2:
140
+ this.classOptions.showB = true;
141
+ break;
142
+ case 3:
143
+ this.classOptions.showC = true;
144
+ break;
145
+ case 4:
146
+ this.classOptions.showD = true;
147
+ break;
148
+ default:
149
+ }
150
+ },
151
+ linkClick(item) {
152
+ this.$emit("linkClick", item);
153
+ },
154
+ },
155
+ };
156
+ </script>
157
+ <style lang="less" scoped>
158
+ .holder {
159
+ width: 100%;
160
+ height: 180px;
161
+ line-height: 180px;
162
+ font-size: 30px;
163
+ background-color: #ccc;
164
+ color: #aaa;
165
+ text-align: center;
166
+ }
167
+ .ArsenalPicture {
168
+ width: 100%;
169
+ display: flex;
170
+ justify-content: space-between;
171
+ .classA-show {
172
+ aspect-ratio: 1 / 1; /* 设置宽高比为1:1 */
173
+ width: 100%;
174
+ color: red;
175
+ }
176
+ .classB-show {
177
+ aspect-ratio: 1 / 1; /* 设置宽高比为1:1 */
178
+ width: 50%;
179
+ color: orange;
180
+ }
181
+ .classC-show {
182
+ aspect-ratio: 1 / 1; /* 设置宽高比为1:1 */
183
+ width: 33.33%;
184
+ color: yellow;
185
+ }
186
+ .classD-show {
187
+ aspect-ratio: 1 / 1; /* 设置宽高比为1:1 */
188
+ width: 25%;
189
+ }
190
+ .classE-show {
191
+ height: 392px;
192
+ width: 392px;
193
+ }
194
+ .classF-show {
195
+ height: 180px;
196
+ width: 180px;
197
+ }
198
+ .classG-show {
199
+ height: 120px;
200
+ width: 120px;
201
+ }
202
+ .classH-show {
203
+ height: 80px;
204
+ width: 80px;
205
+ }
206
+ .ArsenalImg {
207
+ width: 100%;
208
+ height: 100% !important;
209
+ }
210
+ }
211
+ .ArsenalPicture-colunm {
212
+ width: 100%;
213
+ .classI-show {
214
+ width: 100%;
215
+ }
216
+ .classJ-show {
217
+ width: 100%;
218
+ margin-bottom: 20px;
219
+ }
220
+ .ArsenalImg {
221
+ width: 100%;
222
+ height: 100% !important;
223
+ }
224
+ .ArsenalImg-classIJ {
225
+ width: 100%;
226
+ }
227
+ }
228
+ </style>