fixed spacing for json button
This commit is contained in:
parent
8a99155356
commit
56a500bd82
1 changed files with 10 additions and 10 deletions
|
@ -18,12 +18,15 @@
|
|||
@save="createRecipe"
|
||||
/>
|
||||
|
||||
<VJsoneditor
|
||||
v-if="jsonEditor"
|
||||
v-model="recipeDetails"
|
||||
height="1500px"
|
||||
:options="jsonEditorOptions"
|
||||
/>
|
||||
<div v-if="jsonEditor">
|
||||
<br />
|
||||
<br />
|
||||
<VJsoneditor
|
||||
v-model="recipeDetails"
|
||||
height="1500px"
|
||||
:options="jsonEditorOptions"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<EditRecipe v-else v-model="recipeDetails" @upload="getImage" />
|
||||
</v-card>
|
||||
|
@ -73,7 +76,6 @@ export default {
|
|||
|
||||
methods: {
|
||||
getImage(fileObject) {
|
||||
console.log(fileObject);
|
||||
this.fileObject = fileObject;
|
||||
this.onFileChange();
|
||||
},
|
||||
|
@ -83,11 +85,9 @@ export default {
|
|||
async createRecipe() {
|
||||
this.isLoading = true;
|
||||
this.recipeDetails.image = this.fileObject.name;
|
||||
console.log(this.recipeDetails);
|
||||
let slug = await api.recipes.create(this.recipeDetails);
|
||||
|
||||
let response = await api.recipes.updateImage(slug, this.fileObject);
|
||||
console.log(response);
|
||||
await api.recipes.updateImage(slug, this.fileObject);
|
||||
this.isLoading = false;
|
||||
|
||||
this.$router.push(`/recipe/${slug}`);
|
||||
|
|
Loading…
Reference in a new issue