feat: 线上版本号优化
This commit is contained in:
@@ -29,7 +29,7 @@ export async function checkVersion(){
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 获取线上版本号 t为时间戳,防止缓存
|
// 获取线上版本号 t为时间戳,防止缓存
|
||||||
await axios.get(`/${VERSION_FILE_NAME}?t=${new Date().getTime()}`).then(res => {
|
await axios.get(`${import.meta.env.VITE_PUBLIC_PATH}${VERSION_FILE_NAME}?t=${new Date().getTime()}`).then(res => {
|
||||||
const {status, data} = res || {}
|
const {status, data} = res || {}
|
||||||
if (status === 200) {
|
if (status === 200) {
|
||||||
// 获取当前版本号
|
// 获取当前版本号
|
||||||
|
|||||||
@@ -1,46 +0,0 @@
|
|||||||
import axios from 'axios'
|
|
||||||
|
|
||||||
import VFormRender from '@/components/form-render/index.vue'
|
|
||||||
import ContainerItems from '@/components/form-render/container-item/index'
|
|
||||||
|
|
||||||
import {registerIcon} from '@/utils/el-icons'
|
|
||||||
import 'virtual:svg-icons-register'
|
|
||||||
import '@/iconfont/iconfont.css'
|
|
||||||
|
|
||||||
import { installI18n } from '@/utils/i18n'
|
|
||||||
import { loadExtension } from '@/extension/extension-loader'
|
|
||||||
|
|
||||||
VFormRender.install = function (app) {
|
|
||||||
installI18n(app)
|
|
||||||
loadExtension(app)
|
|
||||||
|
|
||||||
app.use(ContainerItems)
|
|
||||||
registerIcon(app)
|
|
||||||
app.component(VFormRender.name, VFormRender)
|
|
||||||
}
|
|
||||||
|
|
||||||
const components = [
|
|
||||||
VFormRender
|
|
||||||
]
|
|
||||||
|
|
||||||
const install = (app) => {
|
|
||||||
installI18n(app)
|
|
||||||
loadExtension(app)
|
|
||||||
|
|
||||||
app.use(ContainerItems)
|
|
||||||
registerIcon(app)
|
|
||||||
components.forEach(component => {
|
|
||||||
app.component(component.name, component)
|
|
||||||
})
|
|
||||||
|
|
||||||
window.axios = axios
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof window !== 'undefined' && window.Vue) { /* script<EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>ֵaxios<EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
||||||
//window.axios = axios
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
|
||||||
install,
|
|
||||||
VFormRender
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user