feat:更新美食模块图片功能

This commit is contained in:
2026-02-02 22:54:12 +08:00
parent aa7abbdde3
commit 94270b923c
6 changed files with 235 additions and 140 deletions

View File

@@ -11,6 +11,8 @@
</div>
</div>
<draggable-button @click="addClick"/>
<arrive-bottom v-if="foodStore.isScrollEnd"/>
</div>
</template>
@@ -21,9 +23,12 @@ import FoodCard from '@/components/Food/FoodCard.vue'
import ArriveBottom from '@/components/Common/ArriveButton.vue'
import { useFoodStore } from '@/store/food.ts'
import { onBeforeUnmount, onMounted, ref } from 'vue'
import DraggableButton from '@/components/Common/DraggableButton.vue'
import { useRouter } from 'vue-router'
const foodRecipeRef = ref()
const foodStore = useFoodStore()
const router = useRouter()
onMounted(async () => {
foodStore.pageInfo = {
@@ -51,6 +56,12 @@ const handleScroll = () => {
}
}
}
const addClick = () => {
foodStore.foodRecipeApiType = 'ADD'
foodStore.currentFoodRecipe = foodStore.getEmptyFoodRecipe()
router.push({ name: 'FoodRecipeForm' })
}
</script>
<style lang="scss">