出现错误Uncaught RangeError:尝试关闭IONIC+VUE中的popover(使用vuex)时,超过了最



早上好,开发人员。我正在这个IONIC+VUE应用程序中工作,特别是在一些具有某些功能的popover中,但由于某种原因,popover有一种奇怪的行为,因为一旦打开,我单击关闭它,第一次模式仍然存在并抛出此错误:

Uncaught RangeError: Maximum call stack size exceeded
at Object.ownKeys 
at hasBinary (is-binary.js:48)
at hasBinary (is-binary.js:49)
at hasBinary (is-binary.js:49)
at hasBinary (is-binary.js:49)
at hasBinary (is-binary.js:49)
at hasBinary (is-binary.js:49)
at hasBinary (is-binary.js:49)
at hasBinary (is-binary.js:49)
at hasBinary (is-binary.js:49)

然后在第二次点击它关闭。

让我给你介绍一下我所做的事情的背景。

因此,这里的模板带有按钮,可以触发vuex中的一个方法,该方法可以做一些事情,还包括关闭模态(closeOpenedPopOver(((的方法

注意:如果我不把调度程序的动作放在vuex上,模式会正确关闭

TEMPLATE
<ion-content>
<ion-row>
<ion-col size="6"></ion-col>
<ion-button @click="stopModal()">
Stop
</ion-button>
</ion-row>
</ion-content>
METHOD
methods: {
...mapActions(["someAction"]),
stopModal(): void {
this.$store.dispatch("someAction", {
dataPopOver: 'something sent',
});

this.closeOpenedPopOver();
},
//method that set an action in vuex and also has the method that
// closes the modal
closeOpenedPopOver(): void {
popoverController.dismiss();
},
//modal closer
},
VUEX
someAction({  dispatch }, payload) {
commit("");
dispatch("otherAction");
socket.emit("something", payload);
},
//This first action emit something through sockets IO and also call other action in 
charge of closing doing other stuffs

otherAction({ state, commit }) {
......some other stuffs...
},

知道为什么会发生这种事吗?

提前感谢,2022 新年快乐

这很奇怪,但降级@ion/vue版本后问题就消失了。

Ionic v6.0.4 中已修复此问题