unika-components 1.0.213 → 1.0.214

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.
@@ -1,4 +1,8 @@
1
1
 
2
+ .uni-image-component {
3
+ max-width: 100%;
4
+ }
5
+
2
6
  h2.uni-text-component, p.uni-text-component {
3
7
  margin-bottom: 0;
4
8
  }
@@ -11,10 +15,6 @@ button.uni-text-component {
11
15
  white-space: pre-wrap;
12
16
  }
13
17
 
14
- .uni-image-component {
15
- max-width: 100%;
16
- }
17
-
18
18
  .slide-guide {
19
19
  position: absolute;
20
20
  bottom: 90px;
@@ -100,27 +100,6 @@ body, html {
100
100
  color: #666
101
101
  }
102
102
 
103
- .uni-video-component {
104
- position: relative;
105
- text-align: center;
106
- }
107
- .play-pause-button {
108
- position: absolute;
109
- top: 50%;
110
- left: 50%;
111
- transform: translate(-50%, -50%);
112
- cursor: pointer;
113
- font-size: 2rem;
114
- color: #fff;
115
- background: rgba(0, 0, 0, 0.6);
116
- border-radius: 50%;
117
- padding: 10px;
118
- transition: background 0.3s;
119
- }
120
- .play-pause-button:hover {
121
- background: rgba(0, 0, 0, 0.8);
122
- }
123
-
124
103
  .like-button {
125
104
  display: flex;
126
105
  flex-direction: column;
@@ -143,14 +122,32 @@ body, html {
143
122
  color: #333;
144
123
  }
145
124
 
125
+ .uni-video-component {
126
+ position: relative;
127
+ text-align: center;
128
+ }
129
+ .play-pause-button {
130
+ position: absolute;
131
+ top: 50%;
132
+ left: 50%;
133
+ transform: translate(-50%, -50%);
134
+ cursor: pointer;
135
+ font-size: 2rem;
136
+ color: #fff;
137
+ background: rgba(0, 0, 0, 0.6);
138
+ border-radius: 50%;
139
+ padding: 10px;
140
+ transition: background 0.3s;
141
+ }
142
+ .play-pause-button:hover {
143
+ background: rgba(0, 0, 0, 0.8);
144
+ }
145
+
146
146
  .effect {
147
147
  width: 100%;
148
148
  height: 100%;
149
149
  }
150
150
 
151
- .uni-build-up-component {
152
- }
153
-
154
151
  .ant-input-number {
155
152
  box-sizing: border-box;
156
153
  margin: 0;
@@ -185,10 +182,9 @@ body, html {
185
182
  margin-bottom: 0px;
186
183
  vertical-align: top;
187
184
  }
188
-
189
- .uni-svg-component {
190
- display: inline-block;
191
- }
185
+
186
+ .uni-build-up-component {
187
+ }
192
188
 
193
189
  .swiper-warp {
194
190
  width: 100%;
@@ -203,6 +199,10 @@ body, html {
203
199
  max-width: 100%;
204
200
  max-height: 100%;
205
201
  }
202
+
203
+ .uni-svg-component {
204
+ display: inline-block;
205
+ }
206
206
  /**
207
207
  * Swiper 6.8.4
208
208
  * Most modern mobile touch slider and framework with hardware accelerated transitions
@@ -5384,7 +5384,7 @@ function render$m(_ctx, _cache, $props, $setup, $data, $options) {
5384
5384
  return (openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
5385
5385
  onClick: withModifiers(_ctx.handleClick, ["prevent"]),
5386
5386
  style: normalizeStyle$1(_ctx.styleProps),
5387
- class: "uni-text-component"
5387
+ class: "uni-text-component inner-component"
5388
5388
  }, {
5389
5389
  default: withCtx(() => [
5390
5390
  createTextVNode(toDisplayString(_ctx.text), 1 /* TEXT */)
@@ -13063,25 +13063,32 @@ var script$h = defineComponent({
13063
13063
  };
13064
13064
  const element = componentRefs.value.get('component-' + component.id);
13065
13065
  if (element) {
13066
- element.style.cssText = getComputedCSSText(animationStyle) + getComputedCSSText(oldStyle);
13067
- animIdx++;
13066
+ const innerElement = element.querySelector('.inner-component');
13067
+ if (innerElement) {
13068
+ // element.style.cssText = getComputedCSSText(animationStyle) + getComputedCSSText(oldStyle);
13069
+ innerElement.style.cssText = getComputedCSSText(animationStyle);
13070
+ animIdx++;
13071
+ }
13068
13072
  }
13069
13073
  }
13070
13074
  else {
13071
13075
  const element = componentRefs.value.get('component-' + component.id);
13072
13076
  if (element) {
13073
- // 恢复静态布局并移除 transform 属性
13074
- oldStyle.position = 'static';
13075
- delete oldStyle.transform;
13076
- element.style.cssText = getComputedCSSText(oldStyle);
13077
+ const innerElement = element.querySelector('.inner-component');
13078
+ if (innerElement) {
13079
+ element.style.cssText = getComputedCSSText(oldStyle);
13080
+ }
13077
13081
  }
13078
13082
  }
13079
13083
  };
13080
13084
  runAnimation();
13081
13085
  const element = componentRefs.value.get('component-' + component.id);
13082
13086
  if (element) {
13083
- element.addEventListener('animationend', runAnimation, false);
13084
- element.addEventListener('webkitAnimationEnd', runAnimation, false);
13087
+ const innerElement = element.querySelector('.inner-component');
13088
+ if (innerElement) {
13089
+ innerElement.addEventListener('animationend', runAnimation, false);
13090
+ innerElement.addEventListener('webkitAnimationEnd', runAnimation, false);
13091
+ }
13085
13092
  }
13086
13093
  });
