Add open in new tab link
This commit is contained in:
parent
05bfae264a
commit
6ea35f086f
@ -30,6 +30,10 @@
|
|||||||
<p class="modified">
|
<p class="modified">
|
||||||
<time :datetime="modified">{{ humanTime() }}</time>
|
<time :datetime="modified">{{ humanTime() }}</time>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<a class="" target=”_blank” @click="openInNewTab">
|
||||||
|
open in new tab
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -249,6 +253,10 @@ export default {
|
|||||||
open: function () {
|
open: function () {
|
||||||
this.$router.push({ path: this.url });
|
this.$router.push({ path: this.url });
|
||||||
},
|
},
|
||||||
|
openInNewTab: function () {
|
||||||
|
const routeUrl = this.$router.resolve({path: this.url});
|
||||||
|
window.open(routeUrl.href, '_blank');
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user