、、、 npm install vue-scratchcard-tuzi 、、、
import ScratchCard from 'vue-scratchcard-tuzi'
Vue.component('xxx',ScratchCard) 或者 在vue模块的component中添加 components:{ ScratchCard }
"<scratch-card :c_width="240" :c_height="120" :cricle_size="5" :c_color="cover" :percent="60" @SuccessFunc="scratchSuccess">"
属性 | 属性名 | 说明 |
---|---|---|
c_width | 宽度 | |
c_height | 高度 | |
cricle_size | 涂擦圆点的大小 | |
c_color | 遮盖层颜色 | |
percent | 涂擦掉百分比的设置大小 | |
imgUrl | 画板背景图片 | |
@SuccessFunc | 回调函数 |
##喜欢的话star一下哦