Template
1
0
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:
pany 2024-11-27 10:19:19 +08:00
parent 77cfb43df6
commit 1ce2353c1b
10 changed files with 9 additions and 9 deletions

View File

@ -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()

View File

@ -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()

View File

@ -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>

View File

@ -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 */

View File

@ -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 {

View File

@ -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"

View File

@ -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() {

View File

@ -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() {