mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 09:41:57 +00:00
Merge branch 'release/0.9.0' of gitlab.alibaba-inc.com:ali-lowcode/ali-lowcode-engine into release/0.9.0
This commit is contained in:
commit
3ba58bcdd0
@ -16,8 +16,9 @@ class SettingFieldView extends Component<{ field: SettingField }> {
|
||||
|
||||
render() {
|
||||
const { field } = this.props;
|
||||
const { extraProps } = field;
|
||||
const { extraProps, componentMeta } = field;
|
||||
const { condition, defaultValue, display } = extraProps;
|
||||
const { prototype } = componentMeta;
|
||||
let visible;
|
||||
try {
|
||||
visible = field.isSingle && typeof condition === 'function' ? condition(field) !== false : true;
|
||||
@ -33,6 +34,8 @@ class SettingFieldView extends Component<{ field: SettingField }> {
|
||||
let setterProps: any = {};
|
||||
let setterType: any;
|
||||
let initialValue: any = null;
|
||||
const isReactComponent = prototype === null || prototype === undefined;
|
||||
console.log(111, this.props);
|
||||
if (Array.isArray(setter)) {
|
||||
setterType = 'MixedSetter';
|
||||
setterProps = {
|
||||
@ -49,9 +52,15 @@ class SettingFieldView extends Component<{ field: SettingField }> {
|
||||
if (setter.initialValue != null) {
|
||||
initialValue = setter.initialValue;
|
||||
}
|
||||
} else if (isReactComponent) {
|
||||
setterType = 'MixedSetter';
|
||||
setterProps = {
|
||||
setters: [setter, 'VariableSetter'],
|
||||
};
|
||||
} else if (setter) {
|
||||
setterType = setter;
|
||||
}
|
||||
|
||||
let value = null;
|
||||
if (defaultValue != null && !('defaultValue' in setterProps)) {
|
||||
setterProps.defaultValue = defaultValue;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user