Commit 92f63ecb authored by FE-安焕焕's avatar FE-安焕焕 👣

Fix:document.title未修复问题

parent 9a74a451
......@@ -40,7 +40,20 @@ const mutations = {
if (title) {
state.title = title;
}
document.title = state.title;
setTimeout(function() {
//利用iframe的onload事件刷新页面
document.title = state.title;
var iframe = document.createElement('iframe');
iframe.style.visibility = 'hidden';
iframe.style.width = '1px';
iframe.style.height = '1px';
iframe.onload = function() {
setTimeout(function() {
document.body.removeChild(iframe);
}, 0);
};
document.body.appendChild(iframe);
}, 0);
},
[types.CHANGE_META](state, meta) {
for (let i in meta) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment