refactor: store 目录扁平化重构为 stores(Pinia 推荐结构)
This commit is contained in:
@@ -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";
|
||||
|
||||
/** 搜索项类型 */
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useDictStore } from "@/store";
|
||||
import { useDictStore } from "@/stores";
|
||||
|
||||
const dictStore = useDictStore();
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useDictStore } from "@/store";
|
||||
import { useDictStore } from "@/stores";
|
||||
|
||||
const props = defineProps({
|
||||
code: String, // 字典编码
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user