mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
824dcaecdf
+ fix right now playing component gap + show emoji if there's no search result + abstract now playing component settings into one setting + break context menu's context item into a component
33 lines
670 B
Vue
33 lines
670 B
Vue
<template>
|
|
<button id="option-drop" @click.stop.prevent="showDropdown" class="btn-more">
|
|
<MoreSvg />
|
|
</button>
|
|
</template>
|
|
<script setup lang="ts">
|
|
import { onMounted } from "vue";
|
|
import MoreSvg from "../../assets/icons/more.svg";
|
|
let elem: DOMRect;
|
|
|
|
const props = defineProps<{
|
|
src?: string;
|
|
}>();
|
|
|
|
const emit = defineEmits<{
|
|
(e: "showDropdown", event: any): void;
|
|
}>();
|
|
|
|
onMounted(() => {
|
|
const el = document.getElementById("option-drop") as HTMLElement;
|
|
elem = el.getBoundingClientRect();
|
|
});
|
|
|
|
function showDropdown(e: Event) {
|
|
if (!props.src) return;
|
|
|
|
emit("showDropdown", {
|
|
clientX: elem.left + 35,
|
|
clientY: elem.top,
|
|
});
|
|
}
|
|
</script>
|