refs #921 Wait to change route until change el-menu-item
This commit is contained in:
parent
c602bd87a4
commit
a9dc10b912
|
@ -11,7 +11,13 @@
|
|||
active-text-color="#ffffff"
|
||||
role="menubar"
|
||||
>
|
||||
<el-menu-item :index="`/${account._id}/home`" v-for="(account, index) in accounts" v-bind:key="account._id" role="menuitem">
|
||||
<el-menu-item
|
||||
:index="`/${account._id}/home`"
|
||||
:route="{ path: `/${account._id}/home` }"
|
||||
v-for="(account, index) in accounts"
|
||||
v-bind:key="account._id"
|
||||
role="menuitem"
|
||||
>
|
||||
<i v-if="account.avatar === undefined || account.avatar === null || account.avatar === ''" class="el-icon-menu"></i>
|
||||
<FailoverImg v-else :src="account.avatar" class="avatar" :title="account.username + '@' + account.domain" />
|
||||
<FailoverImg :src="`${account.baseURL}/favicon.ico`" :failoverSrc="`${account.baseURL}/favicon.png`" class="instance-icon" />
|
||||
|
|
|
@ -146,7 +146,9 @@ const actions: ActionTree<GlobalHeaderState, RootState> = {
|
|||
let notify = createNotification(notification, rootState.App.notify as Notify)
|
||||
if (notify) {
|
||||
notify.onclick = () => {
|
||||
router.push(`/${id}/notifications`)
|
||||
router.push(`/${id}/home`)
|
||||
// We have to wait until change el-menu-item
|
||||
setTimeout(() => router.push(`/${id}/notifications`), 1000)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue