提交 cee01986 作者: 施汉文

🐞 fix: 初始化数据

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