Closed CSalih closed 2 years ago
HI empty slot aren't detected by vuejs, maybe set an empty span inside ?
<vue-meeting-selector :date="currentDate" :meetings-days="meetingsDays">
<template #button-previous><span></span></template>
<template #button-next><span></span></template>
</vue-meeting-selector>
for slot if, I did not know at the time I created the component that we could do this way, I will make a mr
Hallo iNeoO,
thank you for the quick solution, i appreciate that :smile:
v-if="$slots['button-previous']"
with an empty template should be either undefined or null i guess and the condition is therefor false
. Empty span
would may work didn't try it.
Regards
Hello iNeoO,
i want to remove the
button-previous
andbutton-next
button from the ui, but with the current approach (slot withif
) it does not work.For example:
Current Output:
Expected Output:
Putting the
button
into theslot
tag would solve this problem, but i did not check if something else would get broken. What is the reason to use<slot if.../> <button v-else />
instead of<slot> <button/> </slot>
?