types(IndexBar): index-list prop can includes number (#10273)

This commit is contained in:
neverland
2022-02-09 14:22:33 +08:00
committed by GitHub
parent daa8e4b9bb
commit 9b7af21bbd
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -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);