Version 1.0.0 - Frontend
This commit is contained in:
@@ -7,7 +7,18 @@ const slots = useSlots();
|
||||
const boxWidth = ref(0);
|
||||
const box = ref(null);
|
||||
|
||||
const allSlots = slots.default ? slots.default() : [];
|
||||
var slotsAll = slots.default ? slots.default() : [];
|
||||
var allSlots = null
|
||||
|
||||
if(slotsAll.length > 0) {
|
||||
if(typeof slotsAll[0].children !== "string") {
|
||||
allSlots = slotsAll[0].children
|
||||
} else {
|
||||
allSlots = slotsAll
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
var firstSlot = allSlots[0] || null;
|
||||
var otherSlots = allSlots.slice(1);
|
||||
@@ -23,7 +34,7 @@ function selectOption(index) {
|
||||
otherSlots.push(oldFirstSlot);
|
||||
showMenu.value = false; // Hide the menu after selection
|
||||
}
|
||||
updateModelValue(firstSlot ? firstSlot.props.value : '');
|
||||
updateModelValue(firstSlot ? firstSlot.props ? firstSlot.props.value : '' : '');
|
||||
}
|
||||
|
||||
const props = defineProps({
|
||||
@@ -50,8 +61,7 @@ onMounted(() => {
|
||||
showMenu.value = false;
|
||||
|
||||
});
|
||||
|
||||
updateModelValue(firstSlot ? firstSlot.props.value : '');
|
||||
updateModelValue(firstSlot ? firstSlot.props ? firstSlot.props.value : '' : '');
|
||||
|
||||
});
|
||||
|
||||
@@ -131,6 +141,7 @@ defineExpose({
|
||||
user-select: none;
|
||||
overflow-y: auto;
|
||||
max-height: 16vh;
|
||||
z-index: 4000;
|
||||
}
|
||||
|
||||
.container .option:last-child {
|
||||
|
Reference in New Issue
Block a user