Add open in new tab link

This commit is contained in:
Olivier Bourgain 2024-03-20 20:56:18 +01:00
parent 05bfae264a
commit 6ea35f086f

View File

@ -30,6 +30,10 @@
<p class="modified">
<time :datetime="modified">{{ humanTime() }}</time>
</p>
<a class="" target=_blank @click="openInNewTab">
open in new tab
</a>
</div>
</div>
</template>
@ -249,6 +253,10 @@ export default {
open: function () {
this.$router.push({ path: this.url });
},
openInNewTab: function () {
const routeUrl = this.$router.resolve({path: this.url});
window.open(routeUrl.href, '_blank');
},
},
};
</script>