| | |
| | | app.component(key, component) |
| | | } |
| | | |
| | | import('vconsole').then((module) => { |
| | | new module.default() |
| | | }) |
| | | // ?qxydebug2=true 触发 |
| | | const urlParams = new URLSearchParams(window.location.search); |
| | | if (urlParams.get('qxydebug2') === 'true') { |
| | | import('vconsole').then((module) => { |
| | | new module.default(); |
| | | }); |
| | | } |
| | | |
| | | app.config.globalProperties.$rules = ruleGenerator |
| | | app.config.globalProperties.$property = property |
| | |
| | | |
| | | app.use(ElementPlus, { |
| | | locale: zhCn, |
| | | |
| | | }) |
| | | const pinia = createPinia() |
| | | pinia.use(piniaPluginPersistedstate) |
| | |
| | | resolve(localData) |
| | | }) |
| | | } else { |
| | | store.commit('snack/error', `微信上传图片失败:${res}`) |
| | | ElMessage.error(`微信上传图片失败:${res}`) |
| | | } |
| | | }, |
| | | fail:function(e) { |
| | | store.commit('snack/error', `微信上传图片异常:${JSON.stringify(e)}`) |
| | | ElMessage.error(`微信上传图片异常:${JSON.stringify(e)}`) |
| | | } |
| | | }) |
| | | }) |
| | |
| | | export default defineConfig({ |
| | | base: '/examination/verify', |
| | | plugins: [vue(), vueDevTools()], |
| | | // esbuild: { |
| | | // drop: ['console', 'debugger'] |
| | | // }, |
| | | esbuild: { |
| | | drop: ['console', 'debugger'] |
| | | }, |
| | | define: { |
| | | // 注入构建时间戳到代码中 |
| | | '__BUILD_TIME__': JSON.stringify(timestamp) |