Add PrimeVue and Select component
This commit is contained in:
parent
70032e1b11
commit
2028955820
4 changed files with 82 additions and 9 deletions
|
|
@ -8,18 +8,18 @@
|
|||
"
|
||||
>
|
||||
<label for="inspirations">Choisir une inspiration</label>
|
||||
<select id="inspirations">
|
||||
<!-- TODO: dynamiser les options en bouclant sur les inspirations -->
|
||||
<option value="shape-of-nature" selected>Shape of Nature</option>
|
||||
<option value="inspiration-slug">Inspiration Title</option>
|
||||
</select>
|
||||
</div>
|
||||
<Select id="inspirations" v-model="selectedInspiration" :options="inspirations" optionLabel="name" optionValue="value" class="" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const { inspiration } = defineProps({
|
||||
inspiration: Object,
|
||||
});
|
||||
import { ref } from "vue";
|
||||
|
||||
const selectedInspiration = ref();
|
||||
const inspirations = ref([
|
||||
{ name: 'Shape of Nature', value: 'shape-of-nature', selected: true },
|
||||
{ name: 'Inspiration Title', value: 'inspiration-title' }
|
||||
]);
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
|
|
|||
|
|
@ -2,9 +2,15 @@ import { createApp } from "vue";
|
|||
import "./assets/css/index.css";
|
||||
import App from "./App.vue";
|
||||
import { createPinia } from "pinia";
|
||||
import PrimeVue from "primevue/config";
|
||||
import Select from "primevue/select";
|
||||
|
||||
const app = createApp(App);
|
||||
const pinia = createPinia();
|
||||
|
||||
app.use(pinia);
|
||||
app.use(PrimeVue, {
|
||||
unstyled: true
|
||||
});
|
||||
app.component('Select', Select);
|
||||
app.mount("#app");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue