|
|
@@ -1,9 +1,73 @@
|
|
|
<template>
|
|
|
<div class="go-decorates-more-countdown">
|
|
|
- <div>剩余时间</div>
|
|
|
<n-countdown :duration="50000" :active="true" />
|
|
|
- <flipper :front-text="9" ref="flipperRef" />
|
|
|
- <div>。</div>
|
|
|
+ <n-space :gap="10">
|
|
|
+ <flipper
|
|
|
+ :front-text="9"
|
|
|
+ :width="flipperWidth"
|
|
|
+ :height="flipperHeight"
|
|
|
+ :front-color="flipperTextColor"
|
|
|
+ :back-color="flipperBgColor"
|
|
|
+ :radius="flipperRadius"
|
|
|
+ :duration="flipperSpeed"
|
|
|
+ ref="flipperRef"
|
|
|
+ />
|
|
|
+ <flipper
|
|
|
+ :front-text="9"
|
|
|
+ :back-text="8"
|
|
|
+ :width="flipperWidth"
|
|
|
+ :height="flipperHeight"
|
|
|
+ :front-color="flipperTextColor"
|
|
|
+ :back-color="flipperBgColor"
|
|
|
+ :radius="flipperRadius"
|
|
|
+ :duration="flipperSpeed"
|
|
|
+ ref="flipperRef2"
|
|
|
+ />
|
|
|
+ <flipper
|
|
|
+ :front-text="8"
|
|
|
+ :back-text="7"
|
|
|
+ :width="flipperWidth"
|
|
|
+ :height="flipperHeight"
|
|
|
+ :front-color="flipperTextColor"
|
|
|
+ :back-color="flipperBgColor"
|
|
|
+ :radius="flipperRadius"
|
|
|
+ :duration="flipperSpeed"
|
|
|
+ ref="flipperRef3"
|
|
|
+ />
|
|
|
+ <flipper
|
|
|
+ :front-text="7"
|
|
|
+ :back-text="7"
|
|
|
+ :width="flipperWidth"
|
|
|
+ :height="flipperHeight"
|
|
|
+ :front-color="flipperTextColor"
|
|
|
+ :back-color="flipperBgColor"
|
|
|
+ :radius="flipperRadius"
|
|
|
+ :duration="flipperSpeed"
|
|
|
+ ref="flipperRef4"
|
|
|
+ />
|
|
|
+ <flipper
|
|
|
+ :front-text="6"
|
|
|
+ :back-text="5"
|
|
|
+ :width="flipperWidth"
|
|
|
+ :height="flipperHeight"
|
|
|
+ :front-color="flipperTextColor"
|
|
|
+ :back-color="flipperBgColor"
|
|
|
+ :radius="flipperRadius"
|
|
|
+ :duration="flipperSpeed"
|
|
|
+ ref="flipperRef5"
|
|
|
+ />
|
|
|
+ <flipper
|
|
|
+ :front-text="5"
|
|
|
+ :back-text="4"
|
|
|
+ :width="flipperWidth"
|
|
|
+ :height="flipperHeight"
|
|
|
+ :front-color="flipperTextColor"
|
|
|
+ :back-color="flipperBgColor"
|
|
|
+ :radius="flipperRadius"
|
|
|
+ :duration="flipperSpeed"
|
|
|
+ ref="flipperRef6"
|
|
|
+ />
|
|
|
+ </n-space>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -24,18 +88,9 @@ let boxShadow = ref('none')
|
|
|
|
|
|
const { w, h } = toRefs(props.chartConfig.attr)
|
|
|
|
|
|
-let {
|
|
|
- timeColor,
|
|
|
- timeSize,
|
|
|
- timeLineHeight,
|
|
|
- timeTextIndent,
|
|
|
- fontWeight,
|
|
|
- showShadow,
|
|
|
- hShadow,
|
|
|
- vShadow,
|
|
|
- blurShadow,
|
|
|
- colorShadow
|
|
|
-} = toRefs(props.chartConfig.option)
|
|
|
+let { flipperBgColor, flipperTextColor, flipperWidth, flipperHeight, flipperRadius, flipperSpeed } = toRefs(
|
|
|
+ props.chartConfig.option
|
|
|
+)
|
|
|
|
|
|
watch(
|
|
|
props.chartConfig.option,
|
|
|
@@ -58,7 +113,7 @@ let interval = 0
|
|
|
onMounted(() => {
|
|
|
const interval = window.setInterval(() => {
|
|
|
COUNT--
|
|
|
- if (COUNT === 0) window.clearInterval(interval)
|
|
|
+ if (COUNT <= 1) window.clearInterval(interval)
|
|
|
const flipperCON: any = flipperRef.value
|
|
|
flipperCON?.flipDown(COUNT, COUNT - 1)
|
|
|
}, 1000)
|
|
|
@@ -73,5 +128,9 @@ useChartDataFetch(props.chartConfig, useChartEditStore)
|
|
|
@include go('decorates-more-countdown') {
|
|
|
width: v-bind('`${w}px`');
|
|
|
height: v-bind('`${h}px`');
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
}
|
|
|
</style>
|