项目作者: notadd

项目描述 :
基于 html2canvas 的vue截图组件
高级语言: Vue
项目地址: git://github.com/notadd/vue-screen-capture.git
创建时间: 2018-09-11T04:49:43Z
项目社区:https://github.com/notadd/vue-screen-capture

开源协议:

下载


vue-screen-capture

基于html2canvas的Vue截图、标注组件。

How to use

step-1

安装 @notadd/vue-screen-capture

  • npm install @notadd/vue-screen-capture -S

step-2

  • 引入组件
  1. import ScreenCapture from '@notadd/vue-screen-capture';

step-3

  • 声明component
    1. export default {
    2. ...,
    3. components: {
    4. ScreenCapture
    5. },
    6. ...,

step-4

  • 使用组件
  1. <screen-capture ref="sc" :html="html"></screen-capture>

说明:

组件属性

html:要截图的dom元素

组件方法

capture:生成截图
clear:清空截图
getCaptureImage:返回截图File对象