2021-09-23 09:35:06 +00:00
|
|
|
|
import axios from 'axios'
|
|
|
|
|
|
|
|
|
|
import VFormDesigner from '@/components/form-designer/index.vue'
|
|
|
|
|
import VFormRender from '@/components/form-render/index.vue'
|
2021-11-01 04:34:19 +00:00
|
|
|
|
import {loadExtension} from "@/extension/extension-loader"
|
2021-09-23 09:35:06 +00:00
|
|
|
|
|
|
|
|
|
import '@/utils/directive'
|
|
|
|
|
import '@/icons'
|
|
|
|
|
import '@/iconfont/iconfont.css'
|
|
|
|
|
|
2021-11-01 04:34:19 +00:00
|
|
|
|
loadExtension()
|
|
|
|
|
|
2021-09-23 09:35:06 +00:00
|
|
|
|
VFormDesigner.install = function (Vue) {
|
|
|
|
|
Vue.component(VFormDesigner.name, VFormDesigner)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
VFormRender.install = function (Vue) {
|
|
|
|
|
Vue.component(VFormRender.name, VFormRender)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const components = [
|
|
|
|
|
VFormDesigner,
|
|
|
|
|
VFormRender
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
const install = (Vue) => {
|
2022-02-21 06:33:04 +00:00
|
|
|
|
window.axios = axios
|
2021-09-23 09:35:06 +00:00
|
|
|
|
components.forEach(component => {
|
|
|
|
|
Vue.component(component.name, component)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (typeof window !== 'undefined' && window.Vue) { /* script方式引入时主动调用install方法!! */
|
|
|
|
|
install(window.Vue);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
install,
|
|
|
|
|
VFormDesigner,
|
|
|
|
|
VFormRender
|
|
|
|
|
}
|