Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 3 months ago
JSON representation
a simple way to write href for every dom in vue.js
- Host: GitHub
- URL: https://github.com/kokdemo/vue-href
- Owner: kokdemo
- License: mit
- Created: 2016-01-11T16:50:42.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-07-30T02:38:08.000Z (over 6 years ago)
- Last Synced: 2024-08-04T00:13:12.682Z (7 months ago)
- Language: JavaScript
- Size: 67.4 KB
- Stars: 24
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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分别会在跳转前后执行。