Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kokdemo/vue-href

a simple way to write href for every dom in vue.js
https://github.com/kokdemo/vue-href

Last synced: about 2 months ago
JSON representation

a simple way to write href for every dom in vue.js

Awesome Lists containing this project

README

        

# vue-href
a simple way to write href for every dom in vue.js

### Any English description here?

sorry, I will add English version description soon.

### 这是啥?

一个vue.js的指令插件,可以让你给任何dom加上一个跳转的事件。
属于那种并没有什么卵用但是写起来还蛮省事的插件。

### 有啥用?

你原来可能需要这样写一个跳转:

点我



现在:

点我

### 怎么用?

直接引入vue-href.js,将来可能会写一些更优雅的方式,目前嘛,我懒。
你可以下载repo,然后看一下demo下面是怎么写的。

### 花式玩法?

新窗口打开:


click me to open new tab to google


还可以这么写:

v-href:b
v-href:blank
v-href:new

原窗口跳转:

v-href
v-href:o
v-href:origin

### 一些回调函数?

也是有的,你需要这么写:

v-href="[url,before,after]"

before和after分别会在跳转前后执行。