signature-pad-vue
v1.0.13
Published
A instant signature pad for mobile project built with Vue
Downloads
3
Readme
signature-pad-vue
A instant signature pad for mobile project built with Vue.
安装
npm install signature-pad-vue --save 或 yarn add signature-pad-vue
全局引用
// main.js
import Vue from 'vue'
import SignaturePad from 'signature-pad-vue'
import 'signature-pad-vue/lib/style.css'
Vue.use(SignaturePad)
按需引用
1.可以使用以下方法单独引入某组件
import SignaturePad from 'signature-pad-vue/lib/signature-pad'
import 'signature-pad-vue/lib/signature-pad/style'
2.配合webpack插件babel-plugin-import
使用
安装babel-plugin-import
插件
npm install babel-plugin-import --save-dev 或 yarn add -D babel-plugin-import
配置.babelrc
文件
// .babelrc
{
...,
"plugins": [
...,
[
"import",
{
"libraryName": "signature-pad-vue",
"style": true,
"libraryDirectory": "lib",
"camel2DashComponentName": true,
"camel2UnderlineComponentName": false
}
]
]
}
引入
// main.js
import Vue from 'vue'
import { SignaturePad } from 'signature-pad-vue'
Vue.use(SignaturePad)