换肤后把主题存入localStorage,刷新和关闭后保持最后的选择状态

it2022-05-30  82

 

过一个休息日休息一下,能让脑袋清醒,不用急躁,慢慢来,也许结果总会让你怦然心动。

页面

methods中:

 

localStorage.setItem("themeName", theme);当选择皮肤后把选择的主题存储起来,命名为'themeName',在Application中可以看到:

页面加载的时候获取这个themeName。

知识点:

localStorage.setItem("themeName", theme); localStorage.getItem("themeName");

 

转载于:https://www.cnblogs.com/benbenbai/p/11113072.html

相关资源:各显卡算力对照表!

最新回复(0)