screenshot-func
v1.0.0
Published
截图
Downloads
2
Readme
接入
install
tnpm install screenshot-func
Simple Usage
const screenShot = require('screenshot-func');
class Demo extends React.Component {
constructor(props) {
super(props);
this.state = {
}
}
screenShotHandle(){
screenShot(document.body).then((canvas) => {
const imgData = canvas.toDataURL();
console.log(imgData);
})
}
render() {
let t = this;
return <div>
截图实例
<button onClick={t.screenShotHandle.bind(t)}>截图</button>
</div>
}
};
module.exports = Demo;