vue-open-link

0.2.0 • Public • Published

vue-open-link

A custom directive which allow users open link in a new tab.

Usage

npm install vue-open-link --save
 
# or use yarn 
yarn add vue-open-link
<!--
  use String
-->
<button
  v-open="'#/test'"
>
  test
</button>
 
<!--
  use String
-->
<button
  v-open="{path: 'test'}"
>
  test
</button>

If you want to use String to redirect, you can simply use router.resolve() to get the href

Readme

Keywords

Package Sidebar

Install

npm i vue-open-link

Weekly Downloads

1

Version

0.2.0

License

MIT

Unpacked Size

49.8 kB

Total Files

11

Last publish

Collaborators

  • chrisshen93