mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 01:21:58 +00:00
fix: fieldId 重置需要限定在同一个 doc, 解决多 doc 时 fieldId 重复导致重置的问题
This commit is contained in:
parent
2acc70a422
commit
7d2bb4fa79
@ -233,7 +233,7 @@ export class Designer {
|
||||
|
||||
private _dropLocation?: DropLocation;
|
||||
|
||||
dropLocation() {
|
||||
get dropLocation() {
|
||||
return this._dropLocation;
|
||||
}
|
||||
|
||||
|
||||
@ -14,10 +14,10 @@ export function initNodeReducer(props, node) {
|
||||
...props,
|
||||
};
|
||||
if (newProps.fieldId) {
|
||||
const fieldIds = getCurrentFieldIds();
|
||||
const { doc, fieldIds } = getCurrentFieldIds();
|
||||
|
||||
// 全局的关闭 uniqueIdChecker 信号,在 ve-utils 中实现
|
||||
if (fieldIds.indexOf(props.fieldId) >= 0 && !(window as any).__disable_unique_id_checker__) {
|
||||
if (doc === node.document && fieldIds.indexOf(props.fieldId) >= 0 && !(window as any).__disable_unique_id_checker__) {
|
||||
newProps.fieldId = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ export function getCurrentFieldIds() {
|
||||
fieldIds.push(fieldId);
|
||||
}
|
||||
});
|
||||
return fieldIds;
|
||||
return { doc: designer?.currentDocument, fieldIds };
|
||||
}
|
||||
|
||||
export function invariant(check: any, message: string, thing?: any) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user