From cf58e820c9752986b1d21a2a8d5c65d2d16c8647 Mon Sep 17 00:00:00 2001 From: YunYouJun Date: Mon, 6 Oct 2025 18:43:58 +0800 Subject: [PATCH] feat: refactor more ui with app --- app/components/BasketButton.vue | 61 +++++++++++++--------- app/components/ChooseFood.vue | 29 ++++++++--- app/components/RandomRecipe.vue | 20 ++++---- app/components/RecipePanel.vue | 10 ++-- app/components/TheAboutList.vue | 65 ++++++++++++++++++++++++ app/composables/global.ts | 1 + app/composables/helper.ts | 2 + app/constants/index.ts | 2 + app/constants/links.ts | 2 + app/data/incompatible-foods.csv | 10 ++-- app/pages/about.vue | 17 +++++-- app/pages/help.vue | 35 +++++++------ app/pages/tabs/home/index.vue | 4 +- app/pages/tabs/my/index.vue | 90 +++++++++++++++++++++------------ app/pages/tabs/random/index.vue | 6 ++- nuxt.config.ts | 2 +- 16 files changed, 255 insertions(+), 101 deletions(-) create mode 100644 app/components/TheAboutList.vue create mode 100644 app/composables/global.ts diff --git a/app/components/BasketButton.vue b/app/components/BasketButton.vue index a0bbbfa..0e3af10 100644 --- a/app/components/BasketButton.vue +++ b/app/components/BasketButton.vue @@ -1,35 +1,50 @@ diff --git a/app/components/ChooseFood.vue b/app/components/ChooseFood.vue index 3f1dcb4..30df3b4 100644 --- a/app/components/ChooseFood.vue +++ b/app/components/ChooseFood.vue @@ -19,7 +19,6 @@ const { playAnimation } = useEmojiAnimation(recipeBtnRef) const { proxy } = useScriptGoogleTagManager() const recipePanelRef = ref() -const { isVisible, show } = useInvisibleElement(recipePanelRef) // 监听食材变化,自动检测相克 watch(curStuff, (newIngredients) => { @@ -59,7 +58,14 @@ function toggleStuff(item: StuffItem, category = '', _e?: Event) { - +
-
+

@@ -155,9 +161,20 @@ function toggleStuff(item: StuffItem, category = '', _e?: Event) {

- - - + + + + + + diff --git a/app/components/RandomRecipe.vue b/app/components/RandomRecipe.vue index f41bf37..b53872a 100644 --- a/app/components/RandomRecipe.vue +++ b/app/components/RandomRecipe.vue @@ -5,24 +5,24 @@ const { random, randomRecipes } = useRandomRecipe(count) diff --git a/nuxt.config.ts b/nuxt.config.ts index 96ff941..0054ace 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -117,7 +117,7 @@ export default defineNuxtConfig({ css: { core: true, basic: true, - utilities: true, + // utilities: true, }, },