fix(exportschema): exportSchema(IPublicEnumTransformStage.Save) type conver (#2661)

* fix(exportschema): exportSchema(IPublicEnumTransformStage.Save) type conver

* test(prop): nullProp equals null, not
This commit is contained in:
AprChell 2023-11-20 16:24:27 +08:00 committed by JackLian
parent 7469a43b46
commit 9aacf3daee
3 changed files with 9 additions and 13 deletions

View File

@ -290,10 +290,6 @@ export class Prop implements IProp, IPropParent {
}
if (type === 'literal' || type === 'expression') {
// TODO 后端改造之后删除此逻辑
if (this._value === null && stage === IPublicEnumTransformStage.Save) {
return '';
}
return this._value;
}

View File

@ -136,7 +136,7 @@ describe('Prop 类测试', () => {
expect(boolProp.export(IPublicEnumTransformStage.Save)).toBe(true);
expect(strProp.export(IPublicEnumTransformStage.Save)).toBe('haha');
expect(numProp.export(IPublicEnumTransformStage.Save)).toBe(1);
expect(nullProp.export(IPublicEnumTransformStage.Save)).toBe('');
expect(nullProp.export(IPublicEnumTransformStage.Save)).toBe(null);
expect(nullProp.export(IPublicEnumTransformStage.Serilize)).toBe(null);
expect(expProp.export(IPublicEnumTransformStage.Save)).toEqual({
type: 'JSExpression',

View File

@ -267,7 +267,7 @@ export default {
labelTipsText: {
type: 'i18n',
use: 'zh-CN',
'en-US': null,
'en-US': '',
'zh-CN': '',
},
},
@ -337,7 +337,7 @@ export default {
labelTipsText: {
type: 'i18n',
use: 'zh-CN',
'en-US': null,
'en-US': '',
'zh-CN': '',
},
},
@ -407,7 +407,7 @@ export default {
labelTipsText: {
type: 'i18n',
use: 'zh-CN',
'en-US': null,
'en-US': '',
'zh-CN': '',
},
},
@ -489,7 +489,7 @@ export default {
labelTipsText: {
type: 'i18n',
use: 'zh-CN',
'en-US': null,
'en-US': '',
'zh-CN': '',
},
},
@ -578,7 +578,7 @@ export default {
labelTipsText: {
type: 'i18n',
use: 'zh-CN',
'en-US': null,
'en-US': '',
'zh-CN': '',
},
searchDelay: 300,
@ -697,7 +697,7 @@ export default {
labelTipsText: {
type: 'i18n',
use: 'zh-CN',
'en-US': null,
'en-US': '',
'zh-CN': '',
},
},
@ -789,7 +789,7 @@ export default {
labelTipsText: {
type: 'i18n',
use: 'zh-CN',
'en-US': null,
'en-US': '',
'zh-CN': '',
},
},
@ -871,7 +871,7 @@ export default {
labelTipsText: {
type: 'i18n',
use: 'zh-CN',
'en-US': null,
'en-US': '',
'zh-CN': '',
},
},