From 351c6e33e5bfcab5359f7ecf6a66d50fc4e63f2a Mon Sep 17 00:00:00 2001 From: IlhamTahir Date: Sun, 17 Nov 2024 00:56:34 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9tab-bar=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E4=BF=AE=E6=94=B9=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 4 + src/components.d.ts | 5 +- src/components/TabBar.vue | 60 ++++++++++++++ src/components/tabbar/index.vue | 74 ------------------ src/layouts/default.vue | 10 ++- src/layouts/home.vue | 10 ++- src/pages.json | 12 +++ src/pages/feed-plan/index.vue | 10 +++ src/pages/home/index.vue | 3 - src/pages/me/index.vue | 10 +++ src/pages/pet-manual/index.vue | 10 +++ .../image/{tabbar => tab-bar}/home-select.png | Bin src/static/image/{tabbar => tab-bar}/home.png | Bin .../{tabbar => tab-bar}/manual-select.png | Bin .../image/{tabbar => tab-bar}/manual.png | Bin .../my-select.png => tab-bar/me-select.png} | Bin .../image/{tabbar/my.png => tab-bar/me.png} | Bin .../image/{tabbar => tab-bar}/plan-select.png | Bin src/static/image/{tabbar => tab-bar}/plan.png | Bin src/uni-pages.d.ts | 5 +- tailwind.config.ts | 7 +- 21 files changed, 129 insertions(+), 91 deletions(-) create mode 100644 src/components/TabBar.vue delete mode 100644 src/components/tabbar/index.vue create mode 100644 src/pages/feed-plan/index.vue create mode 100644 src/pages/me/index.vue create mode 100644 src/pages/pet-manual/index.vue rename src/static/image/{tabbar => tab-bar}/home-select.png (100%) rename src/static/image/{tabbar => tab-bar}/home.png (100%) rename src/static/image/{tabbar => tab-bar}/manual-select.png (100%) rename src/static/image/{tabbar => tab-bar}/manual.png (100%) rename src/static/image/{tabbar/my-select.png => tab-bar/me-select.png} (100%) rename src/static/image/{tabbar/my.png => tab-bar/me.png} (100%) rename src/static/image/{tabbar => tab-bar}/plan-select.png (100%) rename src/static/image/{tabbar => tab-bar}/plan.png (100%) diff --git a/src/App.vue b/src/App.vue index 7b05eec..116e6fc 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,3 +1,7 @@ + + diff --git a/src/components.d.ts b/src/components.d.ts index bf527e0..5a95cbb 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -7,9 +7,6 @@ export {} declare module 'vue' { export interface GlobalComponents { - AppFooter: typeof import('./components/AppFooter.vue')['default'] - AppLogos: typeof import('./components/AppLogos.vue')['default'] - HiCounter: typeof import('./components/HiCounter.vue')['default'] - InputEntry: typeof import('./components/InputEntry.vue')['default'] + TabBar: typeof import('./components/TabBar.vue')['default'] } } diff --git a/src/components/TabBar.vue b/src/components/TabBar.vue new file mode 100644 index 0000000..efcc9a0 --- /dev/null +++ b/src/components/TabBar.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/src/components/tabbar/index.vue b/src/components/tabbar/index.vue deleted file mode 100644 index 815a3dd..0000000 --- a/src/components/tabbar/index.vue +++ /dev/null @@ -1,74 +0,0 @@ - - - - - diff --git a/src/layouts/default.vue b/src/layouts/default.vue index bd00ab4..f021484 100644 --- a/src/layouts/default.vue +++ b/src/layouts/default.vue @@ -1,8 +1,10 @@ + + diff --git a/src/layouts/home.vue b/src/layouts/home.vue index e46cbf8..f021484 100644 --- a/src/layouts/home.vue +++ b/src/layouts/home.vue @@ -1,8 +1,10 @@ + + diff --git a/src/pages.json b/src/pages.json index f41d714..597b2d5 100644 --- a/src/pages.json +++ b/src/pages.json @@ -1,8 +1,20 @@ { "pages": [ + { + "path": "pages/feed-plan/index", + "type": "page" + }, { "path": "pages/home/index", "type": "page" + }, + { + "path": "pages/me/index", + "type": "page" + }, + { + "path": "pages/pet-manual/index", + "type": "page" } ], "globalStyle": { diff --git a/src/pages/feed-plan/index.vue b/src/pages/feed-plan/index.vue new file mode 100644 index 0000000..df3fdfc --- /dev/null +++ b/src/pages/feed-plan/index.vue @@ -0,0 +1,10 @@ + + + + + diff --git a/src/pages/home/index.vue b/src/pages/home/index.vue index 14ab9c2..facffb0 100644 --- a/src/pages/home/index.vue +++ b/src/pages/home/index.vue @@ -1,14 +1,11 @@ diff --git a/src/pages/me/index.vue b/src/pages/me/index.vue new file mode 100644 index 0000000..0a93011 --- /dev/null +++ b/src/pages/me/index.vue @@ -0,0 +1,10 @@ + + + + + diff --git a/src/pages/pet-manual/index.vue b/src/pages/pet-manual/index.vue new file mode 100644 index 0000000..46a737e --- /dev/null +++ b/src/pages/pet-manual/index.vue @@ -0,0 +1,10 @@ + + + + + diff --git a/src/static/image/tabbar/home-select.png b/src/static/image/tab-bar/home-select.png similarity index 100% rename from src/static/image/tabbar/home-select.png rename to src/static/image/tab-bar/home-select.png diff --git a/src/static/image/tabbar/home.png b/src/static/image/tab-bar/home.png similarity index 100% rename from src/static/image/tabbar/home.png rename to src/static/image/tab-bar/home.png diff --git a/src/static/image/tabbar/manual-select.png b/src/static/image/tab-bar/manual-select.png similarity index 100% rename from src/static/image/tabbar/manual-select.png rename to src/static/image/tab-bar/manual-select.png diff --git a/src/static/image/tabbar/manual.png b/src/static/image/tab-bar/manual.png similarity index 100% rename from src/static/image/tabbar/manual.png rename to src/static/image/tab-bar/manual.png diff --git a/src/static/image/tabbar/my-select.png b/src/static/image/tab-bar/me-select.png similarity index 100% rename from src/static/image/tabbar/my-select.png rename to src/static/image/tab-bar/me-select.png diff --git a/src/static/image/tabbar/my.png b/src/static/image/tab-bar/me.png similarity index 100% rename from src/static/image/tabbar/my.png rename to src/static/image/tab-bar/me.png diff --git a/src/static/image/tabbar/plan-select.png b/src/static/image/tab-bar/plan-select.png similarity index 100% rename from src/static/image/tabbar/plan-select.png rename to src/static/image/tab-bar/plan-select.png diff --git a/src/static/image/tabbar/plan.png b/src/static/image/tab-bar/plan.png similarity index 100% rename from src/static/image/tabbar/plan.png rename to src/static/image/tab-bar/plan.png diff --git a/src/uni-pages.d.ts b/src/uni-pages.d.ts index ac0b847..f9e690a 100644 --- a/src/uni-pages.d.ts +++ b/src/uni-pages.d.ts @@ -4,7 +4,10 @@ // Generated by vite-plugin-uni-pages interface NavigateToOptions { - url: "/pages/home/index"; + url: "/pages/feed-plan/index" | + "/pages/home/index" | + "/pages/me/index" | + "/pages/pet-manual/index"; } interface RedirectToOptions extends NavigateToOptions {} diff --git a/tailwind.config.ts b/tailwind.config.ts index d33a33b..c4d58b9 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -15,7 +15,12 @@ else { presets.push(elementPlusPreset()) } -const theme: Config['theme'] = {} +const theme: Config['theme'] = { + colors: { + primary: '#4545E5', + default: '#828282', + }, +} if (isMp || isQuickapp) theme.screens = {}