初始化代码

This commit is contained in:
yiqiuyang
2025-09-03 18:05:48 +08:00
parent e5712b2e97
commit 4414fe517b
70 changed files with 2404 additions and 9 deletions
+26
View File
@@ -0,0 +1,26 @@
import {defineStore} from 'pinia'
import {ref} from 'vue'
export const useNavStore = defineStore(
'nav',
() => {
const navIndex = ref('/')
const changeNavIndex = (id) => {
if (!id) {
return
} else {
navIndex.value = id
console.log(localStorage.getItem('nav'))
}
}
return {
navIndex,
changeNavIndex,
}
},
{
persist: true,
}
)