mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-06-01 04:36:12 -04:00
Put ref in v-show so Vue can pick it up on mount, toggle JSON show on click (#1045)
This commit is contained in:
parent
e3e7230359
commit
5c7cf5f334
@ -13,19 +13,19 @@
|
|||||||
<RecipePageActionMenu
|
<RecipePageActionMenu
|
||||||
logged-in
|
logged-in
|
||||||
:value="true"
|
:value="true"
|
||||||
@json="jsonEditor = true"
|
@json="jsonEditor = !jsonEditor"
|
||||||
@edit="jsonEditor = false"
|
@edit="jsonEditor = !jsonEditor"
|
||||||
@save="createRecipe"
|
@save="createRecipe"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div v-if="jsonEditor">
|
<div v-show="jsonEditor">
|
||||||
<!-- Probably not the best way, but it works! -->
|
<!-- Probably not the best way, but it works! -->
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<VJsoneditor v-model="recipeDetails" height="1500px" :options="jsonEditorOptions" />
|
<VJsoneditor v-model="recipeDetails" height="1500px" :options="jsonEditorOptions" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<RecipeEditor ref="recipeEditor" v-else v-model="recipeDetails" @upload="getImage" />
|
<RecipeEditor ref="recipeEditor" v-show="!jsonEditor" v-model="recipeDetails" @upload="getImage" />
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-container>
|
</v-container>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user