0.1.4-Beta • Published 2 years ago
vc-directive v0.1.4-Beta
使用
- 安装
npm install vc-directive
or
yarn add vc-directive
- 全局注册
// main.js
import Vue from 'vue'
import VcDirectives from 'vc-directive'
Vue.use(VcDirectives)
...
然后在任一的vue组件中即可使用需要的指令,例如:
<div v-vcfocus></div>
- 按需注册
<template>
<div>
<input v-focus v-model="text" />
</div>
</template>
import { vcFocus } from 'vc-directive'
export default {
directives: {
vfocus: vcFocus
},
data() {
return {
text: 'hello vc-directive'
}
}
}
License
MIT License © 2022-PRESENT Panjinhong
0.1.4-Beta
2 years ago
0.1.3-Beta
2 years ago
0.1.2-Beta
2 years ago
0.1.1-Beta
2 years ago
0.1.0-Beta
2 years ago