mirror of
https://gitee.com/dromara/go-view.git
synced 2025-04-23 18:00:27 +08:00
12 lines
345 B
TypeScript
12 lines
345 B
TypeScript
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
|
|
|
export const setHtmlTheme = (themeName?: string) => {
|
|
const e = window.document.documentElement
|
|
if (themeName) {
|
|
e.setAttribute('data-theme', themeName)
|
|
return
|
|
}
|
|
const designStore = useDesignStore()
|
|
e.setAttribute('data-theme', designStore.themeName)
|
|
}
|