You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
2.0 KiB

1 year ago
import Vue from 'vue'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/en' // lang i18n
import '@/styles/index.scss' // global css
import App from './App'
import store from './store'
import router from './router'
import '@/icons' // icon
import '@/permission' // permission control
/**
* If you don't want to use mock-server
* you want to use MockJs for mock api
* you can execute: mockXHR()
*
* Currently MockJs will be used in the production environment,
* please remove it before going online ! ! !
*/
if (process.env.NODE_ENV === 'production') {
const { mockXHR } = require('../mock')
mockXHR()
}
// set ElementUI lang to EN
1 year ago
//Vue.use(ElementUI, { locale })
1 year ago
// 如果想要中文版 element-ui按如下方式声明
1 year ago
Vue.use(ElementUI)
1 year ago
import { VxeIcon, VxeTable, VxeColumn, VxeColgroup, VxeTableEditModule, VxeTableValidatorModule, VxeModal, VxeToolbar } from "vxe-table";
import "vxe-table/styles/index.scss"
Vue.use(VxeTableEditModule);
Vue.use(VxeTableValidatorModule);
Vue.use(VxeIcon);
Vue.use(VxeTable);
Vue.use(VxeColumn);
Vue.use(VxeColgroup);
Vue.use(VxeModal);
Vue.use(VxeToolbar);
Vue.config.productionTip = false
1 year ago
//vant
import Vant from 'vant'
1 year ago
import 'vant/lib/index.css';
1 year ago
Vue.use(Vant)
//moment
import moment from 'moment'
Vue.prototype.$moment = moment;
1 year ago
import { setToken,getToken } from "@/utils/auth"
if (window.__POWERED_BY_WUJIE__) {
let instance;
window.__WUJIE_MOUNT = () => {
instance = new Vue({
router,
store,
render: h => h(App)
}).$mount("#app")
window.MODULE_NAME = window.$wujie?.props?.module_name;
console.log(444,window.MODULE_NAME)
setToken(window.$wujie?.props?.auth_token)
router.push('/')
};
window.__WUJIE_UNMOUNT = () => {
instance.$destroy();
};
} else {
new Vue({
router,
store,
render: h => h(App)
}).$mount("#app")
}