update: note card options to context menu

main
TZGyn 3 years ago
parent 116c33c246
commit f4527b883c

@ -13,7 +13,7 @@
</ElementButton> </ElementButton>
<div class="relative"> <div class="relative">
<div <div
ref="options" ref="contextMenu"
v-if="showOptions"> v-if="showOptions">
<div <div
class="bg-secondary border-lightgray absolute right-0 top-0 z-50 flex h-fit w-64 flex-col border"> class="bg-secondary border-lightgray absolute right-0 top-0 z-50 flex h-fit w-64 flex-col border">
@ -45,7 +45,7 @@
const showDetail = ref<boolean>(false); const showDetail = ref<boolean>(false);
const showOptions = ref<boolean>(false); const showOptions = ref<boolean>(false);
const options = ref(); const contextMenu = ref();
const toggleOptions = () => { const toggleOptions = () => {
showOptions.value = !showOptions.value; showOptions.value = !showOptions.value;
@ -59,7 +59,7 @@
navigateTo(`/notes/${id}`); navigateTo(`/notes/${id}`);
}; };
onClickOutside(options, (event) => { onClickOutside(contextMenu, (event) => {
toggleOptions(); toggleOptions();
}); });
</script> </script>

Loading…
Cancel
Save