2023-03-28 18:04:49 +08:00
|
|
|
import Vue from 'vue'
|
|
|
|
import App from './App.vue'
|
|
|
|
import router from './router'
|
|
|
|
import store from './store'
|
2024-08-26 16:58:58 +08:00
|
|
|
import { Message, Pagination, Alert, Loading, Dialog } from 'element-ui';
|
2023-03-28 18:04:49 +08:00
|
|
|
import 'element-ui/lib/theme-chalk/index.css';
|
2023-04-12 19:29:41 +08:00
|
|
|
import { skipUrl, pageStop, pageMove, goTologin, copy, startupUnderLoading, closeUnderLoading, formattedDate, updateURLSearchParams, clearCookies } from "@/utils/common.js"
|
2023-03-28 18:04:49 +08:00
|
|
|
import http from "@/utils/request"
|
2023-04-14 19:13:49 +08:00
|
|
|
|
2024-12-03 16:58:46 +08:00
|
|
|
|
2023-03-28 18:04:49 +08:00
|
|
|
Vue.config.productionTip = false
|
|
|
|
|
|
|
|
Vue.prototype.$loginUrl = "https://passport.gter.net/" // 跳转登录的url
|
|
|
|
|
|
|
|
Vue.prototype.$http = http // 跳转登录页面的方法
|
|
|
|
Vue.prototype.$skipUrl = skipUrl // 跳转页面的公共方法
|
|
|
|
Vue.prototype.$goTologin = goTologin // 跳转登录页面的方法
|
|
|
|
// 上面的顺序不要修改
|
|
|
|
|
|
|
|
Vue.prototype.$pageStop = pageStop // 页面禁止滑动
|
|
|
|
Vue.prototype.$pageMove = pageMove // 页面可以滑动
|
2023-03-31 16:20:10 +08:00
|
|
|
Vue.prototype.$Message = Message // 消息提示框
|
2023-04-17 15:47:08 +08:00
|
|
|
Vue.prototype.$loading = Loading // 消息提示框
|
2023-03-31 16:20:10 +08:00
|
|
|
Vue.prototype.$copy = copy // 复制
|
2023-04-04 14:40:11 +08:00
|
|
|
Vue.prototype.$startupUnderLoading = startupUnderLoading // 开启加载提示 element的
|
|
|
|
Vue.prototype.$closeUnderLoading = closeUnderLoading // 关闭加载提示 element的
|
|
|
|
Vue.prototype.$formattedDate = formattedDate // 时间戳转格式
|
2023-04-07 18:42:46 +08:00
|
|
|
Vue.prototype.$updateURLSearchParams = updateURLSearchParams // 不刷新的情况下修改url
|
2023-04-12 19:29:41 +08:00
|
|
|
Vue.prototype.$clearCookies = clearCookies // 清空Cookies
|
2023-10-23 14:05:52 +08:00
|
|
|
Vue.prototype.$baseURL = "https://ansnid.oss-cn-shenzhen.aliyuncs.com/forum" // 清空Cookies
|
2023-03-28 18:04:49 +08:00
|
|
|
|
2023-04-17 15:47:08 +08:00
|
|
|
//svg文件引入
|
2023-03-28 18:04:49 +08:00
|
|
|
import './icons'
|
|
|
|
//动态设置fontsize
|
|
|
|
import './utils/fontSize.js'
|
|
|
|
|
2023-04-07 16:49:43 +08:00
|
|
|
// 判断是否是数组的 ,兼容操作
|
|
|
|
if (!Array.isArray) {
|
|
|
|
Array.isArray = function (arg) {
|
|
|
|
return Object.prototype.toString.call(arg) === '[object Array]';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-17 15:47:08 +08:00
|
|
|
// Vue.use(ElementUI);
|
2023-03-30 11:00:10 +08:00
|
|
|
Vue.use(Pagination);
|
2023-04-17 15:47:08 +08:00
|
|
|
Vue.use(Alert);
|
|
|
|
Vue.use(Loading);
|
2024-08-26 16:58:58 +08:00
|
|
|
Vue.use(Dialog);
|
2023-04-12 19:29:41 +08:00
|
|
|
|
|
|
|
// v-focus
|
2023-04-12 14:56:37 +08:00
|
|
|
Vue.directive('focus', {
|
|
|
|
inserted: function (el) {
|
|
|
|
el.focus()
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2023-03-28 18:04:49 +08:00
|
|
|
new Vue({
|
|
|
|
router,
|
|
|
|
store,
|
2023-04-12 14:56:37 +08:00
|
|
|
render: h => h(App),
|
|
|
|
|
2023-03-28 18:04:49 +08:00
|
|
|
}).$mount('#app')
|