feat: 新增useStorage

This commit is contained in:
kailong321200875
2023-08-05 08:42:14 +08:00
parent 57a5fa7b82
commit dfea91c7e1
17 changed files with 86 additions and 68 deletions

View File

@@ -10,10 +10,12 @@ import { trim, setCssVar } from '@/utils'
import ColorRadioPicker from './components/ColorRadioPicker.vue'
import InterfaceDisplay from './components/InterfaceDisplay.vue'
import LayoutRadioPicker from './components/LayoutRadioPicker.vue'
import { useCache } from '@/hooks/web/useCache'
import { useStorage } from '@/hooks/web/useStorage'
import { useClipboard } from '@vueuse/core'
import { useDesign } from '@/hooks/web/useDesign'
const { removeStorage } = useStorage()
const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('setting')
@@ -186,10 +188,9 @@ const copyConfig = async () => {
// 清空缓存
const clear = () => {
const { wsCache } = useCache()
wsCache.delete('layout')
wsCache.delete('theme')
wsCache.delete('isDark')
removeStorage('layout')
removeStorage('theme')
removeStorage('isDark')
window.location.reload()
}
</script>