Compare commits

..

No commits in common. "main" and "0.0.2" have entirely different histories.
main ... 0.0.2

3 changed files with 0 additions and 35 deletions

BIN
1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

View File

@ -1,35 +0,0 @@
import { ref } from 'vue'
interface MenuItem {
text: string
click: () => void
keyCode?: string
}
interface ShowMenuConfig {
x: number
y: number
items: MenuItem[]
}
const visible = ref()
const x = ref()
const y = ref()
const items = ref<MenuItem[]>()
export function useRightMenu() {
function showMenu(config: ShowMenuConfig) {
x.value = config.x
y.value = config.y
items.value = config.items
visible.value = true
}
function hideMenu() {
visible.value = false
}
return {
x,
y,
items,
visible,
showMenu,
hideMenu
}
}