fix: URL preview popup for local URL appears in the upper left corner (#13555)
This commit is contained in:
parent
b280faa8e7
commit
6d9c234cb6
4 changed files with 10 additions and 5 deletions
|
|
@ -29,13 +29,13 @@ const self = props.url.startsWith(local);
|
|||
const attr = self ? 'to' : 'href';
|
||||
const target = self ? null : '_blank';
|
||||
|
||||
const el = ref<HTMLElement>();
|
||||
const el = ref<HTMLElement | { $el: HTMLElement }>();
|
||||
|
||||
useTooltip(el, (showing) => {
|
||||
os.popup(defineAsyncComponent(() => import('@/components/MkUrlPreviewPopup.vue')), {
|
||||
showing,
|
||||
url: props.url,
|
||||
source: el.value,
|
||||
source: el.value instanceof HTMLElement ? el.value : el.value?.$el,
|
||||
}, {}, 'closed');
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue