修复BUG: 修复页面缓存问题
This commit is contained in:
46
web/src/views/plugins/dvadmin_form_flow/install-render.js
Normal file
46
web/src/views/plugins/dvadmin_form_flow/install-render.js
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
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
|
||||||
|
}
|
||||||
73
web/src/views/plugins/dvadmin_form_flow/install.js
Normal file
73
web/src/views/plugins/dvadmin_form_flow/install.js
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
import axios from 'axios'
|
||||||
|
|
||||||
|
import VFormDesigner from '@/components/form-designer/index.vue'
|
||||||
|
import VFormRender from '@/components/form-render/index.vue'
|
||||||
|
|
||||||
|
import Draggable from '@/../lib/vuedraggable/dist/vuedraggable.umd.js'
|
||||||
|
import {registerIcon} from '@/utils/el-icons'
|
||||||
|
import 'virtual:svg-icons-register'
|
||||||
|
import '@/iconfont/iconfont.css'
|
||||||
|
|
||||||
|
import ContainerWidgets from '@/components/form-designer/form-widget/container-widget/index'
|
||||||
|
import ContainerItems from '@/components/form-render/container-item/index'
|
||||||
|
|
||||||
|
import { addDirective } from '@/utils/directive'
|
||||||
|
import { installI18n } from '@/utils/i18n'
|
||||||
|
import { loadExtension } from '@/extension/extension-loader'
|
||||||
|
|
||||||
|
|
||||||
|
VFormDesigner.install = function (app) {
|
||||||
|
addDirective(app)
|
||||||
|
installI18n(app)
|
||||||
|
loadExtension(app)
|
||||||
|
|
||||||
|
app.use(ContainerWidgets)
|
||||||
|
app.use(ContainerItems)
|
||||||
|
|
||||||
|
registerIcon(app)
|
||||||
|
app.component('draggable', Draggable)
|
||||||
|
app.component(VFormDesigner.name, VFormDesigner)
|
||||||
|
}
|
||||||
|
|
||||||
|
VFormRender.install = function (app) {
|
||||||
|
installI18n(app)
|
||||||
|
loadExtension(app)
|
||||||
|
|
||||||
|
app.use(ContainerItems)
|
||||||
|
|
||||||
|
registerIcon(app)
|
||||||
|
app.component(VFormRender.name, VFormRender)
|
||||||
|
}
|
||||||
|
|
||||||
|
const components = [
|
||||||
|
VFormDesigner,
|
||||||
|
VFormRender
|
||||||
|
]
|
||||||
|
|
||||||
|
const install = (app) => {
|
||||||
|
addDirective(app)
|
||||||
|
installI18n(app)
|
||||||
|
loadExtension(app)
|
||||||
|
|
||||||
|
app.use(ContainerWidgets)
|
||||||
|
app.use(ContainerItems)
|
||||||
|
|
||||||
|
registerIcon(app)
|
||||||
|
app.component('draggable', Draggable)
|
||||||
|
|
||||||
|
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,
|
||||||
|
VFormDesigner,
|
||||||
|
VFormRender
|
||||||
|
}
|
||||||
29
web/src/views/plugins/dvadmin_form_flow/src/index.ts
Normal file
29
web/src/views/plugins/dvadmin_form_flow/src/index.ts
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
import DVAFormDesigner from './components/DVAFormDesigner.vue'
|
||||||
|
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>浽һ<E6B5BD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
const components = [
|
||||||
|
DVAFormDesigner
|
||||||
|
]
|
||||||
|
|
||||||
|
// <20><><EFBFBD><EFBFBD> install <20><><EFBFBD><EFBFBD>
|
||||||
|
const install = function (Vue) {
|
||||||
|
|
||||||
|
if (install.installed) return
|
||||||
|
install.installed = true
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><D0B1><EFBFBD>ע<EFBFBD><D7A2>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
components.map(component => {
|
||||||
|
Vue.component(component.name, component) //component.name <20>˴<EFBFBD>ʹ<EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD>vue<75>ļ<EFBFBD><C4BC>е<EFBFBD> name <20><><EFBFBD><EFBFBD>
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof window !== 'undefined' && window.Vue) {
|
||||||
|
install(window.Vue)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߱<EFBFBD>һ<EFBFBD><D2BB> install <20><><EFBFBD><EFBFBD>
|
||||||
|
install,
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
||||||
|
...components
|
||||||
|
}
|
||||||
41
web/src/views/system/demo/api.ts
Normal file
41
web/src/views/system/demo/api.ts
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
import { request } from '/@/utils/service';
|
||||||
|
import { UserPageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud';
|
||||||
|
|
||||||
|
export const apiPrefix = '/api/system/login_log/';
|
||||||
|
export function GetList(query: UserPageQuery) {
|
||||||
|
return request({
|
||||||
|
url: apiPrefix,
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export function GetObj(id: InfoReq) {
|
||||||
|
return request({
|
||||||
|
url: apiPrefix + id,
|
||||||
|
method: 'get',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function AddObj(obj: AddReq) {
|
||||||
|
return request({
|
||||||
|
url: apiPrefix,
|
||||||
|
method: 'post',
|
||||||
|
data: obj,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function UpdateObj(obj: EditReq) {
|
||||||
|
return request({
|
||||||
|
url: apiPrefix + obj.id + '/',
|
||||||
|
method: 'put',
|
||||||
|
data: obj,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function DelObj(id: DelReq) {
|
||||||
|
return request({
|
||||||
|
url: apiPrefix + id + '/',
|
||||||
|
method: 'delete',
|
||||||
|
data: { id },
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -12,6 +12,7 @@ const alias: Record<string, string> = {
|
|||||||
'/@': pathResolve('./src/'),
|
'/@': pathResolve('./src/'),
|
||||||
'@views': pathResolve('./src/views'),
|
'@views': pathResolve('./src/views'),
|
||||||
'vue-i18n': 'vue-i18n/dist/vue-i18n.cjs.js',
|
'vue-i18n': 'vue-i18n/dist/vue-i18n.cjs.js',
|
||||||
|
'@dvaformflow':pathResolve('./src/viwes/plugins/dvaadmin_form_flow/src/')
|
||||||
};
|
};
|
||||||
|
|
||||||
const viteConfig = defineConfig((mode: ConfigEnv) => {
|
const viteConfig = defineConfig((mode: ConfigEnv) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user