mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-02 03:02:19 +08:00
fix: bug
This commit is contained in:
parent
395f9b67fc
commit
951380a27d
@ -19,6 +19,7 @@ export class DataBlockModel<T = DefaultStructure> extends BlockModel<T> {
|
|||||||
this.setSharedContext({
|
this.setSharedContext({
|
||||||
currentBlockModel: this,
|
currentBlockModel: this,
|
||||||
});
|
});
|
||||||
|
console.log('DataBlockModel onInit', this);
|
||||||
}
|
}
|
||||||
|
|
||||||
addAppends(fieldPath: string, refresh = false) {
|
addAppends(fieldPath: string, refresh = false) {
|
||||||
|
@ -84,7 +84,6 @@ export class TableModel extends DataBlockModel<S> {
|
|||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
onModelCreated={async (model: TableColumnModel) => {
|
onModelCreated={async (model: TableColumnModel) => {
|
||||||
console.log(model.parent, model.getSharedContext());
|
|
||||||
// model.setSharedContext({ currentBlockModel: this });
|
// model.setSharedContext({ currentBlockModel: this });
|
||||||
await model.applyAutoFlows();
|
await model.applyAutoFlows();
|
||||||
}}
|
}}
|
||||||
|
@ -64,7 +64,7 @@ export class FlowModel<Structure extends { parent?: any; subModels?: any } = Def
|
|||||||
/**
|
/**
|
||||||
* model 树的共享运行上下文
|
* model 树的共享运行上下文
|
||||||
*/
|
*/
|
||||||
private _sharedContext: Record<string, any> = {};
|
protected _sharedContext: Record<string, any> = {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上一次 applyAutoFlows 的执行参数
|
* 上一次 applyAutoFlows 的执行参数
|
||||||
@ -851,7 +851,8 @@ export class FlowModel<Structure extends { parent?: any; subModels?: any } = Def
|
|||||||
}
|
}
|
||||||
|
|
||||||
public setSharedContext(ctx: Record<string, any>) {
|
public setSharedContext(ctx: Record<string, any>) {
|
||||||
this._sharedContext = { ...this._sharedContext, ...ctx };
|
this._sharedContext = ctx;
|
||||||
|
// this._sharedContext = { ...this._sharedContext, ...ctx };
|
||||||
}
|
}
|
||||||
|
|
||||||
public getSharedContext() {
|
public getSharedContext() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user