网页标题设置新增SET_TITLE方法
parent
21ee628202
commit
afe8236b42
|
|
@ -23,6 +23,9 @@ const mutations = {
|
||||||
if (state.hasOwnProperty(key)) {
|
if (state.hasOwnProperty(key)) {
|
||||||
state[key] = value
|
state[key] = value
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
SET_TITLE: (state, title) => {
|
||||||
|
state.title = title
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -33,7 +36,7 @@ const actions = {
|
||||||
},
|
},
|
||||||
// 设置网页标题
|
// 设置网页标题
|
||||||
setTitle({ commit }, title) {
|
setTitle({ commit }, title) {
|
||||||
state.title = title
|
commit('SET_TITLE', title)
|
||||||
useDynamicTitle()
|
useDynamicTitle()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue