mirror of
https://github.com/ArthurDanjou/arthome.git
synced 2026-01-14 12:14:33 +01:00
Change click type
This commit is contained in:
@@ -51,7 +51,6 @@ function openDeleteTabModal(tab: TabType) {
|
||||
function visitLink(clickType: 'self' | 'extern') {
|
||||
if (!props.editMode) {
|
||||
window.open(props.tab.link, clickType === 'self' ? '_self' : '_blank')
|
||||
// todo: add view count
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -27,9 +27,8 @@ onMounted(() => {
|
||||
}
|
||||
})
|
||||
|
||||
function visitLink(link: string) {
|
||||
window.open(link, '_blank')
|
||||
// todo: add view count
|
||||
function visitLink(clickType: 'self' | 'extern') {
|
||||
window.open(props.tab.link, clickType === 'self' ? '_self' : '_blank')
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -105,7 +104,10 @@ function visitLink(link: string) {
|
||||
body: { base: 'cursor-pointer h-full relative z-20' },
|
||||
background: 'h-full duration-300 bg-white dark:bg-gray-900 hover:bg-gray-100 dark:hover:bg-gray-800',
|
||||
}"
|
||||
@click.prevent="visitLink(tab.link)"
|
||||
@click.left="visitLink('self')"
|
||||
@click.right="visitLink('extern')"
|
||||
@click.prevent="visitLink('self')"
|
||||
@click.middle="visitLink('extern')"
|
||||
>
|
||||
<div v-show="tab.primary" class="absolute flex h-3 w-3 -left-1 -top-1">
|
||||
<span class="animate-ping absolute inline-flex h-full w-full rounded-full opacity-75" :class="`bg-${tab.color}-400`" />
|
||||
|
||||
Reference in New Issue
Block a user