修改路由

This commit is contained in:
2020-09-25 16:27:33 +08:00
parent 011fa5337c
commit 10a0917cdc
4 changed files with 59 additions and 2 deletions

View File

@@ -128,6 +128,7 @@ export default defineComponent({
name: string;
route: string;
}
// 左侧的列表数组
const list: Array<MenuItem> = [
{
icon: "",
@@ -160,8 +161,13 @@ export default defineComponent({
route: ""
}
]
// 当前选中的index
const selnum = ref(0);
const routeto = (index: number) => {
/**
* 跳转路由与赋值对应的下标
* @param index 选中的下标 方便赋值与跳转
*/
function routeto(index: number): void {
console.log(index)
selnum.value = index;