fix: 增加必要的方法

This commit is contained in:
LeoYuan 袁力皓 2022-02-16 21:21:25 +08:00
parent b8b265866b
commit 96aeadcb0b
3 changed files with 9 additions and 1 deletions

View File

@ -24,7 +24,6 @@
"setup:test": "./scripts/setup-for-test.sh",
"setup:skip-build": "./scripts/setup-skip-build.sh",
"start": "./scripts/start.sh",
"start:demo": "./scripts/start.sh @ali/lowcode-demo",
"test": "lerna run test --stream",
"test:snapshot": "lerna run test:snapshot",
"watchdog:build": "node ./scripts/watchdog.js",

View File

@ -153,6 +153,7 @@ class SettingFieldView extends Component<{ field: SettingField }> {
if (value === undefined && isInitialValueNotEmpty(initialValue)) {
const _initialValue = typeof initialValue === 'function' ? initialValue(field.internalToShellPropEntry()) : initialValue;
field.setValue(_initialValue);
value = _initialValue;
}
let _onChange = extraProps?.onChange;

View File

@ -124,6 +124,14 @@ export default class SettingPropEntry {
this[settingPropEntrySymbol].setPropValue(propName, value);
}
/**
*
* @param propName
*/
clearPropValue(propName: string | number) {
this[settingPropEntrySymbol].clearPropValue(propName);
}
/**
*
* @returns