网页标题设置新增SET_TITLE方法

pull/443/head
RuoYi 2025-12-02 19:31:23 +08:00
parent 381151bc50
commit 09e8e9995a
1 changed files with 4 additions and 1 deletions

View File

@ -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()
}
}