fix(frontend): 优化网页标题设置逻辑
- 添加 SET_TITLE mutation 用于直接设置标题 - 修改 setTitle action,通过 commit调用 SET_TITLE mutation Signed-off-by: Zhu-meng <lian62978@outlook.com>pull/1090/head
parent
41496b6d8a
commit
057b0c3908
|
|
@ -23,6 +23,9 @@ const mutations = {
|
|||
if (state.hasOwnProperty(key)) {
|
||||
state[key] = value
|
||||
}
|
||||
},
|
||||
SET_TITLE: (state, title) => {
|
||||
state.title = title
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -33,7 +36,7 @@ const actions = {
|
|||
},
|
||||
// 设置网页标题
|
||||
setTitle({ commit }, title) {
|
||||
state.title = title
|
||||
commit('SET_TITLE', title)
|
||||
useDynamicTitle()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue