style: 全局代码格式化
Former-commit-id: bb50c8419b8fcdeb48c93fce9f399d901e8f5a52
This commit is contained in:
43
src/main.ts
43
src/main.ts
@@ -1,42 +1,43 @@
|
||||
import {createApp, Directive} from 'vue'
|
||||
import App from './App.vue'
|
||||
import router from "@/router";
|
||||
import { createApp, Directive } from 'vue';
|
||||
import App from './App.vue';
|
||||
import router from '@/router';
|
||||
|
||||
import { createPinia } from "pinia"
|
||||
import { createPinia } from 'pinia';
|
||||
|
||||
import ElementPlus from 'element-plus'
|
||||
import 'element-plus/theme-chalk/index.css'
|
||||
import Pagination from '@/components/Pagination/index.vue'
|
||||
import '@/permission'
|
||||
import ElementPlus from 'element-plus';
|
||||
import 'element-plus/theme-chalk/index.css';
|
||||
import Pagination from '@/components/Pagination/index.vue';
|
||||
import '@/permission';
|
||||
|
||||
// 引入svg注册脚本
|
||||
import 'virtual:svg-icons-register';
|
||||
|
||||
// 国际化
|
||||
import i18n from "@/lang/index";
|
||||
import i18n from '@/lang/index';
|
||||
|
||||
// 自定义样式
|
||||
import '@/styles/index.scss'
|
||||
import '@/styles/index.scss';
|
||||
|
||||
// 根据字典编码获取字典列表全局方法
|
||||
import {listDictsByCode} from '@/api/system/dict'
|
||||
import { listDictsByCode } from '@/api/system/dict';
|
||||
|
||||
const app = createApp(App)
|
||||
const app = createApp(App);
|
||||
|
||||
// 自定义指令
|
||||
import * as directive from "@/directive";
|
||||
import * as directive from '@/directive';
|
||||
|
||||
Object.keys(directive).forEach(key => {
|
||||
app.directive(key, (directive as { [key: string]: Directive })[key]);
|
||||
app.directive(key, (directive as { [key: string]: Directive })[key]);
|
||||
});
|
||||
|
||||
// 全局方法
|
||||
app.config.globalProperties.$listDictsByCode = listDictsByCode
|
||||
app.config.globalProperties.$listDictsByCode = listDictsByCode;
|
||||
|
||||
// 注册全局组件
|
||||
app.component('Pagination', Pagination)
|
||||
.use(createPinia())
|
||||
.use(router)
|
||||
.use(ElementPlus)
|
||||
.use(i18n)
|
||||
.mount('#app')
|
||||
app
|
||||
.component('Pagination', Pagination)
|
||||
.use(createPinia())
|
||||
.use(router)
|
||||
.use(ElementPlus)
|
||||
.use(i18n)
|
||||
.mount('#app');
|
||||
|
||||
Reference in New Issue
Block a user