修改路由
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user