From cfab8988f8af2ebb8a72ae90dfc024f32079e1e3 Mon Sep 17 00:00:00 2001 From: Eiinu Date: Mon, 19 Feb 2024 16:26:09 +0800 Subject: [PATCH] chore: remove some any type (#2927) --- src/packages/__VUE/address/index.vue | 2 +- src/packages/__VUE/countdown/index.taro.vue | 8 ++++---- src/packages/__VUE/countdown/index.vue | 8 ++++---- src/packages/__VUE/fixednav/index.taro.vue | 2 +- src/packages/__VUE/fixednav/index.vue | 2 +- src/packages/__VUE/skeleton/index.taro.vue | 2 +- src/packages/__VUE/skeleton/index.vue | 2 +- src/packages/__VUE/sku/components/SkuOperate.vue | 2 +- src/packages/__VUE/sku/components/SkuSelect.vue | 2 +- .../__VUE/sku/components/SkuStepper.taro.vue | 12 ++++++------ src/packages/__VUE/sku/components/SkuStepper.vue | 12 ++++++------ src/packages/__VUE/sku/index.taro.vue | 2 +- src/packages/__VUE/sku/index.vue | 2 +- src/packages/__VUE/table/index.taro.vue | 4 ++-- src/packages/__VUE/table/index.vue | 8 ++++---- src/packages/__VUE/tabs/index.taro.vue | 2 +- src/packages/__VUE/tabs/index.vue | 2 +- src/packages/__VUE/timepannel/index.taro.vue | 4 ++-- src/packages/__VUE/timepannel/index.vue | 4 ++-- src/packages/__VUE/toast/index.vue | 8 ++++---- 20 files changed, 45 insertions(+), 45 deletions(-) diff --git a/src/packages/__VUE/address/index.vue b/src/packages/__VUE/address/index.vue index 349cd58b21..8924fe02a7 100644 --- a/src/packages/__VUE/address/index.vue +++ b/src/packages/__VUE/address/index.vue @@ -201,7 +201,7 @@ export default create({ }, emits: ['update:visible', 'update:modelValue', 'type', 'change', 'selected', 'close', 'closeMask', 'switchModule'], - setup(props: any, { emit }) { + setup(props, { emit }) { const translate = useLocale(cN); const regionLine = ref(null); const tabRegion: Ref = ref(null); diff --git a/src/packages/__VUE/countdown/index.taro.vue b/src/packages/__VUE/countdown/index.taro.vue index 01d2846626..73abb70353 100644 --- a/src/packages/__VUE/countdown/index.taro.vue +++ b/src/packages/__VUE/countdown/index.taro.vue @@ -79,7 +79,7 @@ export default create({ 'onPaused' ], - setup(props: any, { emit, slots }) { + setup(props, { emit, slots }) { const translate = useLocale(cN); const state = reactive({ restTime: 0, // 倒计时剩余时间时间 @@ -95,7 +95,7 @@ export default create({ // 倒计时 interval const initTime = () => { - state.handleEndTime = props.endTime; + state.handleEndTime = Number(props.endTime); state.diffTime = Date.now() - getTimeStamp(props.startTime); // 时间差 if (!state.counting) state.counting = true; tick(); @@ -216,7 +216,7 @@ export default create({ const reset = () => { if (!props.autoStart) { pause(); - state.restTime = props.time; + state.restTime = Number(props.time); } }; @@ -224,7 +224,7 @@ export default create({ if (props.autoStart) { initTime(); } else { - state.restTime = props.time; + state.restTime = Number(props.time); } }); diff --git a/src/packages/__VUE/countdown/index.vue b/src/packages/__VUE/countdown/index.vue index 01d2846626..73abb70353 100644 --- a/src/packages/__VUE/countdown/index.vue +++ b/src/packages/__VUE/countdown/index.vue @@ -79,7 +79,7 @@ export default create({ 'onPaused' ], - setup(props: any, { emit, slots }) { + setup(props, { emit, slots }) { const translate = useLocale(cN); const state = reactive({ restTime: 0, // 倒计时剩余时间时间 @@ -95,7 +95,7 @@ export default create({ // 倒计时 interval const initTime = () => { - state.handleEndTime = props.endTime; + state.handleEndTime = Number(props.endTime); state.diffTime = Date.now() - getTimeStamp(props.startTime); // 时间差 if (!state.counting) state.counting = true; tick(); @@ -216,7 +216,7 @@ export default create({ const reset = () => { if (!props.autoStart) { pause(); - state.restTime = props.time; + state.restTime = Number(props.time); } }; @@ -224,7 +224,7 @@ export default create({ if (props.autoStart) { initTime(); } else { - state.restTime = props.time; + state.restTime = Number(props.time); } }); diff --git a/src/packages/__VUE/fixednav/index.taro.vue b/src/packages/__VUE/fixednav/index.taro.vue index 7de076caa9..d7f3d1cc7c 100644 --- a/src/packages/__VUE/fixednav/index.taro.vue +++ b/src/packages/__VUE/fixednav/index.taro.vue @@ -82,7 +82,7 @@ export default create({ }, emits: ['update:visible', 'selected'], - setup(props: any, { emit }: any) { + setup(props, { emit }) { const translate = useLocale(cN); const classes = computed(() => { const prefixCls = 'nut-fixed-nav'; diff --git a/src/packages/__VUE/fixednav/index.vue b/src/packages/__VUE/fixednav/index.vue index 0c2212b86d..87faddd1cc 100644 --- a/src/packages/__VUE/fixednav/index.vue +++ b/src/packages/__VUE/fixednav/index.vue @@ -82,7 +82,7 @@ export default create({ }, emits: ['update:visible', 'selected'], - setup(props: any, { emit }: any) { + setup(props, { emit }) { const translate = useLocale(cN); const classes = computed(() => { const prefixCls = 'nut-fixed-nav'; diff --git a/src/packages/__VUE/skeleton/index.taro.vue b/src/packages/__VUE/skeleton/index.taro.vue index 7d2f1a605f..f771f08ada 100644 --- a/src/packages/__VUE/skeleton/index.taro.vue +++ b/src/packages/__VUE/skeleton/index.taro.vue @@ -80,7 +80,7 @@ export default create({ } }, - setup(props: any) { + setup(props) { const { avatarShape, round, avatarSize } = toRefs(props); const avatarClass = computed(() => { diff --git a/src/packages/__VUE/skeleton/index.vue b/src/packages/__VUE/skeleton/index.vue index 1c557b2807..3394ddb12d 100644 --- a/src/packages/__VUE/skeleton/index.vue +++ b/src/packages/__VUE/skeleton/index.vue @@ -80,7 +80,7 @@ export default create({ } }, - setup(props: any) { + setup(props) { const { avatarShape, round, avatarSize } = toRefs(props); const avatarClass = computed(() => { diff --git a/src/packages/__VUE/sku/components/SkuOperate.vue b/src/packages/__VUE/sku/components/SkuOperate.vue index d22744a1ec..0d719b8ccb 100644 --- a/src/packages/__VUE/sku/components/SkuOperate.vue +++ b/src/packages/__VUE/sku/components/SkuOperate.vue @@ -51,7 +51,7 @@ export default create({ }, emits: ['click', 'changeSku', 'changeBuyCount', 'clickBtnOperate'], - setup(props: any, { emit, slots }) { + setup(props, { emit, slots }) { const getBtnDesc = (type: string) => { let mapD: { [props: string]: string } = { confirm: props.confirmText, diff --git a/src/packages/__VUE/sku/components/SkuSelect.vue b/src/packages/__VUE/sku/components/SkuSelect.vue index e0acb64d3f..3e22928333 100644 --- a/src/packages/__VUE/sku/components/SkuSelect.vue +++ b/src/packages/__VUE/sku/components/SkuSelect.vue @@ -37,7 +37,7 @@ export default create({ }, emits: ['selectSku'], - setup(props: any, { emit }) { + setup(props, { emit }) { const skuInfo = ref([]); watch( diff --git a/src/packages/__VUE/sku/components/SkuStepper.taro.vue b/src/packages/__VUE/sku/components/SkuStepper.taro.vue index 32a3d9c185..069ef4992f 100644 --- a/src/packages/__VUE/sku/components/SkuStepper.taro.vue +++ b/src/packages/__VUE/sku/components/SkuStepper.taro.vue @@ -17,7 +17,6 @@