diff --git a/pages.json b/pages.json index 42fce0c..2121f31 100644 --- a/pages.json +++ b/pages.json @@ -9,19 +9,18 @@ "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages { - "path": "pages/index/login", + "path": "pages/index/index", "style": { - "navigationBarTitleText": "登录" + "navigationBarTitleText": "uni-app" }, "meta": { "auth": false } }, { - "path": "pages/index/index", - "aliasPath": "/", + "path": "pages/index/login", "style": { - "navigationBarTitleText": "uni-app" + "navigationBarTitleText": "登录" }, "meta": { "auth": false diff --git a/pages/index/index.vue b/pages/index/index.vue index 9a4a9a8..74136be 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1,20 +1,32 @@ diff --git a/peach/store/sys.js b/peach/store/sys.js index 185572f..e5fca86 100644 --- a/peach/store/sys.js +++ b/peach/store/sys.js @@ -1,33 +1,33 @@ -import { ref } from "vue"; -import { defineStore } from "pinia"; +import { ref } from 'vue' +import { defineStore } from 'pinia' const useSysStore = defineStore( - "sys", - () => { - const theme = ref(""); - const mode = ref("light"); - const modeAuto = ref(false); - const fontSize = ref(1); + 'sys', + () => { + const theme = ref('') + const mode = ref('light') + const modeAuto = ref(false) + const fontSize = ref(1) - function setTheme(stheme = "") { - console.log("setTheme", stheme); - theme.value = stheme ? stheme : "orange"; - } + function setTheme(stheme = '') { + console.log('setTheme', stheme) + theme.value = stheme ? stheme : 'orange' + } - return { - theme, - mode, - modeAuto, - fontSize, - setTheme, - }; - }, - { - persist: { - enabled: true, - strategies: [{ key: "sys-store" }], + return { + theme, + mode, + modeAuto, + fontSize, + setTheme, + } }, - } -); + { + persist: { + enabled: true, + strategies: [{ key: 'sys-store' }], + }, + } +) -export default useSysStore; +export default useSysStore