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
|
@ -4,13 +4,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
-->
|
||||
|
||||
<template>
|
||||
<a :href="to" :class="active ? activeClass : null" @click.prevent="nav" @contextmenu.prevent.stop="onContextmenu">
|
||||
<a ref="el" :href="to" :class="active ? activeClass : null" @click.prevent="nav" @contextmenu.prevent.stop="onContextmenu">
|
||||
<slot></slot>
|
||||
</a>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
import { computed, shallowRef } from 'vue';
|
||||
import * as os from '@/os.js';
|
||||
import copyToClipboard from '@/scripts/copy-to-clipboard.js';
|
||||
import { url } from '@/config.js';
|
||||
|
@ -26,6 +26,10 @@ const props = withDefaults(defineProps<{
|
|||
behavior: null,
|
||||
});
|
||||
|
||||
const el = shallowRef<HTMLElement>();
|
||||
|
||||
defineExpose({ $el: el });
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
const active = computed(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue