diff --git a/packages/uni-app-plus/dist/uni-app-service.es.js b/packages/uni-app-plus/dist/uni-app-service.es.js index c8c0a7934d9c54aaf1b0905f8dcb99f6de57e6fc..6ded0de900dc9698210d5d596f09612864d26c52 100644 --- a/packages/uni-app-plus/dist/uni-app-service.es.js +++ b/packages/uni-app-plus/dist/uni-app-service.es.js @@ -10458,6 +10458,7 @@ var serviceContext = (function (vue) { super(NODE_TYPE_PAGE, '#page', null); this._id = 1; this._created = false; + this._updating = false; this._createActionMap = new Map(); this.updateActions = []; this.dicts = []; @@ -10589,7 +10590,10 @@ var serviceContext = (function (vue) { if (action[0] !== ACTION_TYPE_INSERT) { this.updateActions.push(action); } - vue.queuePostFlushCb(this._update); + if (!this._updating) { + this._updating = true; + vue.queuePostFlushCb(this._update); + } } restore() { this.clear(); @@ -10631,6 +10635,7 @@ var serviceContext = (function (vue) { clear() { this.dicts.length = 0; this.updateActions.length = 0; + this._updating = false; this._createActionMap.clear(); } send(action) { diff --git a/packages/uni-app-plus/src/service/framework/dom/Page.ts b/packages/uni-app-plus/src/service/framework/dom/Page.ts index c13e29f60b779340f3be9e623ba42ea84ae0944d..1888e11ad58dbb7320074a0752df353ebb70b784 100644 --- a/packages/uni-app-plus/src/service/framework/dom/Page.ts +++ b/packages/uni-app-plus/src/service/framework/dom/Page.ts @@ -44,6 +44,7 @@ export default class UniPageNode extends UniNode implements IUniPageNode { pageId: number private _id: number = 1 private _created: boolean = false + private _updating: boolean = false private options: PageNodeOptions private createAction: PageCreateAction private createdAction: PageCreatedAction @@ -221,7 +222,10 @@ export default class UniPageNode extends UniNode implements IUniPageNode { if (action[0] !== ACTION_TYPE_INSERT) { this.updateActions.push(action) } - queuePostFlushCb(this._update) + if (!this._updating) { + this._updating = true + queuePostFlushCb(this._update) + } } restore() { this.clear() @@ -270,6 +274,7 @@ export default class UniPageNode extends UniNode implements IUniPageNode { clear() { this.dicts.length = 0 this.updateActions.length = 0 + this._updating = false this._createActionMap.clear() } send(action: (PageAction | DictAction)[]) {