提交 cee01986 作者: 施汉文

🐞 fix: 初始化数据

上级 82929491
......@@ -32,14 +32,9 @@ export default {
roleInfo,
orderList,
},
mounted() {},
watch: {
async accountSelect(newVal) {
await this.initInstance();
this.totalNum = this.instance.getTotalNum();
this.instance.roleRecentActivitySubscription(() => {
this.totalNum = this.instance.getTotalNum();
}, this);
},
},
data() {
......@@ -54,6 +49,7 @@ export default {
},
created() {
// 初始化 vuex 中的值
this.initInstance();
},
mounted() {
this.$nextTick(() => {
......@@ -66,6 +62,10 @@ export default {
this.instance = await createRoleRecentActivityNotPushNum(
this.accountSelect
);
this.totalNum = this.instance.getTotalNum();
this.instance.roleRecentActivitySubscription(() => {
this.totalNum = this.instance.getTotalNum();
}, this);
},
initVuexValue() {
const userinfo = {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论