feat:增加后端接口
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="common-mobile-view food-record">
|
||||
<div class="food-query card-item">
|
||||
<div class="food-segment card-item">
|
||||
<el-input
|
||||
v-model="foodInfo.query"
|
||||
placeholder="请输入菜谱名称" :prefix-icon="Search" clearable
|
||||
@@ -10,8 +10,7 @@
|
||||
<div class="query-item">
|
||||
<span>查看类型:</span>
|
||||
<el-segmented v-model="foodInfo.recordSegment"
|
||||
:options="recordSegmentList"
|
||||
@change="changeRecordSegmentEvent()"/>
|
||||
:options="recordSegmentList"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -39,7 +38,7 @@ import FoodDaily from '@/components/Food/FoodDaily.vue'
|
||||
import FoodTimeline from '@/components/Food/FoodTimeline.vue'
|
||||
import DraggableButton from '@/components/DraggableButton.vue'
|
||||
import { Search } from '@element-plus/icons-vue'
|
||||
import { onMounted, reactive } from 'vue'
|
||||
import { reactive } from 'vue'
|
||||
import { useFoodStore } from '@/store/food'
|
||||
import type { IFoodSegment } from '@/types/food'
|
||||
import { useRouter } from 'vue-router'
|
||||
@@ -67,14 +66,6 @@ const recordSegmentList = [{
|
||||
value: 'timeline'
|
||||
}]
|
||||
|
||||
onMounted(() => {
|
||||
foodStore.refreshInfo()
|
||||
})
|
||||
|
||||
const changeRecordSegmentEvent = () => {
|
||||
foodStore.refreshInfo()
|
||||
}
|
||||
|
||||
const addClick = () => {
|
||||
appStore.isShowMobileBack = true
|
||||
|
||||
@@ -101,7 +92,7 @@ const addClick = () => {
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
|
||||
.food-query {
|
||||
.food-segment {
|
||||
padding: 5px 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
Reference in New Issue
Block a user