mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-06 18:37:07 +00:00
feat: update
This commit is contained in:
commit
29d3e9657b
@ -37,9 +37,9 @@ export class History<T = NodeSchema> {
|
|||||||
this.records = [this.session];
|
this.records = [this.session];
|
||||||
|
|
||||||
reaction((): any => {
|
reaction((): any => {
|
||||||
if (this.asleep) return null;
|
|
||||||
return dataFn();
|
return dataFn();
|
||||||
}, (data: T) => {
|
}, (data: T) => {
|
||||||
|
if (this.asleep) return null;
|
||||||
untracked(() => {
|
untracked(() => {
|
||||||
const log = this.currentSerialization.serialize(data);
|
const log = this.currentSerialization.serialize(data);
|
||||||
if (this.session.isActive()) {
|
if (this.session.isActive()) {
|
||||||
|
|||||||
@ -9,7 +9,7 @@ const utils = {
|
|||||||
getNodeSchemaById,
|
getNodeSchemaById,
|
||||||
getConvertedExtraKey,
|
getConvertedExtraKey,
|
||||||
getOriginalExtraKey,
|
getOriginalExtraKey,
|
||||||
startTransaction: transactionManager.startTransaction,
|
executeTransaction: transactionManager.executeTransaction.bind(transactionManager),
|
||||||
};
|
};
|
||||||
|
|
||||||
export default utils;
|
export default utils;
|
||||||
@ -233,7 +233,7 @@ export function leafWrapper(Comp: types.IBaseRenderComponent, {
|
|||||||
const {
|
const {
|
||||||
hidden = false,
|
hidden = false,
|
||||||
condition = true,
|
condition = true,
|
||||||
} = nextProps.__inner__ || {};
|
} = nextProps.__inner__ || this.leaf?.export?.(TransformStage.Render) || {};
|
||||||
return {
|
return {
|
||||||
nodeChildren: null,
|
nodeChildren: null,
|
||||||
childrenInState: false,
|
childrenInState: false,
|
||||||
@ -399,7 +399,11 @@ export function leafWrapper(Comp: types.IBaseRenderComponent, {
|
|||||||
|
|
||||||
/** 监听参数变化 */
|
/** 监听参数变化 */
|
||||||
initOnPropsChangeEvent(leaf = this.leaf): void {
|
initOnPropsChangeEvent(leaf = this.leaf): void {
|
||||||
|
<<<<<<< HEAD
|
||||||
const dispose = leaf?.onPropChange?.((propChangeInfo: PropChangeOptions) => {
|
const dispose = leaf?.onPropChange?.((propChangeInfo: PropChangeOptions) => {
|
||||||
|
=======
|
||||||
|
const dispose = leaf?.onPropChange?.(debounce((propChangeInfo: PropChangeOptions) => {
|
||||||
|
>>>>>>> feat/autoRepaintNode
|
||||||
if (!this.autoRepaintNode) {
|
if (!this.autoRepaintNode) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -449,7 +453,11 @@ export function leafWrapper(Comp: types.IBaseRenderComponent, {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.judgeMiniUnitRender();
|
this.judgeMiniUnitRender();
|
||||||
|
<<<<<<< HEAD
|
||||||
});
|
});
|
||||||
|
=======
|
||||||
|
}, 20));
|
||||||
|
>>>>>>> feat/autoRepaintNode
|
||||||
|
|
||||||
dispose && this.disposeFunctions.push(dispose);
|
dispose && this.disposeFunctions.push(dispose);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,6 +11,12 @@ exports[`Base Render renderComp 1`] = `
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
__id="node_dockcy8n9xed"
|
__id="node_dockcy8n9xed"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="next-box"
|
className="next-box"
|
||||||
style={
|
style={
|
||||||
Object {
|
Object {
|
||||||
@ -25,6 +31,12 @@ exports[`Base Render renderComp 1`] = `
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
__id="node_dockcy8n9xee"
|
__id="node_dockcy8n9xee"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="next-box"
|
className="next-box"
|
||||||
style={
|
style={
|
||||||
Object {
|
Object {
|
||||||
@ -39,6 +51,12 @@ exports[`Base Render renderComp 1`] = `
|
|||||||
>
|
>
|
||||||
<nav
|
<nav
|
||||||
__id="node_dockcy8n9xef"
|
__id="node_dockcy8n9xef"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
aria-label="Breadcrumb"
|
aria-label="Breadcrumb"
|
||||||
style={
|
style={
|
||||||
Object {
|
Object {
|
||||||
@ -55,6 +73,12 @@ exports[`Base Render renderComp 1`] = `
|
|||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
__id="node_dockcy8n9xeg"
|
__id="node_dockcy8n9xeg"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="next-breadcrumb-text"
|
className="next-breadcrumb-text"
|
||||||
>
|
>
|
||||||
首页
|
首页
|
||||||
@ -74,6 +98,12 @@ exports[`Base Render renderComp 1`] = `
|
|||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
__id="node_dockcy8n9xei"
|
__id="node_dockcy8n9xei"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="next-breadcrumb-text"
|
className="next-breadcrumb-text"
|
||||||
>
|
>
|
||||||
品质中台
|
品质中台
|
||||||
@ -93,6 +123,12 @@ exports[`Base Render renderComp 1`] = `
|
|||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
__id="node_dockcy8n9xek"
|
__id="node_dockcy8n9xek"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="next-breadcrumb-text"
|
className="next-breadcrumb-text"
|
||||||
>
|
>
|
||||||
商家品质页面管理
|
商家品质页面管理
|
||||||
@ -112,6 +148,12 @@ exports[`Base Render renderComp 1`] = `
|
|||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
__id="node_dockcy8n9xem"
|
__id="node_dockcy8n9xem"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
aria-current="page"
|
aria-current="page"
|
||||||
className="next-breadcrumb-text activated"
|
className="next-breadcrumb-text activated"
|
||||||
>
|
>
|
||||||
@ -123,6 +165,12 @@ exports[`Base Render renderComp 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
__id="node_dockcy8n9xeo"
|
__id="node_dockcy8n9xeo"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="next-box"
|
className="next-box"
|
||||||
style={
|
style={
|
||||||
Object {
|
Object {
|
||||||
@ -138,6 +186,12 @@ exports[`Base Render renderComp 1`] = `
|
|||||||
<form
|
<form
|
||||||
__events={Array []}
|
__events={Array []}
|
||||||
__id="node_dockcy8n9xep"
|
__id="node_dockcy8n9xep"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="next-form next-inline next-medium"
|
className="next-form next-inline next-medium"
|
||||||
onSubmit={[Function]}
|
onSubmit={[Function]}
|
||||||
role="grid"
|
role="grid"
|
||||||
@ -151,6 +205,12 @@ exports[`Base Render renderComp 1`] = `
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
__id="node_dockcy8n9xeq"
|
__id="node_dockcy8n9xeq"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="next-form-item next-left next-medium"
|
className="next-form-item next-left next-medium"
|
||||||
style={
|
style={
|
||||||
Object {
|
Object {
|
||||||
@ -193,6 +253,12 @@ exports[`Base Render renderComp 1`] = `
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
__id="node_dockcy8n9xer"
|
__id="node_dockcy8n9xer"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
disabled={false}
|
disabled={false}
|
||||||
height="100%"
|
height="100%"
|
||||||
@ -258,6 +324,12 @@ exports[`Base Render renderComp 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
__id="node_dockcy8n9xes"
|
__id="node_dockcy8n9xes"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="next-form-item next-left next-medium"
|
className="next-form-item next-left next-medium"
|
||||||
style={
|
style={
|
||||||
Object {
|
Object {
|
||||||
@ -300,6 +372,12 @@ exports[`Base Render renderComp 1`] = `
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
__id="node_dockcy8n9xet"
|
__id="node_dockcy8n9xet"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
disabled={false}
|
disabled={false}
|
||||||
height="100%"
|
height="100%"
|
||||||
@ -365,6 +443,12 @@ exports[`Base Render renderComp 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
__id="node_dockcy8n9xeu"
|
__id="node_dockcy8n9xeu"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="next-form-item next-left next-medium"
|
className="next-form-item next-left next-medium"
|
||||||
style={
|
style={
|
||||||
Object {
|
Object {
|
||||||
@ -392,6 +476,12 @@ exports[`Base Render renderComp 1`] = `
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
__id="node_dockcy8n9xev"
|
__id="node_dockcy8n9xev"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
disabled={false}
|
disabled={false}
|
||||||
height="100%"
|
height="100%"
|
||||||
@ -412,10 +502,22 @@ exports[`Base Render renderComp 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
__id="node_dockcy8n9xew"
|
__id="node_dockcy8n9xew"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="next-btn-group"
|
className="next-btn-group"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
__id="node_dockcy8n9xex"
|
__id="node_dockcy8n9xex"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="next-btn next-medium next-btn-primary"
|
className="next-btn next-medium next-btn-primary"
|
||||||
disabled={false}
|
disabled={false}
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
@ -435,6 +537,12 @@ exports[`Base Render renderComp 1`] = `
|
|||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
__id="node_dockcy8n9xe10"
|
__id="node_dockcy8n9xe10"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="next-btn next-medium next-btn-normal"
|
className="next-btn next-medium next-btn-normal"
|
||||||
disabled={false}
|
disabled={false}
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
@ -457,6 +565,12 @@ exports[`Base Render renderComp 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
__id="node_dockcy8n9xe1f"
|
__id="node_dockcy8n9xe1f"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="next-box"
|
className="next-box"
|
||||||
style={
|
style={
|
||||||
Object {
|
Object {
|
||||||
@ -482,6 +596,12 @@ exports[`Base Render renderComp 1`] = `
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
__id="node_dockd5nrh9p4"
|
__id="node_dockd5nrh9p4"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="next-btn next-medium next-btn-primary"
|
className="next-btn next-medium next-btn-primary"
|
||||||
disabled={false}
|
disabled={false}
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
@ -498,6 +618,12 @@ exports[`Base Render renderComp 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
__id="node_dockd5nrh9p5"
|
__id="node_dockd5nrh9p5"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="next-box"
|
className="next-box"
|
||||||
style={
|
style={
|
||||||
Object {
|
Object {
|
||||||
@ -510,6 +636,12 @@ exports[`Base Render renderComp 1`] = `
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
__id="node_dockjielosj1"
|
__id="node_dockjielosj1"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
actionBar={
|
actionBar={
|
||||||
Array [
|
Array [
|
||||||
Object {
|
Object {
|
||||||
@ -688,6 +820,12 @@ exports[`Base Render renderComp 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
__id="node_dockd5nrh9pg"
|
__id="node_dockd5nrh9pg"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="next-box"
|
className="next-box"
|
||||||
style={
|
style={
|
||||||
Object {
|
Object {
|
||||||
@ -702,6 +840,12 @@ exports[`Base Render renderComp 1`] = `
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
__id="node_dockd5nrh9pf"
|
__id="node_dockd5nrh9pf"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="next-pagination next-medium next-normal"
|
className="next-pagination next-medium next-normal"
|
||||||
style={Object {}}
|
style={Object {}}
|
||||||
>
|
>
|
||||||
@ -898,6 +1042,12 @@ exports[`Base Render renderComp 1`] = `
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
__id="node_dockd5nrh9pr"
|
__id="node_dockd5nrh9pr"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
disabled={false}
|
disabled={false}
|
||||||
height="100%"
|
height="100%"
|
||||||
@ -967,6 +1117,12 @@ exports[`JSExpression JSExpression props 1`] = `
|
|||||||
style={Object {}}
|
style={Object {}}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="div-ut"
|
className="div-ut"
|
||||||
forwardRef={[Function]}
|
forwardRef={[Function]}
|
||||||
visible={true}
|
visible={true}
|
||||||
@ -980,12 +1136,24 @@ exports[`JSExpression JSExpression props with loop 1`] = `
|
|||||||
style={Object {}}
|
style={Object {}}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="div-ut"
|
className="div-ut"
|
||||||
forwardRef={[Function]}
|
forwardRef={[Function]}
|
||||||
name1="1"
|
name1="1"
|
||||||
name2="1"
|
name2="1"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="div-ut"
|
className="div-ut"
|
||||||
forwardRef={[Function]}
|
forwardRef={[Function]}
|
||||||
name1="2"
|
name1="2"
|
||||||
@ -1000,11 +1168,23 @@ exports[`JSExpression JSExpression props with loop, and thisRequiredInJSE is tru
|
|||||||
style={Object {}}
|
style={Object {}}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="div-ut"
|
className="div-ut"
|
||||||
forwardRef={[Function]}
|
forwardRef={[Function]}
|
||||||
name1="1"
|
name1="1"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="div-ut"
|
className="div-ut"
|
||||||
forwardRef={[Function]}
|
forwardRef={[Function]}
|
||||||
name1="2"
|
name1="2"
|
||||||
@ -1018,6 +1198,12 @@ exports[`JSExpression JSFunction props 1`] = `
|
|||||||
style={Object {}}
|
style={Object {}}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="div-ut"
|
className="div-ut"
|
||||||
forwardRef={[Function]}
|
forwardRef={[Function]}
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
@ -1032,6 +1218,12 @@ exports[`JSExpression JSSlot has loop 1`] = `
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
__id="node_ocl1ao1o7w3"
|
__id="node_ocl1ao1o7w3"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": false,
|
||||||
|
}
|
||||||
|
}
|
||||||
__style__=":root {
|
__style__=":root {
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
background: #f2f2f2;
|
background: #f2f2f2;
|
||||||
@ -1046,6 +1238,12 @@ exports[`JSExpression JSSlot has loop 1`] = `
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
__id="node_ocl1ao1o7w4"
|
__id="node_ocl1ao1o7w4"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": false,
|
||||||
|
}
|
||||||
|
}
|
||||||
__style__=":root {
|
__style__=":root {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #666;
|
color: #666;
|
||||||
@ -1063,6 +1261,12 @@ exports[`JSExpression JSSlot has loop 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
__id="node_ocl1ao1o7w3"
|
__id="node_ocl1ao1o7w3"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": false,
|
||||||
|
}
|
||||||
|
}
|
||||||
__style__=":root {
|
__style__=":root {
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
background: #f2f2f2;
|
background: #f2f2f2;
|
||||||
@ -1077,6 +1281,12 @@ exports[`JSExpression JSSlot has loop 1`] = `
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
__id="node_ocl1ao1o7w4"
|
__id="node_ocl1ao1o7w4"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": false,
|
||||||
|
}
|
||||||
|
}
|
||||||
__style__=":root {
|
__style__=":root {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #666;
|
color: #666;
|
||||||
@ -1094,6 +1304,12 @@ exports[`JSExpression JSSlot has loop 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
__id="node_ocl1ao1o7w3"
|
__id="node_ocl1ao1o7w3"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": false,
|
||||||
|
}
|
||||||
|
}
|
||||||
__style__=":root {
|
__style__=":root {
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
background: #f2f2f2;
|
background: #f2f2f2;
|
||||||
@ -1108,6 +1324,12 @@ exports[`JSExpression JSSlot has loop 1`] = `
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
__id="node_ocl1ao1o7w4"
|
__id="node_ocl1ao1o7w4"
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": false,
|
||||||
|
}
|
||||||
|
}
|
||||||
__style__=":root {
|
__style__=":root {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #666;
|
color: #666;
|
||||||
@ -1132,6 +1354,12 @@ exports[`JSExpression base props 1`] = `
|
|||||||
style={Object {}}
|
style={Object {}}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="div-ut"
|
className="div-ut"
|
||||||
forwardRef={[Function]}
|
forwardRef={[Function]}
|
||||||
text="123"
|
text="123"
|
||||||
@ -1146,10 +1374,22 @@ exports[`designMode designMode:default 1`] = `
|
|||||||
style={Object {}}
|
style={Object {}}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="div-ut"
|
className="div-ut"
|
||||||
forwardRef={[Function]}
|
forwardRef={[Function]}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
__inner__={
|
||||||
|
Object {
|
||||||
|
"condition": true,
|
||||||
|
"hidden": undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
className="div-ut-children"
|
className="div-ut-children"
|
||||||
forwardRef={[Function]}
|
forwardRef={[Function]}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -17,6 +17,7 @@
|
|||||||
"@alilc/lowcode-types": "1.0.16-beta.7",
|
"@alilc/lowcode-types": "1.0.16-beta.7",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"react": "^16",
|
"react": "^16",
|
||||||
|
"mobx": "^6.3.0",
|
||||||
"zen-logger": "^1.1.0"
|
"zen-logger": "^1.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
import { TransitionType } from '@alilc/lowcode-types';
|
import { TransitionType } from '@alilc/lowcode-types';
|
||||||
import { transaction } from 'mobx';
|
import { runInAction } from 'mobx';
|
||||||
import EventEmitter from 'events';
|
import EventEmitter from 'events';
|
||||||
|
|
||||||
class TransactionManager {
|
class TransactionManager {
|
||||||
emitter = new EventEmitter();
|
emitter = new EventEmitter();
|
||||||
|
|
||||||
startTransaction = (fn: () => void, type: TransitionType = TransitionType.REPAINT): void => {
|
executeTransaction = (fn: () => void, type: TransitionType = TransitionType.REPAINT): void => {
|
||||||
this.emitter.emit(`[${type}]startTransaction`);
|
this.emitter.emit(`[${type}]startTransaction`);
|
||||||
transaction(fn);
|
runInAction(fn);
|
||||||
this.emitter.emit(`[${type}]endTransaction`);
|
this.emitter.emit(`[${type}]endTransaction`);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -27,5 +27,8 @@ class TransactionManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const transactionManager = new TransactionManager();
|
export const transactionManager = new TransactionManager();
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
export default transactionManager;
|
export default transactionManager;
|
||||||
|
=======
|
||||||
|
>>>>>>> feat/autoRepaintNode
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user