mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-02-03 21:57:58 +01:00
chore(ContextMenu): improve options
This commit is contained in:
@@ -45,7 +45,7 @@ const props = defineProps({
|
|||||||
default: () => $ui.contextMenu.transition
|
default: () => $ui.contextMenu.transition
|
||||||
},
|
},
|
||||||
popperOptions: {
|
popperOptions: {
|
||||||
type: Object as PropType<Pick<PopperOptions, 'strategy' | 'placement'>>,
|
type: Object as PropType<PopperOptions>,
|
||||||
default: () => ({})
|
default: () => ({})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -63,7 +63,7 @@ const isOpen = computed({
|
|||||||
|
|
||||||
const virtualElement = toRef(props, 'virtualElement')
|
const virtualElement = toRef(props, 'virtualElement')
|
||||||
|
|
||||||
const popperOptions = computed(() => defu({}, props.popperOptions, { placement: 'bottom-start' }))
|
const popperOptions = computed(() => defu({}, props.popperOptions, { placement: 'bottom-start', scroll: false }))
|
||||||
|
|
||||||
const [, container] = usePopper(popperOptions.value, virtualElement)
|
const [, container] = usePopper(popperOptions.value, virtualElement)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user