mirror of
				https://github.com/vform666/variant-form3-vite.git
				synced 2025-10-30 08:11:47 +08:00 
			
		
		
		
	SvgIcon组件取消全局注册,改为局部注册。
This commit is contained in:
		| @@ -9,7 +9,7 @@ | ||||
| [在线Demo](http://120.92.142.115:81/vform3/) | ||||
|   | ||||
|  ### 立即体验VForm 3 Pro高级版(提供商业支持) | ||||
|  [VForm 3 Pro Demo](http://120.92.142.115:81/vform3pro/) | ||||
|  [VForm 3 Pro Demo](https://vform666.com/pages/pro/) | ||||
|   | ||||
| ### 适合Vue 2的版本看这里 | ||||
| [点此查看](https://gitee.com/vdpadmin/variant-form) | ||||
|   | ||||
| @@ -4,7 +4,6 @@ import VFormRender from '@/components/form-render/index.vue' | ||||
| import ContainerItems from '@/components/form-render/container-item/index' | ||||
|  | ||||
| import {registerIcon} from '@/utils/el-icons' | ||||
| import SvgIcon from '@/components/svg-icon'  //svg组件 | ||||
| import 'virtual:svg-icons-register' | ||||
| import '@/iconfont/iconfont.css' | ||||
|  | ||||
| @@ -17,7 +16,6 @@ VFormRender.install = function (app) { | ||||
|  | ||||
|   app.use(ContainerItems) | ||||
|   registerIcon(app) | ||||
|   app.component('svg-icon', SvgIcon) | ||||
|   app.component(VFormRender.name, VFormRender) | ||||
| } | ||||
|  | ||||
| @@ -31,7 +29,6 @@ const install = (app) => { | ||||
|  | ||||
|   app.use(ContainerItems) | ||||
|   registerIcon(app) | ||||
|   app.component('svg-icon', SvgIcon) | ||||
|   components.forEach(component => { | ||||
|     app.component(component.name, component) | ||||
|   }) | ||||
|   | ||||
| @@ -5,7 +5,6 @@ import VFormRender from '@/components/form-render/index.vue' | ||||
|  | ||||
| import Draggable from '@/../lib/vuedraggable/dist/vuedraggable.umd.js' | ||||
| import {registerIcon} from '@/utils/el-icons' | ||||
| import SvgIcon from '@/components/svg-icon'  //svg组件 | ||||
| import 'virtual:svg-icons-register' | ||||
| import '@/iconfont/iconfont.css' | ||||
|  | ||||
| @@ -27,7 +26,6 @@ VFormDesigner.install = function (app) { | ||||
|  | ||||
|   registerIcon(app) | ||||
|   app.component('draggable', Draggable) | ||||
|   app.component('svg-icon', SvgIcon) | ||||
|   app.component(VFormDesigner.name, VFormDesigner) | ||||
| } | ||||
|  | ||||
| @@ -38,7 +36,6 @@ VFormRender.install = function (app) { | ||||
|   app.use(ContainerItems) | ||||
|  | ||||
|   registerIcon(app) | ||||
|   app.component('svg-icon', SvgIcon) | ||||
|   app.component(VFormRender.name, VFormRender) | ||||
| } | ||||
|  | ||||
| @@ -57,7 +54,6 @@ const install = (app) => { | ||||
|  | ||||
|   registerIcon(app) | ||||
|   app.component('draggable', Draggable) | ||||
|   app.component('svg-icon', SvgIcon) | ||||
|  | ||||
|   components.forEach(component => { | ||||
|     app.component(component.name, component) | ||||
|   | ||||
| @@ -42,10 +42,14 @@ | ||||
| <script> | ||||
|   import i18n from "@/utils/i18n"; | ||||
|   import containerMixin from "@/components/form-designer/form-widget/container-widget/containerMixin"; | ||||
|   import SvgIcon from '@/components/svg-icon' | ||||
|  | ||||
|   export default { | ||||
|     name: "container-wrapper", | ||||
|     mixins: [i18n, containerMixin], | ||||
|     components: { | ||||
|       SvgIcon | ||||
|     }, | ||||
|     props: { | ||||
|       widget: Object, | ||||
|       parentWidget: Object, | ||||
|   | ||||
| @@ -46,6 +46,7 @@ | ||||
|   import i18n from "@/utils/i18n"; | ||||
|   import FieldComponents from '@/components/form-designer/form-widget/field-widget/index' | ||||
|   import refMixinDesign from "@/components/form-designer/refMixinDesign" | ||||
|   import SvgIcon from '@/components/svg-icon' | ||||
|  | ||||
|   export default { | ||||
|     name: "GridColWidget", | ||||
| @@ -54,6 +55,7 @@ | ||||
|     inject: ['refList'], | ||||
|     components: { | ||||
|       ...FieldComponents, | ||||
|       SvgIcon, | ||||
|     }, | ||||
|     props: { | ||||
|       widget: Object, | ||||
|   | ||||
| @@ -58,6 +58,7 @@ | ||||
|   import i18n from "@/utils/i18n" | ||||
|   import FieldComponents from '@/components/form-designer/form-widget/field-widget/index' | ||||
|   import refMixinDesign from "@/components/form-designer/refMixinDesign" | ||||
|   import SvgIcon from '@/components/svg-icon' | ||||
|  | ||||
|   export default { | ||||
|     name: "TableCellWidget", | ||||
| @@ -66,6 +67,7 @@ | ||||
|     inject: ['refList'], | ||||
|     components: { | ||||
|       ...FieldComponents, | ||||
|       SvgIcon, | ||||
|     }, | ||||
|     props: { | ||||
|       widget: Object, | ||||
|   | ||||
| @@ -62,10 +62,14 @@ | ||||
|  | ||||
| <script> | ||||
|   import i18n from "@/utils/i18n"; | ||||
|   import SvgIcon from '@/components/svg-icon' | ||||
|  | ||||
|   export default { | ||||
|     name: "form-item-wrapper", | ||||
|     mixins: [i18n], | ||||
|     components: { | ||||
|       SvgIcon | ||||
|     }, | ||||
|     props: { | ||||
|       field: Object, | ||||
|       designer: Object, | ||||
|   | ||||
| @@ -27,6 +27,7 @@ | ||||
|   import emitter from '@/utils/emitter' | ||||
|   import i18n, {translate} from "@/utils/i18n"; | ||||
|   import fieldMixin from "@/components/form-designer/form-widget/field-widget/fieldMixin"; | ||||
|   import SvgIcon from "@/components/svg-icon/index"; | ||||
|  | ||||
|   export default { | ||||
|     name: "input-widget", | ||||
| @@ -60,6 +61,7 @@ | ||||
|     }, | ||||
|     components: { | ||||
|       FormItemWrapper, | ||||
|       SvgIcon, | ||||
|     }, | ||||
|     data() { | ||||
|       return { | ||||
|   | ||||
| @@ -58,6 +58,7 @@ | ||||
|   import i18n, {translate} from "@/utils/i18n"; | ||||
|   import {deepClone} from "@/utils/util"; | ||||
|   import fieldMixin from "@/components/form-designer/form-widget/field-widget/fieldMixin"; | ||||
|   import SvgIcon from "@/components/svg-icon/index"; | ||||
|  | ||||
|   export default { | ||||
|     name: "picture-upload-widget", | ||||
| @@ -91,6 +92,7 @@ | ||||
|     }, | ||||
|     components: { | ||||
|       FormItemWrapper, | ||||
|       SvgIcon, | ||||
|     }, | ||||
|     data() { | ||||
|       return { | ||||
|   | ||||
| @@ -29,11 +29,15 @@ | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|   import i18n from "@/utils/i18n"; | ||||
|   import i18n from "@/utils/i18n" | ||||
|   import SvgIcon from '@/components/svg-icon' | ||||
|  | ||||
|   export default { | ||||
|     name: "static-content-wrapper", | ||||
|     mixins: [i18n], | ||||
|     components: { | ||||
|       SvgIcon | ||||
|     }, | ||||
|     props: { | ||||
|       field: Object, | ||||
|       designer: Object, | ||||
|   | ||||
| @@ -19,10 +19,14 @@ | ||||
|  | ||||
| <script> | ||||
|   import i18n from "@/utils/i18n" | ||||
|   import SvgIcon from "@/components/svg-icon/index"; | ||||
|  | ||||
|   export default { | ||||
|     name: "file-upload-fileTypes-editor", | ||||
|     mixins: [i18n], | ||||
|     components: { | ||||
|       SvgIcon | ||||
|     }, | ||||
|     props: { | ||||
|       designer: Object, | ||||
|       selectedWidget: Object, | ||||
|   | ||||
| @@ -19,10 +19,14 @@ | ||||
|  | ||||
| <script> | ||||
|   import i18n from "@/utils/i18n" | ||||
|   import SvgIcon from "@/components/svg-icon/index"; | ||||
|  | ||||
|   export default { | ||||
|     name: "picture-upload-fileTypes-editor", | ||||
|     mixins: [i18n], | ||||
|     components: { | ||||
|       SvgIcon | ||||
|     }, | ||||
|     props: { | ||||
|       designer: Object, | ||||
|       selectedWidget: Object, | ||||
|   | ||||
| @@ -21,10 +21,14 @@ | ||||
| <script> | ||||
|   import i18n from "@/utils/i18n" | ||||
|   import {isEmptyStr} from "@/utils/util" | ||||
|   import SvgIcon from "@/components/svg-icon/index"; | ||||
|  | ||||
|   export default { | ||||
|     name: "name-editor", | ||||
|     mixins: [i18n], | ||||
|     components: { | ||||
|       SvgIcon | ||||
|     }, | ||||
|     props: { | ||||
|       designer: Object, | ||||
|       selectedWidget: Object, | ||||
|   | ||||
| @@ -6,7 +6,7 @@ | ||||
|           <svg-icon icon-class="el-info" /></el-tooltip> | ||||
|       </span> | ||||
|     </template> | ||||
|     <el-select v-model="optionModel.validation" filterable allow-create default-first-option> | ||||
|     <el-select v-model="optionModel.validation" filterable clearable allow-create default-first-option> | ||||
|       <el-option v-for="(fv, fvIdx) in fieldValidators" | ||||
|                  :key="fvIdx" | ||||
|                  :label="fv.label" | ||||
| @@ -18,10 +18,14 @@ | ||||
|  | ||||
| <script> | ||||
|   import i18n from "@/utils/i18n" | ||||
|   import SvgIcon from "@/components/svg-icon/index"; | ||||
|  | ||||
|   export default { | ||||
|     name: "validation-editor", | ||||
|     mixins: [i18n], | ||||
|     components: { | ||||
|       SvgIcon | ||||
|     }, | ||||
|     props: { | ||||
|       designer: Object, | ||||
|       selectedWidget: Object, | ||||
|   | ||||
| @@ -201,6 +201,7 @@ | ||||
|   import loadBeautifier from "@/utils/beautifierLoader" | ||||
|   import { saveAs } from 'file-saver' | ||||
|   import axios from 'axios' | ||||
|   import SvgIcon from "@/components/svg-icon/index"; | ||||
|  | ||||
|   export default { | ||||
|     name: "ToolbarPanel", | ||||
| @@ -209,6 +210,7 @@ | ||||
|       VFormRender, | ||||
|       CodeEditor, | ||||
|       Clipboard, | ||||
|       SvgIcon, | ||||
|     }, | ||||
|     props: { | ||||
|       designer: Object | ||||
|   | ||||
| @@ -96,6 +96,7 @@ | ||||
|   import {addWindowResizeHandler, generateId} from "@/utils/util" | ||||
|   import i18n from "@/utils/i18n" | ||||
|   import axios from 'axios' | ||||
|   import SvgIcon from "@/components/svg-icon/index"; | ||||
|  | ||||
|   // import ftImg1 from '@/assets/ft-images/t1.png' | ||||
|   // import ftImg2 from '@/assets/ft-images/t2.png' | ||||
| @@ -110,6 +111,7 @@ | ||||
|     name: "FieldPanel", | ||||
|     mixins: [i18n], | ||||
|     components: { | ||||
|       SvgIcon | ||||
|     }, | ||||
|     props: { | ||||
|       designer: Object, | ||||
|   | ||||
| @@ -70,7 +70,7 @@ | ||||
|   import ContainerItemWrapper from './container-item-wrapper' | ||||
|   import containerItemMixin from './containerItemMixin' | ||||
|   import FieldComponents from '@/components/form-designer/form-widget/field-widget/index' | ||||
|   import eventBus from "@/utils/event-bus" | ||||
|   import SvgIcon from "@/components/svg-icon/index"; | ||||
|  | ||||
|   export default { | ||||
|     name: "sub-form-item", | ||||
| @@ -79,6 +79,7 @@ | ||||
|     components: { | ||||
|       ContainerItemWrapper, | ||||
|       ...FieldComponents, | ||||
|       SvgIcon, | ||||
|     }, | ||||
|     props: { | ||||
|       widget: Object, | ||||
|   | ||||
| @@ -7,7 +7,6 @@ import '@/styles/index.scss' | ||||
| import '@/iconfont/iconfont.css' | ||||
| import Draggable from '@/../lib/vuedraggable/dist/vuedraggable.umd.js' | ||||
| import {registerIcon} from '@/utils/el-icons' | ||||
| import SvgIcon from '@/components/svg-icon'  //svg组件 | ||||
| import 'virtual:svg-icons-register' | ||||
|  | ||||
| import ContainerWidgets from '@/components/form-designer/form-widget/container-widget/index' | ||||
| @@ -26,7 +25,6 @@ const vfApp = createApp(App) | ||||
| vfApp.use(ElementPlus) | ||||
| registerIcon(vfApp) | ||||
| vfApp.component('draggable', Draggable) | ||||
| vfApp.component('svg-icon', SvgIcon) | ||||
| addDirective(vfApp) | ||||
| installI18n(vfApp) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user