init:first commit of plus-ui
This commit is contained in:
84
src/main.ts
Normal file
84
src/main.ts
Normal file
@ -0,0 +1,84 @@
|
||||
import { createApp } from 'vue';
|
||||
// global css
|
||||
import 'virtual:uno.css';
|
||||
import '@/assets/styles/index.scss';
|
||||
import 'element-plus/theme-chalk/dark/css-vars.css';
|
||||
|
||||
// App、router、store
|
||||
import App from './App.vue';
|
||||
import store from './store';
|
||||
import router from './router';
|
||||
|
||||
// 自定义指令
|
||||
import directive from './directive';
|
||||
|
||||
// 注册插件
|
||||
import plugins from './plugins/index'; // plugins
|
||||
|
||||
// 高亮组件
|
||||
// import 'highlight.js/styles/a11y-light.css';
|
||||
import 'highlight.js/styles/atom-one-dark.css';
|
||||
import 'highlight.js/lib/common';
|
||||
import HighLight from '@highlightjs/vue-plugin';
|
||||
|
||||
// svg图标
|
||||
import 'virtual:svg-icons-register';
|
||||
import ElementIcons from '@/plugins/svgicon';
|
||||
|
||||
//通信
|
||||
import mitt from 'mitt';
|
||||
|
||||
import '@/assets/fonts/fonts.scss';
|
||||
|
||||
//打印
|
||||
import print from 'vue3-print-nb';
|
||||
|
||||
// permission control
|
||||
import './permission';
|
||||
|
||||
// 国际化
|
||||
import i18n from '@/lang/index';
|
||||
|
||||
// vxeTable
|
||||
import VXETable from 'vxe-table';
|
||||
import 'vxe-table/lib/style.css';
|
||||
VXETable.config({
|
||||
zIndex: 999999
|
||||
});
|
||||
|
||||
//本地保存飞机配置
|
||||
import { setLocal } from './utils';
|
||||
setLocal('dockAir', 'http://192.168.110.24:9136');
|
||||
setLocal('aiUrl', 'http://192.168.110.23:8000');
|
||||
setLocal('host', '192.168.110.199');
|
||||
setLocal('rtmpPort', '1935');
|
||||
setLocal('rtcPort', '1985');
|
||||
setLocal('dockSocketUrl', 'ws://192.168.110.8:9136/websocket');
|
||||
|
||||
// 修改 el-dialog 默认点击遮照为不关闭
|
||||
/*import { ElDialog } from 'element-plus';
|
||||
ElDialog.props.closeOnClickModal.default = false;*/
|
||||
// **main.js**
|
||||
import { vue3ScrollSeamless } from 'vue3-scroll-seamless';
|
||||
import bus from './utils/bus';
|
||||
import $message from '@/plugins/modal';
|
||||
|
||||
const app = createApp(App);
|
||||
|
||||
app.use(HighLight);
|
||||
app.use(ElementIcons);
|
||||
app.use(router);
|
||||
app.use(store);
|
||||
app.use(print);
|
||||
app.use(i18n);
|
||||
app.use(VXETable);
|
||||
app.use(plugins);
|
||||
app.use(bus);
|
||||
app.component('vue3ScrollSeamless', vue3ScrollSeamless);
|
||||
// 自定义指令
|
||||
directive(app);
|
||||
|
||||
app.mount('#app');
|
||||
|
||||
app.config.globalProperties.mittBus = mitt();
|
||||
app.config.globalProperties.$message = $message;
|
Reference in New Issue
Block a user