mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-09 13:53:38 +08:00
feat: 添加按钮权限
This commit is contained in:
14
src/main.ts
14
src/main.ts
@@ -1,4 +1,4 @@
|
||||
import { createApp } from "vue";
|
||||
import { createApp, Directive } from "vue";
|
||||
import App from "./App.vue";
|
||||
import router from "./router";
|
||||
import { setupStore } from "/@/store";
|
||||
@@ -43,6 +43,12 @@ app.use(Storage, {
|
||||
},
|
||||
});
|
||||
|
||||
// 自定义指令
|
||||
import * as directives from "/@/directives";
|
||||
Object.keys(directives).forEach((key) => {
|
||||
app.directive(key, (directives as { [key: string]: Directive })[key]);
|
||||
});
|
||||
|
||||
// 获取项目动态全局配置
|
||||
export const getServerConfig = async (): Promise<any> => {
|
||||
return axios({
|
||||
@@ -74,7 +80,11 @@ export const getServerConfig = async (): Promise<any> => {
|
||||
getServerConfig().then(async () => {
|
||||
setupStore(app);
|
||||
|
||||
app.use(router).use(useElementPlus).use(useTable).use(usI18n);
|
||||
app
|
||||
.use(router)
|
||||
.use(useElementPlus)
|
||||
.use(useTable)
|
||||
.use(usI18n);
|
||||
|
||||
await router.isReady();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user