Compare commits

...

6 Commits

Author SHA1 Message Date
Ching
8e6c37198c Merge branch 'release/r20220205' 2022-02-25 01:22:12 +08:00
Ching
e5c79047c9 Merge tag 'r2022-02-13' into develop
no message
2022-02-13 20:14:03 +08:00
Ching
206b35baec Merge branch 'release/r2022-02-13'
# Conflicts:
#	recipe/views.py
2022-02-13 20:13:08 +08:00
Ching
e0f3d31b0b Merge branch 'feature/recipe-ingredient-2022-02-12' into develop 2022-02-13 20:10:47 +08:00
Ching
3b492ee812 feat(recipe list api): recipe list api 按 id 倒序排列
recipe list api 按 id 倒序排列

Signed-off-by: Ching <loooching@gmail.com>
2022-02-12 17:40:00 +08:00
Ching
66a6777139 feat(recipe list): 修改菜谱列表中的 tag 颜色,按菜谱类型区分
修改菜谱列表中的 tag 颜色,按菜谱类型区分

Signed-off-by: Ching <loooching@gmail.com>
2022-02-12 17:30:56 +08:00

View File

@ -17,9 +17,12 @@
}"
>
<template #title>
<van-tag class="recipe-type-tag" plain type="primary">{{
constants.formatRecipeType(recipe.recipe_type)
}}</van-tag>
<van-tag
class="recipe-type-tag"
plain
v-bind:type="getTagType(recipe.recipe_type)"
>{{ constants.formatRecipeType(recipe.recipe_type) }}</van-tag
>
<span class="recipe-name"> {{ recipe.name }}</span>
</template>
<template #value>
@ -46,7 +49,7 @@ export default {
[CollapseItem.name]: CollapseItem,
[Icon.name]: Icon,
},
data: function() {
data: function () {
return {
loading: false,
finished: false,
@ -57,6 +60,13 @@ export default {
constants: constants,
is_link: true,
activeNames: ['1'],
getTagType: function (recipe_type) {
return {
[constants.RECIPE_TYPE_MEAT]: 'primary',
[constants.RECIPE_TYPE_VEGETABLE]: 'success',
[constants.RECIPE_TYPE_SOUP]: 'warning',
}[recipe_type];
},
};
},
mounted() {},