First test
This commit is contained in:
@@ -4,15 +4,13 @@ import { onMounted, ref } from 'vue';
|
||||
import { defineEmits } from 'vue'
|
||||
|
||||
|
||||
defineProps(['modelValue', 'options', 'trackby', 'label']);
|
||||
defineEmits(['update:modelValue']);
|
||||
const props = defineProps(['modelValue', 'options', 'trackby', 'selectby', 'label', 'value', 'allowEmpty']);
|
||||
defineEmits(['update:modelValue', 'changeValue']);
|
||||
|
||||
const input = ref(null);
|
||||
const value = ref(props.modelValue);
|
||||
|
||||
function update(t) {
|
||||
console.log(t);
|
||||
context.emit("update:modelValue",t);
|
||||
}
|
||||
console.log('props=',value.value);
|
||||
|
||||
</script>
|
||||
|
||||
@@ -20,7 +18,7 @@ function update(t) {
|
||||
<template>
|
||||
|
||||
|
||||
<multiselect :value="modelValue" v-model="value" @select='$emit("update:modelValue", $event)' :track-by="trackby" :label="label" placeholder="Vyber jednu" :options="options" :clear-on-select="false" :searchable="true" ref="input">
|
||||
<multiselect :value="modelValue" v-model="value" @select='$emit("changeValue", $event)' :track-by="trackby" :label="label" placeholder="Vyber jednu" :options="options" :clear-on-select="false" :searchable="true" ref="input">
|
||||
|
||||
</multiselect>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user