forked from wudengyao/admin_vue3_vite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
11 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,39 @@ | ||
import {createApp} from 'vue' | ||
import App from './App.vue' | ||
import installElementPlus from './plugins/element' | ||
import router from './router' | ||
import store from './store' | ||
|
||
|
||
const app = createApp(App) | ||
|
||
// 导入权限控制模块 | ||
import './permission' | ||
|
||
import installDirective from '@/directives' | ||
import "@/styles/index.scss" | ||
import axios from '@/utils/axios' | ||
|
||
app.config.globalProperties.$axios = axios // 使用globalProperties挂载 | ||
// import axios from '@/utils/axios' | ||
// app.config.globalProperties.$axios = axios // 使用globalProperties挂载 | ||
|
||
//element | ||
import installElementPlus from './plugins/element' | ||
installElementPlus(app) | ||
//directives | ||
import installDirective from '@/directives' | ||
installDirective(app) | ||
// filter | ||
import installFilter from '@/filters' | ||
|
||
installFilter(app) | ||
|
||
|
||
|
||
// 自定义表格工具组件 | ||
import RightToolbar from '@/components/RightToolbar' | ||
// 分页组件 | ||
import Pagination from '@/components/Pagination' | ||
|
||
// svg组件 | ||
import svgIcon from "@/components/SvgIcon/index.vue"; | ||
// 全局组件挂载 | ||
app.component('RightToolbar', RightToolbar) | ||
app.component('Pagination', Pagination) | ||
app.component('svg-icon', svgIcon) | ||
|
||
|
||
// 将自动注册所有组件为全局组件 | ||
import svgIcon from "@/components/SvgIcon/index.vue"; | ||
import 'virtual:svg-icons-register' // 新增 | ||
|
||
app | ||
.use(store) | ||
.use(router) | ||
.component('svg-icon', svgIcon) | ||
.mount('#app') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters