From a12c5706e8da2fa935e5ab56e95775b47f25c8ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=89=8D=E7=AB=AF=E7=88=B1=E7=A0=81=E5=A3=AB?= Date: Mon, 14 Nov 2022 11:54:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dprops=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=AD=97=E6=AE=B5default=E8=BF=94=E5=9B=9E=E7=A9=BA?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1=E8=AF=AD=E6=B3=95=E9=97=AE=E9=A2=98=20(#2369?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Form/src/props.ts | 2 +- src/components/Menu/src/props.ts | 2 +- src/components/Tinymce/src/Editor.vue | 2 +- src/components/Upload/src/props.ts | 2 +- src/components/Verify/src/props.ts | 10 +++++----- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/Form/src/props.ts b/src/components/Form/src/props.ts index bfdaee7e..a9eee16b 100644 --- a/src/components/Form/src/props.ts +++ b/src/components/Form/src/props.ts @@ -9,7 +9,7 @@ import { propTypes } from '/@/utils/propTypes'; export const basicProps = { model: { type: Object as PropType, - default: {}, + default: () => ({}), }, // 标签宽度 固定宽度 labelWidth: { diff --git a/src/components/Menu/src/props.ts b/src/components/Menu/src/props.ts index ed3f010d..5ad0dc03 100644 --- a/src/components/Menu/src/props.ts +++ b/src/components/Menu/src/props.ts @@ -41,7 +41,7 @@ export const basicProps = { export const itemProps = { item: { type: Object as PropType, - default: {}, + default: () => ({}), }, level: propTypes.number, theme: propTypes.oneOf(['dark', 'light']), diff --git a/src/components/Tinymce/src/Editor.vue b/src/components/Tinymce/src/Editor.vue index b84c5fbb..0ebc8a89 100644 --- a/src/components/Tinymce/src/Editor.vue +++ b/src/components/Tinymce/src/Editor.vue @@ -76,7 +76,7 @@ const tinymceProps = { options: { type: Object as PropType>, - default: {}, + default: () => ({}), }, value: { type: String, diff --git a/src/components/Upload/src/props.ts b/src/components/Upload/src/props.ts index 413b95d7..c10b7f40 100644 --- a/src/components/Upload/src/props.ts +++ b/src/components/Upload/src/props.ts @@ -27,7 +27,7 @@ export const basicProps = { }, uploadParams: { type: Object as PropType, - default: {}, + default: () => ({}), }, api: { type: Function as PropType, diff --git a/src/components/Verify/src/props.ts b/src/components/Verify/src/props.ts index 1e149703..d09a57ab 100644 --- a/src/components/Verify/src/props.ts +++ b/src/components/Verify/src/props.ts @@ -38,19 +38,19 @@ export const basicProps = { wrapStyle: { type: Object as PropType, - default: {}, + default: () => ({}), }, contentStyle: { type: Object as PropType, - default: {}, + default: () => ({}), }, barStyle: { type: Object as PropType, - default: {}, + default: () => ({}), }, actionStyle: { type: Object as PropType, - default: {}, + default: () => ({}), }, }; @@ -67,7 +67,7 @@ export const rotateProps = { imgWrapStyle: { type: Object as PropType, - default: {}, + default: () => ({}), }, minDegree: {