1.0.1 • Published 6 years ago

@notadd/vue-screen-capture v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

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对象