mirror of
https://github.com/un-pany/v3-admin-vite.git
synced 2025-04-21 11:29:20 +08:00
refactor: 迁移 constants 到 common 目录
This commit is contained in:
parent
77cfb43df6
commit
1ce2353c1b
@ -1,5 +1,5 @@
|
||||
import { DeviceEnum } from "@/constants/app-key"
|
||||
import { useAppStore } from "@/pinia/stores/app"
|
||||
import { DeviceEnum } from "@@/constants/app-key"
|
||||
import { computed } from "vue"
|
||||
|
||||
const appStore = useAppStore()
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { LayoutModeEnum } from "@/constants/app-key"
|
||||
import { useSettingsStore } from "@/pinia/stores/settings"
|
||||
import { LayoutModeEnum } from "@@/constants/app-key"
|
||||
import { computed } from "vue"
|
||||
|
||||
const settingsStore = useSettingsStore()
|
||||
|
@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { LayoutModeEnum } from "@/constants/app-key"
|
||||
import { useLayoutMode } from "@@/composables/useLayoutMode"
|
||||
import { LayoutModeEnum } from "@@/constants/app-key"
|
||||
|
||||
const { isLeft, isTop, isLeftTop, setLayoutMode } = useLayoutMode()
|
||||
</script>
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { DeviceEnum } from "@/constants/app-key"
|
||||
import { useAppStore } from "@/pinia/stores/app"
|
||||
import { useRouteListener } from "@@/composables/useRouteListener"
|
||||
import { DeviceEnum } from "@@/constants/app-key"
|
||||
import { onBeforeMount, onBeforeUnmount, onMounted } from "vue"
|
||||
|
||||
/** 参考 Bootstrap 的响应式设计将最大移动端宽度设置为 992 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { LayoutModeEnum } from "@/constants/app-key"
|
||||
import { getLayoutsConfig } from "@/utils/cache/local-storage"
|
||||
import { LayoutModeEnum } from "@@/constants/app-key"
|
||||
|
||||
/** 项目配置类型 */
|
||||
export interface LayoutsConfig {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { DeviceEnum, SIDEBAR_CLOSED, SIDEBAR_OPENED } from "@/constants/app-key"
|
||||
import { pinia } from "@/pinia"
|
||||
import { getSidebarStatus, setSidebarStatus } from "@/utils/cache/local-storage"
|
||||
import { DeviceEnum, SIDEBAR_CLOSED, SIDEBAR_OPENED } from "@@/constants/app-key"
|
||||
import { defineStore } from "pinia"
|
||||
import { reactive, ref, watch } from "vue"
|
||||
|
||||
|
2
src/utils/cache/cookies.ts
vendored
2
src/utils/cache/cookies.ts
vendored
@ -1,6 +1,6 @@
|
||||
// 统一处理 Cookie
|
||||
|
||||
import { CacheKey } from "@/constants/cache-key"
|
||||
import { CacheKey } from "@@/constants/cache-key"
|
||||
import Cookies from "js-cookie"
|
||||
|
||||
export function getToken() {
|
||||
|
4
src/utils/cache/local-storage.ts
vendored
4
src/utils/cache/local-storage.ts
vendored
@ -1,10 +1,10 @@
|
||||
// 统一处理 localStorage
|
||||
|
||||
import type { SidebarClosed, SidebarOpened } from "@/constants/app-key"
|
||||
import type { LayoutsConfig } from "@/layouts/config"
|
||||
import type { TagView } from "@/pinia/stores/tags-view"
|
||||
import type { ThemeName } from "@@/composables/useTheme"
|
||||
import { CacheKey } from "@/constants/cache-key"
|
||||
import type { SidebarClosed, SidebarOpened } from "@@/constants/app-key"
|
||||
import { CacheKey } from "@@/constants/cache-key"
|
||||
|
||||
// #region 系统布局配置
|
||||
export function getLayoutsConfig() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user