unika-components 1.0.312 → 1.0.314

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.
@@ -21,7 +21,6 @@ declare const _default: import("vue").DefineComponent<{
21
21
  Controller: import("swiper/types").SwiperComponent;
22
22
  direction: string;
23
23
  upArrow: import("vue").Ref<boolean>;
24
- slideChangeTransitionEnd: (e: any) => void;
25
24
  slideClasses: (index: number) => string[];
26
25
  filterProps: (props: Record<string, any>, keysToFilter: string[], isFilter: true) => Record<string, any>;
27
26
  switchPage: (index: number) => void;
@@ -1,11 +1,4 @@
1
1
 
2
- .uni-image-component {
3
- max-width: 100%;
4
- }
5
- .uni-image-mask-wrapper {
6
- display: inline-block;
7
- }
8
-
9
2
  h2.uni-text-component, p.uni-text-component {
10
3
  margin-top: 0;
11
4
  margin-bottom: 0;
@@ -18,39 +11,6 @@ button.uni-text-component {
18
11
  box-sizing: border-box;
19
12
  white-space: pre-wrap;
20
13
  }
21
-
22
- .uni-video-component {
23
- position: relative;
24
- text-align: center;
25
- }
26
- .play-pause-button {
27
- position: absolute;
28
- top: 50%;
29
- left: 50%;
30
- transform: translate(-50%, -50%);
31
- cursor: pointer;
32
- font-size: 2rem;
33
- color: #fff;
34
- background: rgba(0, 0, 0, 0.6);
35
- border-radius: 50%;
36
- padding: 10px;
37
- transition: background 0.3s;
38
- }
39
- .play-pause-button:hover {
40
- background: rgba(0, 0, 0, 0.8);
41
- }
42
-
43
-
44
- .uni-calendar-component {
45
-
46
- }
47
- .slot-number {
48
- position: absolute;
49
- bottom: 2px;
50
- left: 7px;
51
- font-size: 12px;
52
- color: #666
53
- }
54
14
 
55
15
  .slide-guide {
56
16
  position: absolute;
@@ -135,27 +95,45 @@ body, html {
135
95
  .edit-wrapper .uni-lotties-component, .edit-wrapper .uni-like-component, .edit-wrapper .uni-background-component, .edit-wrapper .uni-svg-component, .edit-wrapper .uni-register-form-component{
136
96
  position: static !important;
137
97
  }
98
+
99
+ .uni-image-component {
100
+ max-width: 100%;
101
+ }
102
+ .uni-image-mask-wrapper {
103
+ display: inline-block;
104
+ }
138
105
 
139
- .like-button {
140
- display: flex;
141
- flex-direction: column;
142
- align-items: center;
143
- cursor: pointer;
144
- }
106
+ .uni-video-component {
107
+ position: relative;
108
+ text-align: center;
109
+ }
110
+ .play-pause-button {
111
+ position: absolute;
112
+ top: 50%;
113
+ left: 50%;
114
+ transform: translate(-50%, -50%);
115
+ cursor: pointer;
116
+ font-size: 2rem;
117
+ color: #fff;
118
+ background: rgba(0, 0, 0, 0.6);
119
+ border-radius: 50%;
120
+ padding: 10px;
121
+ transition: background 0.3s;
122
+ }
123
+ .play-pause-button:hover {
124
+ background: rgba(0, 0, 0, 0.8);
125
+ }
145
126
 
146
- .icon-heart {
147
- font-size: 24px;
148
- color: #e74c3c;
149
- }
150
127
 
151
- .liked {
152
- color: #f00; /* 更改颜色以示已赞 */
153
- }
128
+ .uni-calendar-component {
154
129
 
155
- .like-count {
156
- margin-top: 4px;
157
- font-size: 16px;
158
- color: #333;
130
+ }
131
+ .slot-number {
132
+ position: absolute;
133
+ bottom: 2px;
134
+ left: 7px;
135
+ font-size: 12px;
136
+ color: #666
159
137
  }
160
138
 
161
139
  .ant-input-number {
@@ -217,6 +195,28 @@ body, html {
217
195
  max-height: 100%;
218
196
  }
219
197
 
198
+ .like-button {
199
+ display: flex;
200
+ flex-direction: column;
201
+ align-items: center;
202
+ cursor: pointer;
203
+ }
204
+
205
+ .icon-heart {
206
+ font-size: 24px;
207
+ color: #e74c3c;
208
+ }
209
+
210
+ .liked {
211
+ color: #f00; /* 更改颜色以示已赞 */
212
+ }
213
+
214
+ .like-count {
215
+ margin-top: 4px;
216
+ font-size: 16px;
217
+ color: #333;
218
+ }
219
+
220
220
  .uni-build-up-component {
221
221
  }
222
222
 
@@ -13211,15 +13211,6 @@ var SwiperSlide = {
13211
13211
  };
13212
13212
 
13213
13213
  //隐藏元素
13214
- const swiperAnimateCache = () => {
13215
- const allBoxes = window.document.documentElement.querySelectorAll(".animation");
13216
- for (let i = 0; i < allBoxes.length; i++) {
13217
- allBoxes[i].attributes["style"]
13218
- ? allBoxes[i].setAttribute("swiper-animate-style-cache", allBoxes[i].attributes["style"].value)
13219
- : allBoxes[i].setAttribute("swiper-animate-style-cache", " ");
13220
- allBoxes[i].style.visibility = "hidden";
13221
- }
13222
- };
13223
13214
  // 开始动画
13224
13215
  const swiperAnimate = (a) => {
13225
13216
  //每次添加的时候先把样式清除一遍
@@ -13256,7 +13247,7 @@ const clearSwiperAnimate = () => {
13256
13247
  }
13257
13248
  };
13258
13249
 
13259
- SwiperCore.use([Pagination$1, EffectFade]);
13250
+ SwiperCore.use([Pagination$1, EffectFade, Controller$1]);
13260
13251
  function getComputedCSSText(style) {
13261
13252
  let cssText = '';
13262
13253
  for (const attr in style) {
@@ -13377,10 +13368,22 @@ var script$h = defineComponent({
13377
13368
  };
13378
13369
  const onSlideChange = (swiper) => {
13379
13370
  const currentIndex = swiper.activeIndex;
13371
+ currentPage.value = (currentIndex - 1);
13372
+ if (currentPage.value == totalPages.value) {
13373
+ currentPage.value = 0;
13374
+ }
13380
13375
  console.log('aaaaaaaa');
13376
+ console.log(totalPages.value);
13381
13377
  console.log(currentIndex);
13382
- runAnimations(currentIndex);
13383
- callUniLottiesPlay(currentIndex);
13378
+ console.log(currentPage.value);
13379
+ sendPageInfo();
13380
+ try {
13381
+ runAnimations(currentIndex);
13382
+ callUniLottiesPlay(currentIndex);
13383
+ }
13384
+ catch (error) {
13385
+ console.error("Error in onSlideChange:", error);
13386
+ }
13384
13387
  if (currentIndex === swiper.slides.length - 1) {
13385
13388
  upArrow.value = false;
13386
13389
  }
@@ -13388,20 +13391,23 @@ var script$h = defineComponent({
13388
13391
  upArrow.value = true;
13389
13392
  }
13390
13393
  swiperAnimate(swiper);
13391
- currentPage.value = currentIndex - 1;
13392
- sendPageInfo();
13393
- };
13394
- const slideChangeTransitionEnd = (e) => {
13395
- swiperAnimate(e);
13396
13394
  };
13395
+ // const slideChangeTransitionEnd = (e: any) => {
13396
+ // swiperAnimate(e);
13397
+ // }
13397
13398
  const controlledSwiper = ref();
13398
13399
  const onSwiper = (swiper) => {
13399
13400
  controlledSwiper.value = swiper;
13400
- swiperAnimateCache();
13401
- swiperAnimate(swiper);
13401
+ // swiperAnimateCache();
13402
+ // swiperAnimate(swiper);
13402
13403
  const currentIndex = swiper.activeIndex;
13403
- runAnimations(currentIndex);
13404
- callUniLottiesPlay(currentIndex);
13404
+ try {
13405
+ runAnimations(currentIndex);
13406
+ callUniLottiesPlay(currentIndex);
13407
+ }
13408
+ catch (error) {
13409
+ console.error("Error in onSlideChange:", error);
13410
+ }
13405
13411
  };
13406
13412
  const direction = 'vertical';
13407
13413
  const slideClasses = (index) => {
@@ -13447,6 +13453,7 @@ var script$h = defineComponent({
13447
13453
  cur: currentPage.value,
13448
13454
  count: totalPages.value,
13449
13455
  }, '*');
13456
+ console.log('bbbbbbbbbbbbbbb');
13450
13457
  console.log(currentPage.value);
13451
13458
  };
13452
13459
  // 监听来自父组件的消息
@@ -13477,7 +13484,7 @@ var script$h = defineComponent({
13477
13484
  Controller: Controller$1,
13478
13485
  direction,
13479
13486
  upArrow,
13480
- slideChangeTransitionEnd,
13487
+ // slideChangeTransitionEnd,
13481
13488
  slideClasses,
13482
13489
  filterProps,
13483
13490
  switchPage
@@ -13218,15 +13218,6 @@
13218
13218
  };
13219
13219
 
13220
13220
  //隐藏元素
13221
- const swiperAnimateCache = () => {
13222
- const allBoxes = window.document.documentElement.querySelectorAll(".animation");
13223
- for (let i = 0; i < allBoxes.length; i++) {
13224
- allBoxes[i].attributes["style"]
13225
- ? allBoxes[i].setAttribute("swiper-animate-style-cache", allBoxes[i].attributes["style"].value)
13226
- : allBoxes[i].setAttribute("swiper-animate-style-cache", " ");
13227
- allBoxes[i].style.visibility = "hidden";
13228
- }
13229
- };
13230
13221
  // 开始动画
13231
13222
  const swiperAnimate = (a) => {
13232
13223
  //每次添加的时候先把样式清除一遍
@@ -13263,7 +13254,7 @@
13263
13254
  }
13264
13255
  };
13265
13256
 
13266
- SwiperCore.use([Pagination$1, EffectFade]);
13257
+ SwiperCore.use([Pagination$1, EffectFade, Controller$1]);
13267
13258
  function getComputedCSSText(style) {
13268
13259
  let cssText = '';
13269
13260
  for (const attr in style) {
@@ -13384,10 +13375,22 @@
13384
13375
  };
13385
13376
  const onSlideChange = (swiper) => {
13386
13377
  const currentIndex = swiper.activeIndex;
13378
+ currentPage.value = (currentIndex - 1);
13379
+ if (currentPage.value == totalPages.value) {
13380
+ currentPage.value = 0;
13381
+ }
13387
13382
  console.log('aaaaaaaa');
13383
+ console.log(totalPages.value);
13388
13384
  console.log(currentIndex);
13389
- runAnimations(currentIndex);
13390
- callUniLottiesPlay(currentIndex);
13385
+ console.log(currentPage.value);
13386
+ sendPageInfo();
13387
+ try {
13388
+ runAnimations(currentIndex);
13389
+ callUniLottiesPlay(currentIndex);
13390
+ }
13391
+ catch (error) {
13392
+ console.error("Error in onSlideChange:", error);
13393
+ }
13391
13394
  if (currentIndex === swiper.slides.length - 1) {
13392
13395
  upArrow.value = false;
13393
13396
  }
@@ -13395,20 +13398,23 @@
13395
13398
  upArrow.value = true;
13396
13399
  }
13397
13400
  swiperAnimate(swiper);
13398
- currentPage.value = currentIndex - 1;
13399
- sendPageInfo();
13400
- };
13401
- const slideChangeTransitionEnd = (e) => {
13402
- swiperAnimate(e);
13403
13401
  };
13402
+ // const slideChangeTransitionEnd = (e: any) => {
13403
+ // swiperAnimate(e);
13404
+ // }
13404
13405
  const controlledSwiper = vue.ref();
13405
13406
  const onSwiper = (swiper) => {
13406
13407
  controlledSwiper.value = swiper;
13407
- swiperAnimateCache();
13408
- swiperAnimate(swiper);
13408
+ // swiperAnimateCache();
13409
+ // swiperAnimate(swiper);
13409
13410
  const currentIndex = swiper.activeIndex;
13410
- runAnimations(currentIndex);
13411
- callUniLottiesPlay(currentIndex);
13411
+ try {
13412
+ runAnimations(currentIndex);
13413
+ callUniLottiesPlay(currentIndex);
13414
+ }
13415
+ catch (error) {
13416
+ console.error("Error in onSlideChange:", error);
13417
+ }
13412
13418
  };
13413
13419
  const direction = 'vertical';
13414
13420
  const slideClasses = (index) => {
@@ -13454,6 +13460,7 @@
13454
13460
  cur: currentPage.value,
13455
13461
  count: totalPages.value,
13456
13462
  }, '*');
13463
+ console.log('bbbbbbbbbbbbbbb');
13457
13464
  console.log(currentPage.value);
13458
13465
  };
13459
13466
  // 监听来自父组件的消息
@@ -13484,7 +13491,7 @@
13484
13491
  Controller: Controller$1,
13485
13492
  direction,
13486
13493
  upArrow,
13487
- slideChangeTransitionEnd,
13494
+ // slideChangeTransitionEnd,
13488
13495
  slideClasses,
13489
13496
  filterProps,
13490
13497
  switchPage
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unika-components",
3
- "version": "1.0.312",
3
+ "version": "1.0.314",
4
4
  "private": false,
5
5
  "main": "dist/unika-components.umd.js",
6
6
  "module": "dist/unika-components.esm.js",