This commit is contained in:
Kulbhushan Kaushik 2022-09-20 15:27:01 -04:00
parent 9e969b8c86
commit bc473d5e03
3 changed files with 17 additions and 13 deletions

View file

@ -6,7 +6,6 @@
</transition>
</router-view>
</template>
<style lang="scss">
@import "./node_modules/bootstrap/scss/bootstrap";
@import "@/styles/common-animations.scss";

View file

@ -1,8 +1,10 @@
<template>
<form @submit.prevent="addYear(2024)">
Vehicle Make Placeholder
<button>Add</button>
</form>
<div>
<input type="text" v-model="year"/>
<span> Vehicle Make Placeholder </span>
<span>{{returnVehicleYear}}</span>
<button @click="addYear(year)">Add</button>
</div>
</template>
<script>
@ -10,18 +12,18 @@
import { storeActions } from "@/constants/store-actions";
export default {
name: 'vehicle-make',
setup()
{
const store = issStore();
return {
store
}
},
methods:
{
addYear(item)
{
this.store.saveVehicleYear(item);
this.$store.saveVehicleYear(item);
}
},
computed:
{
returnVehicleYear()
{
return this.$store.order.vehicle.year;
}
}
}

View file

@ -4,11 +4,14 @@ import App from './App.vue';
import router from './router';
import "../node_modules/bootstrap/dist/js/bootstrap.js";
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
import { issStore } from './store';
const vueApp = createApp(App);
const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);
vueApp.use(pinia);
const store = issStore();
vueApp.config.globalProperties.$store = store;
vueApp.use(router);
vueApp.mount("#app");