dynamize inspirations selector
This commit is contained in:
parent
b048d3d43f
commit
38eb9cf35e
2 changed files with 14 additions and 5 deletions
|
|
@ -10,8 +10,9 @@
|
|||
>
|
||||
<Select
|
||||
id="inspirations-select"
|
||||
v-model="current.uri"
|
||||
v-model="current"
|
||||
:options="all"
|
||||
optionLabel="title"
|
||||
class="font-serif"
|
||||
data-icon="chevron-single-down"
|
||||
checkmark
|
||||
|
|
@ -29,13 +30,13 @@ const { all } = defineProps({
|
|||
const current = ref(all[0]);
|
||||
|
||||
watch(current, (newValue) => {
|
||||
console.log(newValue);
|
||||
changeInspiration(newValue);
|
||||
});
|
||||
|
||||
const emit = defineEmits(["update:currentInspiration"]);
|
||||
|
||||
function changeInspiration(inspirationUri) {
|
||||
emit("update:currentInspiration", inspirationUri);
|
||||
function changeInspiration(inspiration) {
|
||||
emit("update:currentInspiration", inspiration);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue