mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 09:50:58 +08:00
c3b935d803
* fix(theme-chalk): remove useless tag close icon css attribute * fix(docs): disable useDark when online
11 lines
308 B
TypeScript
11 lines
308 B
TypeScript
import { useDark, useToggle } from '@vueuse/core'
|
|
|
|
export const isDark =
|
|
// @ts-expect-error when PROD is true, do not useDark
|
|
import.meta.env.PROD ||
|
|
useDark({
|
|
storageKey: 'el-theme-appearance',
|
|
})
|
|
// remove as boolean when dark mode is ok
|
|
export const toggleDark = useToggle(isDark as boolean)
|