13087
13094
  };
@@ -5391,7 +5391,7 @@
5391
5391
  return (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.tag), {
5392
5392
  onClick: vue.withModifiers(_ctx.handleClick, ["prevent"]),
5393
5393
  style: vue.normalizeStyle(_ctx.styleProps),
5394
- class: "uni-text-component"
5394
+ class: "uni-text-component inner-component"
5395
5395
  }, {
5396
5396
  default: vue.withCtx(() => [
5397
5397
  vue.createTextVNode(vue.toDisplayString(_ctx.text), 1 /* TEXT */)
@@ -13070,25 +13070,32 @@
13070
13070
  };
13071
13071
  const element = componentRefs.value.get('component-' + component.id);
13072
13072
  if (element) {
13073
- element.style.cssText = getComputedCSSText(animationStyle) + getComputedCSSText(oldStyle);
13074
- animIdx++;
13073
+ const innerElement = element.querySelector('.inner-component');
13074
+ if (innerElement) {
13075
+ // element.style.cssText = getComputedCSSText(animationStyle) + getComputedCSSText(oldStyle);
13076
+ innerElement.style.cssText = getComputedCSSText(animationStyle);
13077
+ animIdx++;
13078
+ }
13075
13079
  }
13076
13080
  }
13077
13081
  else {
13078
13082
  const element = componentRefs.value.get('component-' + component.id);
13079
13083
  if (element) {
13080
- // 恢复静态布局并移除 transform 属性
13081
- oldStyle.position = 'static';
13082
- delete oldStyle.transform;
13083
- element.style.cssText = getComputedCSSText(oldStyle);
13084
+ const innerElement = element.querySelector('.inner-component');
13085
+ if (innerElement) {
13086
+ element.style.cssText = getComputedCSSText(oldStyle);
13087
+ }
13084
13088
  }
13085
13089
  }
13086
13090
  };
13087
13091
  runAnimation();
13088
13092
  const element = componentRefs.value.get('component-' + component.id);
13089
13093
  if (element) {
13090
- element.addEventListener('animationend', runAnimation, false);
13091
- element.addEventListener('webkitAnimationEnd', runAnimation, false);
13094
+ const innerElement = element.querySelector('.inner-component');
13095
+ if (innerElement) {
13096
+ innerElement.addEventListener('animationend', runAnimation, false);
13097
+ innerElement.addEventListener('webkitAnimationEnd', runAnimation, false);
13098
+ }
13092
13099
  }
13093
13100
  });
13094
13101
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unika-components",
3
- "version": "1.0.213",
3
+ "version": "1.0.214",
4
4
  "private": false,
5
5
  "main": "dist/unika-components.umd.js",
6
6
  "module": "dist/unika-components.esm.js",