1.0.3 • Published 3 years ago

@kk306484328/dom-screenshot v1.0.3

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

dom-screenshot

NPM Version PRs Welcome

Table of Contents

Introduction

整合dom-to-image及html2canvas,开箱即用的dom截图组件。

⬆ Back to Top

Features

  • 整合dom-to-image及html2canvas,解决图片模糊,不加载等问题
  • 判断设备类型使用合适的方法,减少遇到兼容性问题无法运行而造成困扰,也可传入useHtml2canvas去自主控制

⬆ Back to Top

Install

npm install @kk306484328/dom-screenshot

⬆ Back to Top

Usage

<template>
  <div class="demo">
    <dom-screenshot is-save ref="shotDom">
      <h1>Hellow word!</h1>
    </dom-screenshot>

    <button @click="onClick">截图-shot</button>
  </div>
</template>

<script>
import DomScreenshot from '@kk306484328/dom-screenshot'
export default {
  components: { DomScreenshot },
  methods: {
    onClick () {
      this.$refs.shotDom.shot()
    }
  }
}
</script>

⬆ Back to Top

doc

⬆ Back to Top

License

MIT

⬆ Back to Top