Skip to content

Commit

Permalink
chore: 文件命名调整
Browse files Browse the repository at this point in the history
  • Loading branch information
yulimchen committed Dec 1, 2024
1 parent 6424739 commit 9aca455
Show file tree
Hide file tree
Showing 19 changed files with 18 additions and 30 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/hooks/useToggleDarkMode.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useDarkModeStoreHook } from "@/store/modules/darkMode";
import { useDarkModeStoreHook } from "@/store/modules/dark-mode";

export function useDarkMode() {
return useDarkModeStoreHook().darkMode;
Expand Down
6 changes: 3 additions & 3 deletions src/layout/index.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import tabbar from "@/components/Tabbar/index.vue";
import NavBar from "@/components/NavBar/index.vue";
import { useCachedViewStoreHook } from "@/store/modules/cachedView";
import tabbar from "@/components/tabbar/index.vue";
import NavBar from "@/components/nav-bar/index.vue";
import { useCachedViewStoreHook } from "@/store/modules/cached-view";
import { useDarkMode } from "@/hooks/useToggleDarkMode";
import { computed } from "vue";
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import "./styles/index.less";
import "./styles/tailwind.css";
// svg icon
import "virtual:svg-icons-register";
import { initializeDarkMode } from "@/utils/darkMode";
import { initializeDarkMode } from "@/utils/dark-mode";
import App from "./App.vue";
import router from "./router";

Expand Down
2 changes: 1 addition & 1 deletion src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
type RouteLocationNormalized
} from "vue-router";
import routes from "./routes";
import { useCachedViewStoreHook } from "@/store/modules/cachedView";
import { useCachedViewStoreHook } from "@/store/modules/cached-view";
import NProgress from "@/utils/progress";
import setPageTitle from "@/utils/set-page-title";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ export const useCachedViewStore = defineStore({
},
delCachedView(view: toRouteType) {
const index = this.cachedViewList.indexOf(view.name as string);
index > -1 && this.cachedViewList.splice(index, 1);
if (index > -1) {
this.cachedViewList.splice(index, 1);
}
},
delAllCachedViews() {
this.cachedViewList = [] as string[];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineStore } from "pinia";
import { store } from "@/store";
import { nextTick } from "vue";
import { isDarkMode, updateDarkMode } from "@/utils/darkMode";
import { isDarkMode, updateDarkMode } from "@/utils/dark-mode";

export const useDarkModeStore = defineStore({
id: "dark-mode",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/utils/http/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Axios, {
type AxiosResponse,
type AxiosRequestConfig
} from "axios";
import { ContentTypeEnum, ResultEnum } from "@/enums/requestEnum";
import { ContentTypeEnum, ResultEnum } from "@/enums/request-enum";
import NProgress from "../progress";
import { showFailToast } from "vant";
import "vant/es/toast/style";
Expand Down
2 changes: 1 addition & 1 deletion src/views/demo/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { reactive } from "vue";
import GridPatternDashed from "@/components/GridPattern/GridPatternDashed.vue";
import GridPatternDashed from "@/components/grid-pattern/grid-pattern-dashed.vue";
defineOptions({
name: "Demo"
Expand Down
26 changes: 6 additions & 20 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,12 @@
"baseUrl": ".",
"allowJs": false,
"resolveJsonModule": true,
"lib": [
"ESNext",
"DOM"
],
"lib": ["ESNext", "DOM"],
"paths": {
"@/*": [
"src/*"
],
"@build/*": [
"build/*"
]
"@/*": ["./src/*"],
"@build/*": ["./build/*"]
},
"types": [
"node",
"vite/client"
]
"types": ["node", "vite/client"]
},
"include": [
"mock/*.ts",
Expand All @@ -42,9 +32,5 @@
"typings/*.d.ts",
"vite.config.ts"
],
"exclude": [
"dist",
"**/*.js",
"node_modules"
]
}
"exclude": ["dist", "**/*.js", "node_modules"]
}

0 comments on commit 9aca455

Please sign in to comment.