mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-09 13:53:38 +08:00
chore: update
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user