unika-components 1.0.159 → 1.0.161
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.
|
@@ -16,7 +16,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
16
16
|
onSwiper: (swiper: any) => void;
|
|
17
17
|
modules: import("swiper/types").SwiperComponent[];
|
|
18
18
|
direction: string;
|
|
19
|
-
effect: string;
|
|
20
19
|
upArrow: import("vue").Ref<boolean>;
|
|
21
20
|
slideChangeTransitionEnd: (e: any) => void;
|
|
22
21
|
slideClasses: (index: number) => string[];
|
|
@@ -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
|
}
|
|
@@ -10,27 +14,6 @@ button.uni-text-component {
|
|
|
10
14
|
box-sizing: border-box;
|
|
11
15
|
white-space: pre-wrap;
|
|
12
16
|
}
|
|
13
|
-
|
|
14
|
-
.uni-video-component {
|
|
15
|
-
position: relative;
|
|
16
|
-
text-align: center;
|
|
17
|
-
}
|
|
18
|
-
.play-pause-button {
|
|
19
|
-
position: absolute;
|
|
20
|
-
top: 50%;
|
|
21
|
-
left: 50%;
|
|
22
|
-
transform: translate(-50%, -50%);
|
|
23
|
-
cursor: pointer;
|
|
24
|
-
font-size: 2rem;
|
|
25
|
-
color: #fff;
|
|
26
|
-
background: rgba(0, 0, 0, 0.6);
|
|
27
|
-
border-radius: 50%;
|
|
28
|
-
padding: 10px;
|
|
29
|
-
transition: background 0.3s;
|
|
30
|
-
}
|
|
31
|
-
.play-pause-button:hover {
|
|
32
|
-
background: rgba(0, 0, 0, 0.8);
|
|
33
|
-
}
|
|
34
17
|
|
|
35
18
|
.slide-guide {
|
|
36
19
|
position: absolute;
|
|
@@ -104,15 +87,6 @@ body, html {
|
|
|
104
87
|
transform: translate3d(-50%, -50%, 0);
|
|
105
88
|
}
|
|
106
89
|
}
|
|
107
|
-
|
|
108
|
-
.uni-image-component {
|
|
109
|
-
max-width: 100%;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.effect {
|
|
113
|
-
width: 100%;
|
|
114
|
-
height: 100%;
|
|
115
|
-
}
|
|
116
90
|
|
|
117
91
|
|
|
118
92
|
.uni-calendar-component {
|
|
@@ -126,6 +100,27 @@ body, html {
|
|
|
126
100
|
color: #666
|
|
127
101
|
}
|
|
128
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
|
+
|
|
129
124
|
.like-button {
|
|
130
125
|
display: flex;
|
|
131
126
|
flex-direction: column;
|
|
@@ -162,6 +157,11 @@ body, html {
|
|
|
162
157
|
max-height: 100%;
|
|
163
158
|
}
|
|
164
159
|
|
|
160
|
+
.effect {
|
|
161
|
+
width: 100%;
|
|
162
|
+
height: 100%;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
165
|
.ant-input-number {
|
|
166
166
|
box-sizing: border-box;
|
|
167
167
|
margin: 0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed, defineComponent, openBlock, createBlock, resolveDynamicComponent, withModifiers, normalizeStyle as normalizeStyle$1, withCtx, createTextVNode, toDisplayString, createElementBlock, Fragment, renderList, normalizeProps, guardReactiveProps, h as h$2, ref, onUpdated, watch, nextTick as nextTick$1, onMounted, onBeforeUnmount, onBeforeUpdate, resolveComponent, createVNode, normalizeClass, createElementVNode, createCommentVNode, renderSlot, pushScopeId, popScopeId, toRefs, onBeforeMount, onUnmounted, withDirectives, vShow, isVNode, Comment, Text, reactive, getCurrentInstance, inject, provide, unref, shallowRef, watchEffect, triggerRef, Transition, resolveDirective, cloneVNode, toRef, Teleport, isRef, toRaw, render as render$m, TransitionGroup
|
|
1
|
+
import { computed, defineComponent, openBlock, createBlock, resolveDynamicComponent, withModifiers, normalizeStyle as normalizeStyle$1, withCtx, createTextVNode, toDisplayString, createElementBlock, Fragment, renderList, normalizeProps, guardReactiveProps, h as h$2, ref, onUpdated, watch, nextTick as nextTick$1, onMounted, onBeforeUnmount, onBeforeUpdate, resolveComponent, createVNode, normalizeClass, createElementVNode, mergeProps, createCommentVNode, renderSlot, pushScopeId, popScopeId, toRefs, onBeforeMount, onUnmounted, withDirectives, vShow, isVNode, Comment, Text, reactive, getCurrentInstance, inject, provide, unref, shallowRef, watchEffect, triggerRef, Transition, resolveDirective, cloneVNode, toRef, Teleport, isRef, toRaw, render as render$m, TransitionGroup } from 'vue';
|
|
2
2
|
import crypto from 'crypto';
|
|
3
3
|
|
|
4
4
|
/** Detect free variable `global` from Node.js. */
|
|
@@ -13023,14 +13023,14 @@ var script$g = defineComponent({
|
|
|
13023
13023
|
};
|
|
13024
13024
|
const upArrow = ref(true);
|
|
13025
13025
|
const runAnimations = (currentIndex) => {
|
|
13026
|
-
|
|
13026
|
+
const pages = cloneDeep$1(props.work && props.work.pages);
|
|
13027
13027
|
pages[currentIndex].components && pages[currentIndex].components.forEach((component) => {
|
|
13028
13028
|
const animationQueue = component.animations || [];
|
|
13029
13029
|
const len = animationQueue.length;
|
|
13030
13030
|
if (len === 0)
|
|
13031
13031
|
return;
|
|
13032
13032
|
let animIdx = 0;
|
|
13033
|
-
|
|
13033
|
+
component.props || {};
|
|
13034
13034
|
const runAnimation = () => {
|
|
13035
13035
|
if (animIdx < len) {
|
|
13036
13036
|
const animation = animationQueue[animIdx];
|
|
@@ -13041,20 +13041,28 @@ var script$g = defineComponent({
|
|
|
13041
13041
|
animationDelay: `${animation.delay}s`,
|
|
13042
13042
|
animationFillMode: 'both'
|
|
13043
13043
|
};
|
|
13044
|
-
componentRefs.value.get('component-' + component.id)
|
|
13045
|
-
|
|
13044
|
+
const element = componentRefs.value.get('component-' + component.id);
|
|
13045
|
+
if (element) {
|
|
13046
|
+
// element.style.cssText = getComputedCSSText(animationStyle) + getComputedCSSText(oldStyle);
|
|
13047
|
+
element.style.cssText = getComputedCSSText(animationStyle);
|
|
13048
|
+
animIdx++;
|
|
13049
|
+
}
|
|
13046
13050
|
}
|
|
13047
13051
|
else {
|
|
13048
|
-
componentRefs.value.get('component-' + component.id)
|
|
13052
|
+
componentRefs.value.get('component-' + component.id);
|
|
13049
13053
|
}
|
|
13050
13054
|
};
|
|
13051
13055
|
runAnimation();
|
|
13052
|
-
componentRefs.value.get('component-' + component.id)
|
|
13053
|
-
|
|
13056
|
+
const element = componentRefs.value.get('component-' + component.id);
|
|
13057
|
+
if (element) {
|
|
13058
|
+
element.addEventListener('animationend', runAnimation, false);
|
|
13059
|
+
element.addEventListener('webkitAnimationEnd', runAnimation, false);
|
|
13060
|
+
}
|
|
13054
13061
|
});
|
|
13055
13062
|
};
|
|
13056
13063
|
const onSlideChange = (swiper) => {
|
|
13057
13064
|
const currentIndex = swiper.activeIndex;
|
|
13065
|
+
console.log('Slide changed to:', currentIndex); // 添加调试信息
|
|
13058
13066
|
runAnimations(currentIndex);
|
|
13059
13067
|
if (currentIndex === swiper.slides.length - 1) {
|
|
13060
13068
|
upArrow.value = false;
|
|
@@ -13062,22 +13070,19 @@ var script$g = defineComponent({
|
|
|
13062
13070
|
else {
|
|
13063
13071
|
upArrow.value = true;
|
|
13064
13072
|
}
|
|
13065
|
-
// swiper.swiperAnimation.animate();
|
|
13066
13073
|
swiperAnimate(swiper);
|
|
13067
13074
|
};
|
|
13068
13075
|
const slideChangeTransitionEnd = (e) => {
|
|
13069
13076
|
swiperAnimate(e);
|
|
13070
13077
|
};
|
|
13071
13078
|
const onSwiper = (swiper) => {
|
|
13072
|
-
// swiper.swiperAnimation = new SwiperAnimation();
|
|
13073
|
-
// swiper.swiperAnimation.init(swiper).animate();
|
|
13074
13079
|
swiperAnimateCache();
|
|
13075
13080
|
swiperAnimate(swiper);
|
|
13076
13081
|
const currentIndex = swiper.activeIndex;
|
|
13077
13082
|
runAnimations(currentIndex);
|
|
13078
13083
|
};
|
|
13079
13084
|
const direction = 'vertical';
|
|
13080
|
-
const effect = 'fade'
|
|
13085
|
+
// const effect = 'fade'
|
|
13081
13086
|
const slideClasses = (index) => {
|
|
13082
13087
|
return ['swiper-slide', `slide-${index}`];
|
|
13083
13088
|
};
|
|
@@ -13088,7 +13093,7 @@ var script$g = defineComponent({
|
|
|
13088
13093
|
onSwiper,
|
|
13089
13094
|
modules: [EffectFade],
|
|
13090
13095
|
direction,
|
|
13091
|
-
effect,
|
|
13096
|
+
// effect,
|
|
13092
13097
|
upArrow,
|
|
13093
13098
|
slideChangeTransitionEnd,
|
|
13094
13099
|
slideClasses
|
|
@@ -13137,13 +13142,14 @@ function render$h(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
13137
13142
|
(openBlock(true), createElementBlock(Fragment, null, renderList(page.components, (item) => {
|
|
13138
13143
|
return (openBlock(), createElementBlock("div", {
|
|
13139
13144
|
key: item.id,
|
|
13140
|
-
id: `component-${item.id}`,
|
|
13141
13145
|
ref_for: true,
|
|
13142
13146
|
ref: _ctx.setComponentRef,
|
|
13147
|
+
id: `component-${item.id}`,
|
|
13143
13148
|
style: {"width":"100%","height":"100%"}
|
|
13144
13149
|
}, [
|
|
13145
|
-
|
|
13146
|
-
|
|
13150
|
+
(item.name != 'uni-build-up')
|
|
13151
|
+
? (openBlock(), createBlock(resolveDynamicComponent(item.name), normalizeProps(mergeProps({ key: 0 }, item.props)), null, 16 /* FULL_PROPS */))
|
|
13152
|
+
: createCommentVNode("v-if", true)
|
|
13147
13153
|
], 8 /* PROPS */, _hoisted_2$3))
|
|
13148
13154
|
}), 128 /* KEYED_FRAGMENT */))
|
|
13149
13155
|
], 4 /* STYLE */)
|
|
@@ -13030,14 +13030,14 @@
|
|
|
13030
13030
|
};
|
|
13031
13031
|
const upArrow = vue.ref(true);
|
|
13032
13032
|
const runAnimations = (currentIndex) => {
|
|
13033
|
-
|
|
13033
|
+
const pages = cloneDeep$1(props.work && props.work.pages);
|
|
13034
13034
|
pages[currentIndex].components && pages[currentIndex].components.forEach((component) => {
|
|
13035
13035
|
const animationQueue = component.animations || [];
|
|
13036
13036
|
const len = animationQueue.length;
|
|
13037
13037
|
if (len === 0)
|
|
13038
13038
|
return;
|
|
13039
13039
|
let animIdx = 0;
|
|
13040
|
-
|
|
13040
|
+
component.props || {};
|
|
13041
13041
|
const runAnimation = () => {
|
|
13042
13042
|
if (animIdx < len) {
|
|
13043
13043
|
const animation = animationQueue[animIdx];
|
|
@@ -13048,20 +13048,28 @@
|
|
|
13048
13048
|
animationDelay: `${animation.delay}s`,
|
|
13049
13049
|
animationFillMode: 'both'
|
|
13050
13050
|
};
|
|
13051
|
-
componentRefs.value.get('component-' + component.id)
|
|
13052
|
-
|
|
13051
|
+
const element = componentRefs.value.get('component-' + component.id);
|
|
13052
|
+
if (element) {
|
|
13053
|
+
// element.style.cssText = getComputedCSSText(animationStyle) + getComputedCSSText(oldStyle);
|
|
13054
|
+
element.style.cssText = getComputedCSSText(animationStyle);
|
|
13055
|
+
animIdx++;
|
|
13056
|
+
}
|
|
13053
13057
|
}
|
|
13054
13058
|
else {
|
|
13055
|
-
componentRefs.value.get('component-' + component.id)
|
|
13059
|
+
componentRefs.value.get('component-' + component.id);
|
|
13056
13060
|
}
|
|
13057
13061
|
};
|
|
13058
13062
|
runAnimation();
|
|
13059
|
-
componentRefs.value.get('component-' + component.id)
|
|
13060
|
-
|
|
13063
|
+
const element = componentRefs.value.get('component-' + component.id);
|
|
13064
|
+
if (element) {
|
|
13065
|
+
element.addEventListener('animationend', runAnimation, false);
|
|
13066
|
+
element.addEventListener('webkitAnimationEnd', runAnimation, false);
|
|
13067
|
+
}
|
|
13061
13068
|
});
|
|
13062
13069
|
};
|
|
13063
13070
|
const onSlideChange = (swiper) => {
|
|
13064
13071
|
const currentIndex = swiper.activeIndex;
|
|
13072
|
+
console.log('Slide changed to:', currentIndex); // 添加调试信息
|
|
13065
13073
|
runAnimations(currentIndex);
|
|
13066
13074
|
if (currentIndex === swiper.slides.length - 1) {
|
|
13067
13075
|
upArrow.value = false;
|
|
@@ -13069,22 +13077,19 @@
|
|
|
13069
13077
|
else {
|
|
13070
13078
|
upArrow.value = true;
|
|
13071
13079
|
}
|
|
13072
|
-
// swiper.swiperAnimation.animate();
|
|
13073
13080
|
swiperAnimate(swiper);
|
|
13074
13081
|
};
|
|
13075
13082
|
const slideChangeTransitionEnd = (e) => {
|
|
13076
13083
|
swiperAnimate(e);
|
|
13077
13084
|
};
|
|
13078
13085
|
const onSwiper = (swiper) => {
|
|
13079
|
-
// swiper.swiperAnimation = new SwiperAnimation();
|
|
13080
|
-
// swiper.swiperAnimation.init(swiper).animate();
|
|
13081
13086
|
swiperAnimateCache();
|
|
13082
13087
|
swiperAnimate(swiper);
|
|
13083
13088
|
const currentIndex = swiper.activeIndex;
|
|
13084
13089
|
runAnimations(currentIndex);
|
|
13085
13090
|
};
|
|
13086
13091
|
const direction = 'vertical';
|
|
13087
|
-
const effect = 'fade'
|
|
13092
|
+
// const effect = 'fade'
|
|
13088
13093
|
const slideClasses = (index) => {
|
|
13089
13094
|
return ['swiper-slide', `slide-${index}`];
|
|
13090
13095
|
};
|
|
@@ -13095,7 +13100,7 @@
|
|
|
13095
13100
|
onSwiper,
|
|
13096
13101
|
modules: [EffectFade],
|
|
13097
13102
|
direction,
|
|
13098
|
-
effect,
|
|
13103
|
+
// effect,
|
|
13099
13104
|
upArrow,
|
|
13100
13105
|
slideChangeTransitionEnd,
|
|
13101
13106
|
slideClasses
|
|
@@ -13144,13 +13149,14 @@
|
|
|
13144
13149
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(page.components, (item) => {
|
|
13145
13150
|
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
13146
13151
|
key: item.id,
|
|
13147
|
-
id: `component-${item.id}`,
|
|
13148
13152
|
ref_for: true,
|
|
13149
13153
|
ref: _ctx.setComponentRef,
|
|
13154
|
+
id: `component-${item.id}`,
|
|
13150
13155
|
style: {"width":"100%","height":"100%"}
|
|
13151
13156
|
}, [
|
|
13152
|
-
|
|
13153
|
-
|
|
13157
|
+
(item.name != 'uni-build-up')
|
|
13158
|
+
? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(item.name), vue.normalizeProps(vue.mergeProps({ key: 0 }, item.props)), null, 16 /* FULL_PROPS */))
|
|
13159
|
+
: vue.createCommentVNode("v-if", true)
|
|
13154
13160
|
], 8 /* PROPS */, _hoisted_2$3))
|
|
13155
13161
|
}), 128 /* KEYED_FRAGMENT */))
|
|
13156
13162
|
], 4 /* STYLE */)
|