feat(week recipe page): [M] 修改了刷新每周菜单的方式;修复移动版每周菜单有一天为空时页面为空的问题

[M] 修改了刷新每周菜单的方式;修复移动版每周菜单有一天为空时页面为空的问题

Signed-off-by: Ching <loooching@gmail.com>
This commit is contained in:
Ching 2021-10-26 23:28:31 +08:00
parent 973849540a
commit d63f494594
10 changed files with 128 additions and 110 deletions

View File

@ -1 +1 @@
.summit-recipe[data-v-16b31338]{width:100%}.el-pagination{margin:10px 0 0 0}.el-row{margin-bottom:20px;&:last-child{margin-bottom:0}}.el-col,.grid-content{border-radius:4px}.grid-content{min-height:36px}.row-bg{padding:10px 0;background-color:#f9fafc}.content{padding:20px 10px}.re-generate{margin:20px 0;width:100%}.el-tag#meal a:link,.el-tag#meal a:visited{text-decoration:none}.el-tag#meal a:active,.el-tag#meal a:hover{text-decoration:underline}.el-tag{margin:0 5px 0 0}.el-tag+.el-tag{margin:5px 0 0 0}.recipe-type-tag{margin:0 10px 0 0;padding-bottom:0}.recipe-list{height:50%}body{background-color:#f7f8fa}.recipe-create{margin:20px 16px}.recipe_type,.recipe_type .van-grid-item__content{background-color:#f2f3f5}.daily_recipes{margin-bottom:10px}.daily_recipes:last-child{margin-bottom:40px}.action-button{height:100%;width:50%}.today-tag{margin-left:10px}.daily_recipe{margin-top:20px}.delete-button{width:100%;height:100%}.delete-icon{font-size:16px;line-height:inherit;padding:0 5px}
.summit-recipe[data-v-16b31338]{width:100%}.el-pagination{margin:10px 0 0 0}.el-row{margin-bottom:20px;&:last-child{margin-bottom:0}}.el-col,.grid-content{border-radius:4px}.grid-content{min-height:36px}.row-bg{padding:10px 0;background-color:#f9fafc}.content{padding:20px 10px}.re-generate{margin:20px 0;width:100%}.el-tag#meal a:link,.el-tag#meal a:visited{text-decoration:none}.el-tag#meal a:active,.el-tag#meal a:hover{text-decoration:underline}.el-tag{margin:0 5px 0 0}.el-tag+.el-tag{margin:5px 0 0 0}.recipe-type-tag{margin:0 10px 0 0;padding-bottom:0}.recipe-list{height:50%}body{background-color:#f7f8fa}.recipe-create{margin:20px 16px}.recipe_type,.recipe_type .van-grid-item__content{background-color:#f2f3f5}.daily_recipes{margin-bottom:10px}.daily_recipes:last-child{margin-bottom:40px}.action-button{height:100%;width:50%}.today-tag{margin-left:10px}.refresh-button{float:right;margin-right:20px}.daily_recipe{margin-top:20px}.delete-button{width:100%;height:100%}.delete-icon{font-size:16px;line-height:inherit;padding:0 5px}

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>frontend</title><link href="/css/app.f57a4744.css" rel="preload" as="style"><link href="/css/chunk-vendors.b9153273.css" rel="preload" as="style"><link href="/js/app.0890f100.js" rel="preload" as="script"><link href="/js/chunk-vendors.41761e04.js" rel="preload" as="script"><link href="/css/chunk-vendors.b9153273.css" rel="stylesheet"><link href="/css/app.f57a4744.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but frontend doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.41761e04.js"></script><script src="/js/app.0890f100.js"></script></body></html>
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>frontend</title><link href="/css/app.54db996e.css" rel="preload" as="style"><link href="/css/chunk-vendors.920d8cf8.css" rel="preload" as="style"><link href="/js/app.30780f00.js" rel="preload" as="script"><link href="/js/chunk-vendors.6cd9f85d.js" rel="preload" as="script"><link href="/css/chunk-vendors.920d8cf8.css" rel="stylesheet"><link href="/css/app.54db996e.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but frontend doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.6cd9f85d.js"></script><script src="/js/app.30780f00.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
frontend/dist/js/app.30780f00.js.map vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,12 +1,12 @@
<template>
<van-pull-refresh
<!-- <van-pull-refresh
v-model="loading"
@refresh="onRefresh"
pulling-text="下拉重新生成每周菜谱"
loosing-text="可以松手了..."
pull-distance="100"
:head-height="100"
>
> -->
<div v-for:="(daily_recipe, recipe_index) in daily_recipes">
<van-cell-group inset class="daily_recipes">
<template #title>
@ -19,7 +19,7 @@
>
</template>
<van-swipe-cell>
<van-row>
<van-row v-if="daily_recipe.meat">
<van-col span="3" class="recipe_type">
<van-grid :column-num="1">
<van-grid-item text="肉" class="recipe_type"></van-grid-item>
@ -42,7 +42,7 @@
</van-grid>
</van-col>
</van-row>
<van-row>
<van-row v-if="daily_recipe.vegetable">
<van-col span="3" class="recipe_type">
<van-grid :column-num="1">
<van-grid-item text="菜" class="recipe_type"></van-grid-item>
@ -65,7 +65,9 @@
</van-grid>
</van-col>
</van-row>
<van-row v-if="daily_recipe.soup.length > 0">
<van-row
v-if="daily_recipe.soup !== undefined && daily_recipe.soup.length > 0"
>
<van-col span="3" class="recipe_type">
<van-grid :column-num="1">
<van-grid-item text="汤" class="recipe_type"></van-grid-item>
@ -106,7 +108,17 @@
</van-swipe-cell>
</van-cell-group>
</div>
</van-pull-refresh>
<!-- </van-pull-refresh> -->
<van-sticky :offset-bottom="60" position="bottom" class="refresh-button">
<van-button
type="primary"
color="linear-gradient(to right, #ff6034, #ee0a24)"
hairline
round
@click="onRefresh"
>刷新</van-button
>
</van-sticky>
</template>
<script>
@ -121,6 +133,7 @@ import {
Row,
SwipeCell,
Tag,
Sticky,
} from 'vant';
import axios from 'axios';
import config from '@/config/index';
@ -138,6 +151,7 @@ export default {
[PullRefresh.name]: PullRefresh,
[Row.name]: Row,
[SwipeCell.name]: SwipeCell,
[Sticky.name]: Sticky,
},
data() {
return {
@ -225,4 +239,8 @@ export default {
.today-tag {
margin-left: 10px;
}
.refresh-button {
float: right;
margin-right: 20px;
}
</style>