refactor: store 目录扁平化重构为 stores(Pinia 推荐结构)

This commit is contained in:
Ray.Hao
2026-04-20 13:53:10 +08:00
parent f669e6951b
commit 33bde0eaf8
46 changed files with 71 additions and 72 deletions

View File

@@ -4,7 +4,7 @@
import { ref, onMounted, onBeforeUnmount, toRaw } from "vue";
import { RouteRecordRaw, LocationQueryRaw } from "vue-router";
import router from "@/router";
import { usePermissionStore } from "@/store";
import { usePermissionStore } from "@/stores";
import { isExternal } from "@/utils";
/** 搜索项类型 */

View File

@@ -42,7 +42,7 @@
</template>
<script setup lang="ts">
import { useDictStore } from "@/store";
import { useDictStore } from "@/stores";
const dictStore = useDictStore();

View File

@@ -8,7 +8,7 @@
</template>
<script setup lang="ts">
import { useDictStore } from "@/store";
import { useDictStore } from "@/stores";
const props = defineProps({
code: String, // 字典编码

View File

@@ -5,7 +5,7 @@
</template>
<script setup lang="ts">
import { useSettingsStore } from "@/store";
import { useSettingsStore } from "@/stores";
import { ThemeMode, SidebarColor, LayoutMode } from "@/enums/settings";
defineProps({

View File

@@ -17,7 +17,7 @@
</template>
<script setup lang="ts">
import { useAppStore } from "@/store/modules/app";
import { useAppStore } from "@/stores/app";
import { LanguageEnum } from "@/enums/settings";
defineProps({

View File

@@ -23,7 +23,7 @@
<script setup lang="ts">
import { ComponentSize } from "@/enums/settings";
import { useAppStore } from "@/store/modules/app";
import { useAppStore } from "@/stores/app";
const { t } = useI18n();
const sizeOptions = computed(() => {

View File

@@ -28,7 +28,7 @@
<script setup lang="ts">
import { computed } from "vue";
import { ArrowDown } from "@element-plus/icons-vue";
import { useTenantStoreHook } from "@/store/modules/tenant";
import { useTenantStoreHook } from "@/stores/tenant";
const emit = defineEmits<{
(e: "change", tenantId: number): void;

View File

@@ -21,7 +21,7 @@
</el-dropdown>
</template>
<script setup lang="ts">
import { useSettingsStore } from "@/store";
import { useSettingsStore } from "@/stores";
import { ThemeMode } from "@/enums";
import { Moon, Sunny, Monitor } from "@element-plus/icons-vue";