@tjdata/s-signature
v1.0.3
Published
<demo-block iframeUrl="componentsC/signature/signature"></demo-block>
Downloads
7
Readme
Signature 签名板 ZXD
平台差异说明
| 小程序 | h5 | android | ios | | :----: | :-: | :-----: | :-: | | √ | √ | √ | √ |
基础用法
- 通过
lineColor
修改签名线条颜色 - 通过
lineSize
修改签名线条粗细
<template>
<view>
<s-signature @saveSign="saveSign" lineColor="#1A1A1A" :lineSize="5"></s-signature>
</view>
</template>
<script>
// js 项目中本组件的文件路径
import sSignature from '@/components/s-signature/s-signature.vue'
export default {
components: {
sSignature
},
methods: {
saveSign(e){
console.log(e)
}
}
}
</script>
API
Props
| 参数 | 说明 | 类型 | 默认值 | 可选值 | | :------------ | :--------------------------- | :-------------- | :------ | :------ | | lineColor | 线条的颜色 | String | #1A1A1A | - | | blockSize | 滑块的大小 | Number | 5 | -|
Events
|参数 |说明 | 回调参数 | | :------- | :------------------| :----------| |saveSign | 保存时触发 | 签名base64图片编码 |