From c5811b82b8905b7161cfc296a2d8d4097dee80bc Mon Sep 17 00:00:00 2001 From: xiaohong <1315228474@qq.com> Date: Tue, 30 Jul 2024 11:08:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=84=E7=90=86=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E5=8F=B3=E4=BE=A7=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=9D=A2=E6=9D=BF=E8=A1=A8=E5=8D=95=E4=B8=8D?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../VFormDesign/components/ComponentProps.vue | 13 +++++++++---- .../components/FormItemColumnProps.vue | 16 ++++++++++++---- .../VFormDesign/components/FormItemProps.vue | 18 +++++++++++------- .../VFormDesign/components/FormProps.vue | 6 ++++-- 4 files changed, 36 insertions(+), 17 deletions(-) diff --git a/src/components/FormDesign/src/components/VFormDesign/components/ComponentProps.vue b/src/components/FormDesign/src/components/VFormDesign/components/ComponentProps.vue index dda6ded3..7525f7e7 100644 --- a/src/components/FormDesign/src/components/VFormDesign/components/ComponentProps.vue +++ b/src/components/FormDesign/src/components/VFormDesign/components/ComponentProps.vue @@ -14,6 +14,7 @@ import { import { formItemsForEach, remove } from '../../../utils' import type { IBaseFormAttrs } from '../config/formItemPropsConfig' import FormOptions from './FormOptions.vue' +import { componentMap } from '../../../../../Form/src/componentMap.ts' const { formConfig } = useFormDesignState() // 让compuated属性自动更新 @@ -106,6 +107,10 @@ const inputOptions = computed(() => { }) }) +const Com = computed(() => { + return com => componentMap.get(com) as ReturnType +}) + watch( () => formConfig.value.currentItem!.componentProps, () => { @@ -133,7 +138,7 @@ const linkOptions = computed(() => {
-
+
@@ -144,7 +149,7 @@ const linkOptions = computed(() => { diff --git a/src/components/FormDesign/src/components/VFormDesign/components/FormItemColumnProps.vue b/src/components/FormDesign/src/components/VFormDesign/components/FormItemColumnProps.vue index ccfeb7a5..8da5ec7a 100644 --- a/src/components/FormDesign/src/components/VFormDesign/components/FormItemColumnProps.vue +++ b/src/components/FormDesign/src/components/VFormDesign/components/FormItemColumnProps.vue @@ -2,11 +2,13 @@ * @Description: 表单项属性 --> diff --git a/src/components/FormDesign/src/components/VFormDesign/components/FormItemProps.vue b/src/components/FormDesign/src/components/VFormDesign/components/FormItemProps.vue index 9c6e92f8..bcd54970 100644 --- a/src/components/FormDesign/src/components/VFormDesign/components/FormItemProps.vue +++ b/src/components/FormDesign/src/components/VFormDesign/components/FormItemProps.vue @@ -2,7 +2,7 @@ * @Description: 表单项属性,控件属性面板 --> diff --git a/src/components/FormDesign/src/components/VFormDesign/components/FormProps.vue b/src/components/FormDesign/src/components/VFormDesign/components/FormProps.vue index 97ce2b63..17096de4 100644 --- a/src/components/FormDesign/src/components/VFormDesign/components/FormProps.vue +++ b/src/components/FormDesign/src/components/VFormDesign/components/FormProps.vue @@ -11,6 +11,8 @@ import { FormItem, InputNumber, Slider, + RadioGroup, + RadioButton } from 'ant-design-vue' import { useFormDesignState } from '../../../hooks/useFormDesignState' @@ -38,7 +40,7 @@ const sliderSpan = computed(() => {