mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 09:24:25 +00:00
types(IndexBar): index-list prop can includes number (#10273)
This commit is contained in:
@@ -58,7 +58,7 @@ const indexBarProps = {
|
||||
highlightColor: String,
|
||||
stickyOffsetTop: makeNumberProp(0),
|
||||
indexList: {
|
||||
type: Array as PropType<string[]>,
|
||||
type: Array as PropType<Array<string | number>>,
|
||||
default: genAlphabet,
|
||||
},
|
||||
};
|
||||
@@ -76,7 +76,7 @@ export default defineComponent({
|
||||
|
||||
setup(props, { emit, slots }) {
|
||||
const root = ref<HTMLElement>();
|
||||
const activeAnchor = ref('');
|
||||
const activeAnchor = ref<string | number>('');
|
||||
|
||||
const touch = useTouch();
|
||||
const scrollParent = useScrollParent(root);
|
||||
|
@@ -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<ToastPosition>('middle'),
|
||||
teleport: [String, Object] as PropType<TeleportProps['to']>,
|
||||
className: unknownProp,
|
||||
iconPrefix: String,
|
||||
transition: makeStringProp('van-fade'),
|
||||
|
Reference in New Issue
Block a user