From 9b7af21bbdf95be38ab20869c2a4da8dc1e537ca Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 9 Feb 2022 14:22:33 +0800 Subject: [PATCH] types(IndexBar): index-list prop can includes number (#10273) --- packages/vant/src/index-bar/IndexBar.tsx | 4 ++-- packages/vant/src/toast/Toast.tsx | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/vant/src/index-bar/IndexBar.tsx b/packages/vant/src/index-bar/IndexBar.tsx index e0a63e8f3..d127039a0 100644 --- a/packages/vant/src/index-bar/IndexBar.tsx +++ b/packages/vant/src/index-bar/IndexBar.tsx @@ -58,7 +58,7 @@ const indexBarProps = { highlightColor: String, stickyOffsetTop: makeNumberProp(0), indexList: { - type: Array as PropType, + type: Array as PropType>, default: genAlphabet, }, }; @@ -76,7 +76,7 @@ export default defineComponent({ setup(props, { emit, slots }) { const root = ref(); - const activeAnchor = ref(''); + const activeAnchor = ref(''); const touch = useTouch(); const scrollParent = useScrollParent(root); diff --git a/packages/vant/src/toast/Toast.tsx b/packages/vant/src/toast/Toast.tsx index 347124f13..58b3c2dbc 100644 --- a/packages/vant/src/toast/Toast.tsx +++ b/packages/vant/src/toast/Toast.tsx @@ -4,6 +4,7 @@ import { onUnmounted, defineComponent, type PropType, + type TeleportProps, type CSSProperties, type ExtractPropTypes, } from 'vue'; @@ -49,6 +50,7 @@ const toastProps = { iconSize: numericProp, duration: makeNumberProp(2000), position: makeStringProp('middle'), + teleport: [String, Object] as PropType, className: unknownProp, iconPrefix: String, transition: makeStringProp('van-fade'),