@notadd/vue-screen-capture
v1.0.1
Published
基于 `html2canvas` 的vue截图组件
Downloads
28
Readme
vue-screen-capture
基于html2canvas的Vue截图、标注组件。
How to use
step-1
安装 @notadd/vue-screen-capture
npm install @notadd/vue-screen-capture -S
step-2
- 引入组件
import ScreenCapture from '@notadd/vue-screen-capture';
step-3
- 声明component
export default {
...,
components: {
ScreenCapture
},
...,
step-4
- 使用组件
<screen-capture ref="sc" :html="html"></screen-capture>
说明:
组件属性
html
:要截图的dom元素
组件方法
capture
:生成截图clear
:清空截图getCaptureImage
:返回截图File对象