elementplus menu 设置 activeindex
<el-menu:default-active="defaultActive">
更改当前激活的 index 可以
绑定:default-active="defaultActive"
改变 defaultActive 值 即会改变 index
但不会改变路径
watch(() => route.fullPath,(newPath: string) => {defaultActive.value = newPath},
)
上面用于 路径更新时 index 及时动态更新