提交 e8820ec6 编写于 作者: 水晶土豆

Wed Nov 15 17:11:00 CST 2023 inscode

上级 8b37c86d
......@@ -11,6 +11,7 @@
"axios": "^1.6.0",
"element-plus": "^2.4.1",
"guess": "^1.0.2",
"pinia": "^2.1.7",
"vue": "^3.2.37",
"vue-router": "^4.2.5"
},
......
......@@ -4,12 +4,14 @@ import 'element-plus/dist/index.css'
import router from './router/index'
import App from './App.vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import { createPinia } from 'pinia'
const pinia = createPinia()
const app = createApp(App);
app.use(router);
app.use(pinia);
app.use(ElementPlus, {
locale: zhCn,
})
});
app.mount('#app');
import { defineStore } from "pinia";
import router from '@/router/index'
export const useRouteStore = defineStore('route', {
state() {
return {
routeArr:[]
};
},
actions: {
add(roleId){
if(roleId === '1'){
routeArr.forEach(element => {
router.addRoute(element);
router.addRoute('/',element);
});
}else{
}
}
}
});
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册