mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 06:23:34 -07:00
fix line render issue
This commit is contained in:
parent
21045f1c5d
commit
12b93058f8
1 changed files with 35 additions and 16 deletions
|
@ -1,24 +1,28 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<h2 class="mb-4">{{ $t("recipe.ingredients") }}</h2>
|
<h2 class="mb-4">{{ $t("recipe.ingredients") }}</h2>
|
||||||
<div
|
<v-list-item
|
||||||
v-for="(ingredient, index) in ingredients"
|
dense
|
||||||
|
v-for="(ingredient, index) in displayIngredients"
|
||||||
:key="generateKey('ingredient', index)"
|
:key="generateKey('ingredient', index)"
|
||||||
|
@click="ingredient.checked = !ingredient.checked"
|
||||||
>
|
>
|
||||||
<v-card flat>
|
|
||||||
<v-card-text class="text-subtitle-1">
|
|
||||||
<v-row class="flex row ">
|
|
||||||
<v-checkbox
|
<v-checkbox
|
||||||
hide-details
|
hide-details
|
||||||
|
v-model="ingredient.checked"
|
||||||
class=" pt-0 ingredients my-auto py-auto"
|
class=" pt-0 ingredients my-auto py-auto"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
>
|
>
|
||||||
</v-checkbox>
|
</v-checkbox>
|
||||||
<vue-markdown class="my-auto" :source="ingredient"> </vue-markdown>
|
|
||||||
</v-row>
|
<v-list-item-content>
|
||||||
</v-card-text>
|
<vue-markdown
|
||||||
</v-card>
|
class="my-auto text-subtitle-1 mb-0"
|
||||||
</div>
|
:source="ingredient.text"
|
||||||
|
>
|
||||||
|
</vue-markdown>
|
||||||
|
</v-list-item-content>
|
||||||
|
</v-list-item>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -32,6 +36,17 @@ export default {
|
||||||
props: {
|
props: {
|
||||||
ingredients: Array,
|
ingredients: Array,
|
||||||
},
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
displayIngredients: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.displayIngredients = this.ingredients.map(x => ({
|
||||||
|
text: x,
|
||||||
|
checked: false,
|
||||||
|
}));
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
generateKey(item, index) {
|
generateKey(item, index) {
|
||||||
return utils.generateUniqueKey(item, index);
|
return utils.generateUniqueKey(item, index);
|
||||||
|
@ -44,4 +59,8 @@ export default {
|
||||||
p {
|
p {
|
||||||
margin-bottom: auto !important;
|
margin-bottom: auto !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.my-card-text {
|
||||||
|
overflow-wrap: break-word;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
Loading…
Add table
Add a link
Reference in a new issue