-
VForm {{i18nt('application.productTitle')}}
Ver {{vFormVersion}}
+
- {{curLangName}}
+ {{curLangName}}
{{i18nt('application.zh-CN')}}
@@ -72,12 +72,14 @@
import {MOCK_CASE_URL, VARIANT_FORM_VERSION} from "@/utils/config"
import i18n, { changeLocale } from "@/utils/i18n"
import axios from 'axios'
+ import SvgIcon from "@/components/svg-icon/index";
export default {
name: "VFormDesigner",
componentName: "VFormDesigner",
mixins: [i18n],
components: {
+ SvgIcon,
WidgetPanel,
ToolbarPanel,
SettingPanel,
diff --git a/src/components/form-designer/setting-panel/form-setting.vue b/src/components/form-designer/setting-panel/form-setting.vue
index 23e28a5..05fe479 100644
--- a/src/components/form-designer/setting-panel/form-setting.vue
+++ b/src/components/form-designer/setting-panel/form-setting.vue
@@ -300,8 +300,8 @@
white-space: nowrap;
}
- :deep(.el-form-item--mini.el-form-item) {
- margin-bottom: 6px;
+ :deep(.el-form-item--small.el-form-item) {
+ margin-bottom: 10px;
}
.radio-group-custom {
diff --git a/src/components/form-designer/setting-panel/index.vue b/src/components/form-designer/setting-panel/index.vue
index 82d2cc1..4c002d2 100644
--- a/src/components/form-designer/setting-panel/index.vue
+++ b/src/components/form-designer/setting-panel/index.vue
@@ -312,8 +312,8 @@
white-space: nowrap;
}
- :deep(.el-form-item--mini.el-form-item) {
- margin-bottom: 6px;
+ :deep(.el-form-item--small.el-form-item) {
+ margin-bottom: 10px;
}
}
diff --git a/src/components/form-designer/setting-panel/option-items-setting.vue b/src/components/form-designer/setting-panel/option-items-setting.vue
index b83acfb..03703b9 100644
--- a/src/components/form-designer/setting-panel/option-items-setting.vue
+++ b/src/components/form-designer/setting-panel/option-items-setting.vue
@@ -34,11 +34,12 @@
-
-
+
+
+
+
{{i18nt('designer.setting.importOptions')}}
{{i18nt('designer.setting.resetDefault')}}
@@ -222,9 +223,13 @@
diff --git a/src/components/form-designer/setting-panel/property-editor/field-file-upload/file-upload-fileTypes-editor.vue b/src/components/form-designer/setting-panel/property-editor/field-file-upload/file-upload-fileTypes-editor.vue
index 6dee2ac..098e9e3 100644
--- a/src/components/form-designer/setting-panel/property-editor/field-file-upload/file-upload-fileTypes-editor.vue
+++ b/src/components/form-designer/setting-panel/property-editor/field-file-upload/file-upload-fileTypes-editor.vue
@@ -3,7 +3,7 @@
{{i18nt('designer.setting.fileTypes')}}
-
+
{{i18nt('designer.setting.fileTypes')}}
-
+
- {{i18nt('designer.componentLib')}}
+ {{i18nt('designer.componentLib')}}
@@ -61,7 +61,7 @@
- {{i18nt('designer.formLib')}}
+ {{i18nt('designer.formLib')}}
diff --git a/src/components/form-designer/widget-panel/widgetsConfig.js b/src/components/form-designer/widget-panel/widgetsConfig.js
index abcff3a..bcdb939 100644
--- a/src/components/form-designer/widget-panel/widgetsConfig.js
+++ b/src/components/form-designer/widget-panel/widgetsConfig.js
@@ -146,7 +146,7 @@ export const basicFields = [
suffixIcon: '',
appendButton: false,
appendButtonDisabled: false,
- buttonIcon: 'el-icon-search',
+ buttonIcon: 'custom-search',
//-------------------
onCreated: '',
onMounted: '',
diff --git a/src/components/form-render/container-item/sub-form-item.vue b/src/components/form-render/container-item/sub-form-item.vue
index 7fbdd8f..7ce8482 100644
--- a/src/components/form-render/container-item/sub-form-item.vue
+++ b/src/components/form-render/container-item/sub-form-item.vue
@@ -8,7 +8,7 @@
{{i18nt('render.hint.subFormAction')}}
- {{i18nt('render.hint.subFormAddAction')}}
+ {{i18nt('render.hint.subFormAddAction')}}
- {{subWidget.options.label}}
+
{{subWidget.options.label}}
- {{subWidget.options.label}}
+
{{subWidget.options.label}}
{{subWidget.options.label}}
-
+
- {{subWidget.options.label}}
+ {{subWidget.options.label}}
diff --git a/src/icons/index.js b/src/icons/index.js
deleted file mode 100644
index cc5a89c..0000000
--- a/src/icons/index.js
+++ /dev/null
@@ -1,12 +0,0 @@
-//import { vfApp } from '@/utils/create-app'
-import SvgIcon from '@/components/svg-icon'// svg组件
-
-// register globally
-//vfApp.component('svg-icon', SvgIcon)
-
-// const requireAll = requireContext => requireContext.keys().map(requireContext)
-// const req = require.context('./svg', false, /\.svg$/)
-// requireAll(req)
-
-
-//const modules = import.meta.globEager('./**/*.svg')
diff --git a/src/icons/svg/custom/search.svg b/src/icons/svg/custom/search.svg
new file mode 100644
index 0000000..de08179
--- /dev/null
+++ b/src/icons/svg/custom/search.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/icons/svg/el/arrow-down.svg b/src/icons/svg/el/arrow-down.svg
new file mode 100644
index 0000000..b0c9529
--- /dev/null
+++ b/src/icons/svg/el/arrow-down.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/icons/svg/el/download.svg b/src/icons/svg/el/download.svg
new file mode 100644
index 0000000..c60c3b9
--- /dev/null
+++ b/src/icons/svg/el/download.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/icons/svg/el/form-template.svg b/src/icons/svg/el/form-template.svg
new file mode 100644
index 0000000..1f8a762
--- /dev/null
+++ b/src/icons/svg/el/form-template.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/icons/svg/el/plus.svg b/src/icons/svg/el/plus.svg
new file mode 100644
index 0000000..f040aa6
--- /dev/null
+++ b/src/icons/svg/el/plus.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/icons/svg/el/set-up.svg b/src/icons/svg/el/set-up.svg
new file mode 100644
index 0000000..83df3f6
--- /dev/null
+++ b/src/icons/svg/el/set-up.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/lang/en-US.js b/src/lang/en-US.js
index 6e227cf..71a4c1f 100644
--- a/src/lang/en-US.js
+++ b/src/lang/en-US.js
@@ -83,6 +83,8 @@ export default {
copyHtmlCode: 'Copy HTML Code',
copyJsonSuccess: 'Copy succeed',
importJsonSuccess: 'Import succeed',
+ invalidJsonFormat: 'Invalid JSON format',
+ jsonVersionMismatch: 'Version of JSON mismatch',
copyJsonFail: 'Copy failed',
copyVueCodeSuccess: 'Copy succeed',
copyVueCodeFail: 'Copy failed',
diff --git a/src/lang/zh-CN.js b/src/lang/zh-CN.js
index 2c78b88..9749426 100644
--- a/src/lang/zh-CN.js
+++ b/src/lang/zh-CN.js
@@ -83,6 +83,8 @@ export default {
copyHtmlCode: '复制HTML代码',
copyJsonSuccess: '复制JSON成功',
importJsonSuccess: '导入JSON成功',
+ invalidJsonFormat: '无效的表单JSON格式',
+ jsonVersionMismatch: '表单JSON版本号不匹配',
copyJsonFail: '复制JSON失败',
copyVueCodeSuccess: '复制Vue代码成功',
copyVueCodeFail: '复制Vue代码失败',
diff --git a/src/main.js b/src/main.js
index 77f5c94..0dd6f48 100644
--- a/src/main.js
+++ b/src/main.js
@@ -4,8 +4,10 @@ import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import '@/styles/index.scss'
+import '@/iconfont/iconfont.css'
import Draggable from '@/../lib/vuedraggable/dist/vuedraggable.umd.js'
//import Draggable from 'vuedraggable'
+import {registerIcon} from '@/utils/el-icons'
import SvgIcon from '@/components/svg-icon' //svg组件
import 'virtual:svg-icons-register'
@@ -23,6 +25,7 @@ if (typeof window !== 'undefined') {
const vfApp = createApp(App)
vfApp.use(ElementPlus)
+registerIcon(vfApp)
vfApp.component('draggable', Draggable)
vfApp.component('svg-icon', SvgIcon)
addDirective(vfApp)
diff --git a/src/utils/el-icons.js b/src/utils/el-icons.js
new file mode 100644
index 0000000..9e6e391
--- /dev/null
+++ b/src/utils/el-icons.js
@@ -0,0 +1,9 @@
+import {Edit, Minus, Plus, InfoFilled, Search} from '@element-plus/icons-vue'
+
+export function registerIcon(app) {
+ app.component('el-icon-edit', Edit)
+ app.component('el-icon-minus', Minus)
+ app.component('el-icon-plus', Plus)
+ app.component('el-icon-info', InfoFilled)
+ app.component('el-icon-search', Search)
+}