2022-01-01 11:15:45 +00:00
|
|
|
|
import axios from 'axios'
|
|
|
|
|
|
|
|
|
|
import VFormRender from '@/components/form-render/index.vue'
|
|
|
|
|
import ContainerItems from '@/components/form-render/container-item/index'
|
|
|
|
|
|
2022-03-25 08:54:18 +00:00
|
|
|
|
import {registerIcon} from '@/utils/el-icons'
|
2022-01-16 07:18:25 +00:00
|
|
|
|
import SvgIcon from '@/components/svg-icon' //svg组件
|
2022-03-25 08:54:18 +00:00
|
|
|
|
import 'virtual:svg-icons-register'
|
|
|
|
|
import '@/iconfont/iconfont.css'
|
2022-01-16 07:18:25 +00:00
|
|
|
|
|
2022-01-01 11:15:45 +00:00
|
|
|
|
import { installI18n } from '@/utils/i18n'
|
|
|
|
|
import { loadExtension } from '@/extension/extension-loader'
|
|
|
|
|
|
|
|
|
|
VFormRender.install = function (app) {
|
|
|
|
|
installI18n(app)
|
|
|
|
|
loadExtension(app)
|
|
|
|
|
|
|
|
|
|
app.use(ContainerItems)
|
2022-03-25 08:54:18 +00:00
|
|
|
|
registerIcon(app)
|
2022-01-16 07:18:25 +00:00
|
|
|
|
app.component('svg-icon', SvgIcon)
|
2022-01-01 11:15:45 +00:00
|
|
|
|
app.component(VFormRender.name, VFormRender)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const components = [
|
|
|
|
|
VFormRender
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
const install = (app) => {
|
|
|
|
|
installI18n(app)
|
|
|
|
|
loadExtension(app)
|
|
|
|
|
|
|
|
|
|
app.use(ContainerItems)
|
2022-03-25 08:54:18 +00:00
|
|
|
|
registerIcon(app)
|
2022-01-16 07:18:25 +00:00
|
|
|
|
app.component('svg-icon', SvgIcon)
|
2022-01-01 11:15:45 +00:00
|
|
|
|
components.forEach(component => {
|
|
|
|
|
app.component(component.name, component)
|
|
|
|
|
})
|
2022-02-23 02:40:44 +00:00
|
|
|
|
|
|
|
|
|
window.axios = axios
|
2022-01-01 11:15:45 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-01-29 11:49:51 +00:00
|
|
|
|
if (typeof window !== 'undefined' && window.Vue) { /* script方式引入时赋值axios!! */
|
2022-02-23 02:40:44 +00:00
|
|
|
|
//window.axios = axios
|
2022-01-29 11:49:51 +00:00
|
|
|
|
}
|
2022-01-01 11:15:45 +00:00
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
install,
|
|
|
|
|
VFormRender
|
|
|
|
|
}
|