Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vuejs2 更改vuex状态下的元主题颜色_Vuejs2_Vuex_Progressive Web Apps - Fatal编程技术网

Vuejs2 更改vuex状态下的元主题颜色

Vuejs2 更改vuex状态下的元主题颜色,vuejs2,vuex,progressive-web-apps,Vuejs2,Vuex,Progressive Web Apps,如何在更改Vuex状态时更改元标记“主题颜色”? 使用:Vue、Vuex、register service worker、@Vue/cli plugin pwa您应该分派事件,在事件内部,在存储文件中,更改元标记,如下所示: document.querySelector('meta[name="theme-color"]').setAttribute("content", yourValueHere); 更多信息:

如何在更改Vuex状态时更改元标记“主题颜色”?
使用:
Vue、Vuex、register service worker、@Vue/cli plugin pwa

您应该
分派事件,在事件内部,在存储文件中,更改元标记,如下所示:

document.querySelector('meta[name="theme-color"]').setAttribute("content", yourValueHere);
更多信息: