mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-18 13:28:24 +00:00
fix: 跳过 JSSlot 类型的快捷设值
This commit is contained in:
parent
277a18564a
commit
ab45c0f255
@ -1,5 +1,5 @@
|
||||
import { ReactInstance } from 'react';
|
||||
import { ActivityData } from '@ali/lowcode-types';
|
||||
import { ActivityData, isJSSlot } from '@ali/lowcode-types';
|
||||
import { DocumentInstance } from '../renderer';
|
||||
|
||||
interface UtilsMetadata {
|
||||
@ -58,15 +58,18 @@ export function supportsQuickPropSetting(data: ActivityData, doc: DocumentInstan
|
||||
const nodeId = schema.id!;
|
||||
// const key = data.payload.prop.key;
|
||||
const instances = doc.instancesMap.get(nodeId);
|
||||
const uppermostPropKey = getUppermostPropKey(prop);
|
||||
const propKey = getUppermostPropKey(prop);
|
||||
let value = (schema.props as any)[propKey];
|
||||
|
||||
return (
|
||||
nodeId &&
|
||||
Array.isArray(instances) &&
|
||||
instances.length > 0 &&
|
||||
haveForceUpdate(instances) &&
|
||||
uppermostPropKey &&
|
||||
!uppermostPropKey.startsWith('___')
|
||||
propKey &&
|
||||
// 不是 extraProp
|
||||
!propKey.startsWith('___') &&
|
||||
!isJSSlot(value)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user