mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 03:01:16 +00:00
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:
parent
7469a43b46
commit
9aacf3daee
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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',
|
||||
|
||||
16
packages/designer/tests/fixtures/schema/form.ts
vendored
16
packages/designer/tests/fixtures/schema/form.ts
vendored
@ -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': '',
|
||||
},
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user