https://github.com/notadd/vue-screen-capture
基于 html2canvas 的vue截图组件
https://github.com/notadd/vue-screen-capture
Last synced: about 1 year ago
JSON representation
基于 html2canvas 的vue截图组件
- Host: GitHub
- URL: https://github.com/notadd/vue-screen-capture
- Owner: notadd
- Created: 2018-09-11T04:49:43.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-11T13:09:20.000Z (about 7 years ago)
- Last Synced: 2024-04-24T02:40:51.630Z (about 2 years ago)
- Language: Vue
- Homepage:
- Size: 194 KB
- Stars: 23
- Watchers: 6
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vue-screen-capture
基于[html2canvas](https://github.com/niklasvh/html2canvas)的Vue截图、标注组件。
## How to use
### step-1
#### 安装 `@notadd/vue-screen-capture`
+ `npm install @notadd/vue-screen-capture -S`
#### step-2
+ 引入组件
```javascript
import ScreenCapture from '@notadd/vue-screen-capture';
```
#### step-3
+ 声明component
```javascript
export default {
...,
components: {
ScreenCapture
},
...,
```
#### step-4
+ 使用组件
```html
```
### 说明:
#### 组件属性
> `html`:要截图的dom元素
#### 组件方法
> `capture`:生成截图
> `clear`:清空截图
> `getCaptureImage`:返回截图File对象