You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
412 B
20 lines
412 B
import { ref, onMounted, onBeforeUnmount } from 'vue'; |
|
|
|
export default class PopoverMenu { |
|
show = ref(false); |
|
top = ref('0px'); |
|
left = ref('0px'); |
|
bottom = ref('0px'); |
|
index = ref(0); |
|
|
|
open = (idx, e) => { |
|
this.index.value = idx; |
|
this.left.value = e.x + 20 + 'px'; |
|
this.top.value = e.y + -50 + 'px'; |
|
this.show.value = true; |
|
}; |
|
|
|
close = () => { |
|
this.show.value = false; |
|
}; |
|
}
|
|
|