setup test view

This commit is contained in:
vabene1111
2023-02-16 18:26:26 +01:00
parent f554963ae7
commit 9573ff0932
2 changed files with 26 additions and 11 deletions

View File

@ -10,7 +10,9 @@
{% block content_fluid %} {% block content_fluid %}
{{ data }} <div id="app">
<test-view></test-view>
</div>
{% endblock %} {% endblock %}

View File

@ -2,37 +2,50 @@
<div id="app"> <div id="app">
Recipe Card
<b-checkbox v-model="recipe_detailed"></b-checkbox>
<div class="row">
<div class="col-md-3">
<recipe-card
v-if="recipe !== undefined"
:recipe="recipe"
:detailed="recipe_detailed"
></recipe-card>
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
import Vue from "vue" import Vue from "vue"
import { BootstrapVue } from "bootstrap-vue" import {BootstrapVue} from "bootstrap-vue"
import "bootstrap-vue/dist/bootstrap-vue.css" import "bootstrap-vue/dist/bootstrap-vue.css"
import {ApiApiFactory} from "@/utils/openapi/api";
import RecipeCard from "@/components/RecipeCard.vue";
Vue.use(BootstrapVue) Vue.use(BootstrapVue)
//import Multiselect from "vue-multiselect"
export default { export default {
name: "TestView", name: "TestView",
mixins: [], mixins: [],
components: { components: {RecipeCard},
// Multiselect,
},
data() { data() {
return { return {
recipe: undefined,
recipe_detailed: false,
} }
}, },
mounted() { mounted() {
this.$i18n.locale = window.CUSTOM_LOCALE this.$i18n.locale = window.CUSTOM_LOCALE
let apiClient = new ApiApiFactory()
}, apiClient.retrieveRecipe('119').then((r) => {
methods: { this.recipe = r.data
})
}, },
methods: {},
} }
</script> </script>