chore: update

This commit is contained in:
xiaoxian521
2022-08-11 20:32:55 +08:00
parent 5f1466b574
commit 243c8f71a7
19 changed files with 200 additions and 2766 deletions

View File

@@ -4,8 +4,7 @@ import {
ref,
unref,
onBeforeMount,
onBeforeUnmount,
getCurrentInstance
onBeforeUnmount
} from "vue";
import { reboundProps } from "./props";
@@ -13,6 +12,7 @@ export default defineComponent({
name: "ReboundCountTo",
props: reboundProps,
setup(props) {
const ulRef = ref();
const timer = ref(null);
onBeforeMount(() => {
@@ -23,8 +23,7 @@ export default defineComponent({
// Safari浏览器的兼容代码
isSafari &&
(timer.value = setTimeout(() => {
// @ts-ignore
getCurrentInstance().refs["ul"].setAttribute(
ulRef.value.setAttribute(
"style",
`
animation: none;
@@ -44,7 +43,7 @@ export default defineComponent({
class="scroll-num"
style={{ "--i": props.i, "--delay": props.delay }}
>
<ul ref="ul" style={{ fontSize: "32px" }}>
<ul ref="ulRef" style={{ fontSize: "32px" }}>
<li>0</li>
<li>1</li>
<li>2</li>