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>

View File

@@ -106,7 +106,7 @@ let defaultOption = computed(() => {
});
let options = computed(() => {
// @ts-ignore
// @ts-expect-error
return copyObj({}, unref(defaultOption), classOption);
});
@@ -167,8 +167,7 @@ let autoPlay = computed(() => {
let scrollSwitch = computed(() => {
// 从 props 解构出来的 属性 不再具有相应性.
// @ts-expect-error
return props.data.length >= unref(options).limitMoveNum;
return (props.data as any).length >= unref(options).limitMoveNum;
});
let hoverStopSwitch = computed(() => {