refactor: tailwindcss样式优化

Former-commit-id: 3ab444012a3b3f81929830d5c73df8c68437cb87
This commit is contained in:
haoxr
2022-12-31 22:37:47 +08:00
parent ba2e6769b4
commit 5beaa84297
21 changed files with 423 additions and 356 deletions

View File

@@ -8,6 +8,7 @@ import {
import { defineStore } from 'pinia';
import { getLanguage } from '@/lang/index';
import { computed, reactive, ref } from 'vue';
import { useStorage } from '@vueuse/core';
// Element Plus 语言包
import zhCn from 'element-plus/es/locale/lang/zh-cn';
@@ -27,7 +28,7 @@ export enum SizeType {
// setup
export const useAppStore = defineStore('app', () => {
// state
const device = ref<DeviceType>(DeviceType.desktop);
const device = useStorage<string>('device', 'desktop');
const size = ref(getSize() || 'default');
const language = ref(getLanguage());
const sidebar = reactive({
@@ -66,7 +67,7 @@ export const useAppStore = defineStore('app', () => {
setSidebarStatus('opened');
}
function toggleDevice(val: DeviceType) {
function toggleDevice(val: string) {
device.value = val;
}