const root = document.querySelector(':root');
root.setAttribute('style', `--themeColor: ${globalColorCSS.global['$--color-primary']};`);
html动态修改主题变量
于 2024-11-29 15:30:58 首次发布
const root = document.querySelector(':root');
root.setAttribute('style', `--themeColor: ${globalColorCSS.global['$--color-primary']};`);