diff --git a/src/uni_modules/wot-design-uni/components/composables/usePopover.ts b/src/uni_modules/wot-design-uni/components/composables/usePopover.ts index 56094318..1c616419 100644 --- a/src/uni_modules/wot-design-uni/components/composables/usePopover.ts +++ b/src/uni_modules/wot-design-uni/components/composables/usePopover.ts @@ -1,7 +1,7 @@ import { getCurrentInstance, ref } from 'vue' import { getRect, isObj } from '../common/util' -export function usePopover() { +export function usePopover(visibleArrow = true) { const { proxy } = getCurrentInstance() as any const popStyle = ref('') const arrowStyle = ref('') @@ -80,7 +80,7 @@ export function usePopover() { offset: number | number[] | Record<'x' | 'y', number> ) { // arrow size - const arrowSize = 9 + const arrowSize = visibleArrow ? 9 : 0 // 上下位(纵轴)对应的距离左边的距离 const verticalX = width.value / 2 // 上下位(纵轴)对应的距离底部的距离 diff --git a/src/uni_modules/wot-design-uni/components/wd-popover/wd-popover.vue b/src/uni_modules/wot-design-uni/components/wd-popover/wd-popover.vue index cc90ed2a..b3d15de2 100644 --- a/src/uni_modules/wot-design-uni/components/wd-popover/wd-popover.vue +++ b/src/uni_modules/wot-design-uni/components/wd-popover/wd-popover.vue @@ -76,7 +76,7 @@ const emit = defineEmits(['update:modelValue', 'menuclick', 'change', 'open', 'c const queue = inject(queueKey, null) const selector: string = 'popover' const { proxy } = getCurrentInstance() as any -const popover = usePopover() +const popover = usePopover(props.visibleArrow) const showPopover = ref(false) // 控制popover显隐 diff --git a/src/uni_modules/wot-design-uni/components/wd-tooltip/wd-tooltip.vue b/src/uni_modules/wot-design-uni/components/wd-tooltip/wd-tooltip.vue index 22bf149a..368885c3 100644 --- a/src/uni_modules/wot-design-uni/components/wd-tooltip/wd-tooltip.vue +++ b/src/uni_modules/wot-design-uni/components/wd-tooltip/wd-tooltip.vue @@ -45,7 +45,7 @@ import { tooltipProps, type TooltipExpose } from './types' const props = defineProps(tooltipProps) const emit = defineEmits(['update:modelValue', 'menuclick', 'change', 'open', 'close']) -const popover = usePopover() +const popover = usePopover(props.visibleArrow) const queue = inject(queueKey, null) const selector: string = 'tooltip' const { proxy } = getCurrentInstance() as any