fix: 修复props默认字段default返回空对象语法问题 (#2369)
This commit is contained in:
parent
6fa35521b7
commit
a12c5706e8
|
|
@ -9,7 +9,7 @@ import { propTypes } from '/@/utils/propTypes';
|
|||
export const basicProps = {
|
||||
model: {
|
||||
type: Object as PropType<Recordable>,
|
||||
default: {},
|
||||
default: () => ({}),
|
||||
},
|
||||
// 标签宽度 固定宽度
|
||||
labelWidth: {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ export const basicProps = {
|
|||
export const itemProps = {
|
||||
item: {
|
||||
type: Object as PropType<Menu>,
|
||||
default: {},
|
||||
default: () => ({}),
|
||||
},
|
||||
level: propTypes.number,
|
||||
theme: propTypes.oneOf(['dark', 'light']),
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@
|
|||
const tinymceProps = {
|
||||
options: {
|
||||
type: Object as PropType<Partial<RawEditorSettings>>,
|
||||
default: {},
|
||||
default: () => ({}),
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ export const basicProps = {
|
|||
},
|
||||
uploadParams: {
|
||||
type: Object as PropType<any>,
|
||||
default: {},
|
||||
default: () => ({}),
|
||||
},
|
||||
api: {
|
||||
type: Function as PropType<PromiseFn>,
|
||||
|
|
|
|||
|
|
@ -38,19 +38,19 @@ export const basicProps = {
|
|||
|
||||
wrapStyle: {
|
||||
type: Object as PropType<any>,
|
||||
default: {},
|
||||
default: () => ({}),
|
||||
},
|
||||
contentStyle: {
|
||||
type: Object as PropType<any>,
|
||||
default: {},
|
||||
default: () => ({}),
|
||||
},
|
||||
barStyle: {
|
||||
type: Object as PropType<any>,
|
||||
default: {},
|
||||
default: () => ({}),
|
||||
},
|
||||
actionStyle: {
|
||||
type: Object as PropType<any>,
|
||||
default: {},
|
||||
default: () => ({}),
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ export const rotateProps = {
|
|||
|
||||
imgWrapStyle: {
|
||||
type: Object as PropType<any>,
|
||||
default: {},
|
||||
default: () => ({}),
|
||||
},
|
||||
|
||||
minDegree: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue