From a610fcd14aac20d178d5d1ac8193e5b3c3c8ea0b Mon Sep 17 00:00:00 2001
From: yangxiaolu1993 <32215990+yangxiaolu1993@users.noreply.github.com>
Date: Thu, 9 Dec 2021 15:59:09 +0800
Subject: [PATCH] =?UTF-8?q?fix(NoticeBar):=20speed=E3=80=81height=20?=
=?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=BA=E6=9F=90=E4=BA=9B=E5=80=BC=E6=97=B6?=
=?UTF-8?q?=EF=BC=8C=E4=B8=8D=E8=A7=A6=E5=8F=91=E6=BB=9A=E5=8A=A8=E9=97=AE?=
=?UTF-8?q?=E9=A2=98=20(#894)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* feat: sku
* feat: 可配置颜色提出
* feat: prop 调整
* fix: noticebar 极限值报错问题修改
---
src/packages/__VUE/countdown/index.vue | 13 +++-------
src/packages/__VUE/noticebar/index.vue | 34 ++++++--------------------
2 files changed, 12 insertions(+), 35 deletions(-)
diff --git a/src/packages/__VUE/countdown/index.vue b/src/packages/__VUE/countdown/index.vue
index c2f8fb87b..b410c26de 100644
--- a/src/packages/__VUE/countdown/index.vue
+++ b/src/packages/__VUE/countdown/index.vue
@@ -12,10 +12,8 @@
天
{{ resttime.h }}:{{ resttime.m }}:{{ resttime.s }}
+ >:{{ resttime.m }}:{{ resttime.s }}
@@ -73,7 +71,7 @@ export default create({
}
},
components: {},
- emits: ['input', 'on-end', 'on-restart', 'on-paused'],
+ emits: ['input', 'on-end', 'on-restart', 'on-paused', 'update:modelValue'],
setup(props, { emit, slots }) {
console.log('componentName', componentName);
@@ -209,10 +207,7 @@ export default create({
const d = ts >= ds ? parseInt(ts / ds) : 0;
const h = ts - d * ds >= hs ? parseInt((ts - d * ds) / hs) : 0;
- const m =
- ts - d * ds - h * hs >= ms
- ? parseInt((ts - d * ds - h * hs) / ms)
- : 0;
+ const m = ts - d * ds - h * hs >= ms ? parseInt((ts - d * ds - h * hs) / ms) : 0;
const s = Math.round((ts - d * ds - h * hs - m * ms) / 1000);
if (d >= 0) rest.d = d + '';
diff --git a/src/packages/__VUE/noticebar/index.vue b/src/packages/__VUE/noticebar/index.vue
index 480370f01..cfe86d05a 100644
--- a/src/packages/__VUE/noticebar/index.vue
+++ b/src/packages/__VUE/noticebar/index.vue
@@ -8,26 +8,14 @@
@click="handleClick"
v-if="direction == 'across'"
>
-
-
+
+
-
+
{
showhorseLamp();
- (state.timer as any) = setInterval(
- showhorseLamp,
- ~~(props.height / props.speed / 4) * 1000 + props.standTime
- );
+ (state.timer as any) = setInterval(showhorseLamp, ~~((props.height / props.speed / 4) * 1000) + props.standTime);
};
const showhorseLamp = () => {
state.animate = true;
@@ -317,7 +299,7 @@ export default create({
state.scrollList.push(state.scrollList[0]);
state.scrollList.shift();
state.animate = false;
- }, ~~(props.height / props.speed / 4) * 1000);
+ }, ~~((props.height / props.speed / 4) * 1000));
};
const startRoll = () => {
--
GitLab