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 = {
|
export const basicProps = {
|
||||||
model: {
|
model: {
|
||||||
type: Object as PropType<Recordable>,
|
type: Object as PropType<Recordable>,
|
||||||
default: {},
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
// 标签宽度 固定宽度
|
// 标签宽度 固定宽度
|
||||||
labelWidth: {
|
labelWidth: {
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ export const basicProps = {
|
||||||
export const itemProps = {
|
export const itemProps = {
|
||||||
item: {
|
item: {
|
||||||
type: Object as PropType<Menu>,
|
type: Object as PropType<Menu>,
|
||||||
default: {},
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
level: propTypes.number,
|
level: propTypes.number,
|
||||||
theme: propTypes.oneOf(['dark', 'light']),
|
theme: propTypes.oneOf(['dark', 'light']),
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@
|
||||||
const tinymceProps = {
|
const tinymceProps = {
|
||||||
options: {
|
options: {
|
||||||
type: Object as PropType<Partial<RawEditorSettings>>,
|
type: Object as PropType<Partial<RawEditorSettings>>,
|
||||||
default: {},
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
value: {
|
value: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ export const basicProps = {
|
||||||
},
|
},
|
||||||
uploadParams: {
|
uploadParams: {
|
||||||
type: Object as PropType<any>,
|
type: Object as PropType<any>,
|
||||||
default: {},
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
api: {
|
api: {
|
||||||
type: Function as PropType<PromiseFn>,
|
type: Function as PropType<PromiseFn>,
|
||||||
|
|
|
||||||
|
|
@ -38,19 +38,19 @@ export const basicProps = {
|
||||||
|
|
||||||
wrapStyle: {
|
wrapStyle: {
|
||||||
type: Object as PropType<any>,
|
type: Object as PropType<any>,
|
||||||
default: {},
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
contentStyle: {
|
contentStyle: {
|
||||||
type: Object as PropType<any>,
|
type: Object as PropType<any>,
|
||||||
default: {},
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
barStyle: {
|
barStyle: {
|
||||||
type: Object as PropType<any>,
|
type: Object as PropType<any>,
|
||||||
default: {},
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
actionStyle: {
|
actionStyle: {
|
||||||
type: Object as PropType<any>,
|
type: Object as PropType<any>,
|
||||||
default: {},
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -67,7 +67,7 @@ export const rotateProps = {
|
||||||
|
|
||||||
imgWrapStyle: {
|
imgWrapStyle: {
|
||||||
type: Object as PropType<any>,
|
type: Object as PropType<any>,
|
||||||
default: {},
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
|
|
||||||
minDegree: {
|
minDegree: {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue