setup test view
This commit is contained in:
@ -10,7 +10,9 @@
|
|||||||
|
|
||||||
{% block content_fluid %}
|
{% block content_fluid %}
|
||||||
|
|
||||||
{{ data }}
|
<div id="app">
|
||||||
|
<test-view></test-view>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user