From af06777daf4daa28ef4a15d67173e524805043d5 Mon Sep 17 00:00:00 2001 From: vdpAdmin Date: Fri, 25 Mar 2022 16:54:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=88=B03.0.6=EF=BC=9A=201.?= =?UTF-8?q?=20JS=E4=BB=A3=E7=A0=81=E7=BC=96=E8=BE=91=E5=99=A8=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=AF=AD=E6=B3=95=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=EF=BC=9B=202.=20=E4=BF=AE=E5=A4=8Dlib-render=E6=89=93=E5=8C=85?= =?UTF-8?q?=E4=B8=A2=E5=A4=B1svg=E5=9B=BE=E6=A0=87=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=9B=203.=20=E4=BF=AE=E5=A4=8D=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E5=B0=91=E9=87=8Fbug=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install-render.js | 5 ++ install.js | 2 + package.json | 2 +- src/components/code-editor/index.vue | 4 + src/components/form-designer/index.vue | 2 + .../setting-panel/form-setting.vue | 34 +++++++- .../form-designer/setting-panel/index.vue | 17 +++- .../form-designer/toolbar-panel/index.vue | 77 +++++++++++++------ .../form-designer/widget-panel/index.vue | 45 +++++------ .../widget-panel/templatesConfig.js | 16 ++-- .../widget-panel/widgetsConfig.js | 11 --- .../container-item/sub-form-item.vue | 10 +-- src/components/form-render/index.vue | 6 +- src/extension/extension-loader.js | 2 +- src/lang/en-US.js | 1 + src/lang/zh-CN.js | 1 + src/utils/config.js | 2 +- vite-lib-render.config.js | 4 + 18 files changed, 162 insertions(+), 79 deletions(-) diff --git a/install-render.js b/install-render.js index e6eb6df..3b75670 100644 --- a/install-render.js +++ b/install-render.js @@ -3,7 +3,10 @@ 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 SvgIcon from '@/components/svg-icon' //svg组件 +import 'virtual:svg-icons-register' +import '@/iconfont/iconfont.css' import { installI18n } from '@/utils/i18n' import { loadExtension } from '@/extension/extension-loader' @@ -13,6 +16,7 @@ VFormRender.install = function (app) { loadExtension(app) app.use(ContainerItems) + registerIcon(app) app.component('svg-icon', SvgIcon) app.component(VFormRender.name, VFormRender) } @@ -26,6 +30,7 @@ const install = (app) => { loadExtension(app) app.use(ContainerItems) + registerIcon(app) app.component('svg-icon', SvgIcon) components.forEach(component => { app.component(component.name, component) diff --git a/install.js b/install.js index 969b29c..f2b7758 100644 --- a/install.js +++ b/install.js @@ -37,6 +37,7 @@ VFormRender.install = function (app) { app.use(ContainerItems) + registerIcon(app) app.component('svg-icon', SvgIcon) app.component(VFormRender.name, VFormRender) } @@ -54,6 +55,7 @@ const install = (app) => { app.use(ContainerWidgets) app.use(ContainerItems) + registerIcon(app) app.component('draggable', Draggable) app.component('svg-icon', SvgIcon) diff --git a/package.json b/package.json index 42b2f1a..7dc0d44 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "variant-form3", - "version": "3.0.5", + "version": "3.0.6", "private": false, "scripts": { "serve": "vite", diff --git a/src/components/code-editor/index.vue b/src/components/code-editor/index.vue index cbfa8dc..24d427c 100644 --- a/src/components/code-editor/index.vue +++ b/src/components/code-editor/index.vue @@ -119,6 +119,10 @@ this.aceEditor.getSession().setMode('ace/mode/css') }, + getEditorAnnotations() { + return this.aceEditor.getSession().getAnnotations() + }, + } } diff --git a/src/components/form-designer/index.vue b/src/components/form-designer/index.vue index d8ecb98..50aed0b 100644 --- a/src/components/form-designer/index.vue +++ b/src/components/form-designer/index.vue @@ -113,6 +113,8 @@ exportJsonButton: true, //是否显示导出JSON器按钮 exportCodeButton: true, //是否显示导出代码按钮 generateSFCButton: true, //是否显示生成SFC按钮 + toolbarMaxWidth: 420, //设计器工具按钮栏最大宽度(单位像素) + toolbarMinWidth: 300, //设计器工具按钮栏最小宽度(单位像素) presetCssCode: '', //设计器预设CSS样式代码 diff --git a/src/components/form-designer/setting-panel/form-setting.vue b/src/components/form-designer/setting-panel/form-setting.vue index 05fe479..3f664e8 100644 --- a/src/components/form-designer/setting-panel/form-setting.vue +++ b/src/components/form-designer/setting-panel/form-setting.vue @@ -85,7 +85,7 @@ :show-close="true" custom-class="drag-dialog small-padding-dialog" :close-on-click-modal="false" :close-on-press-escape="false" :destroy-on-close="true"> - +