1.0.1 • Published 5 years ago

crop-in-page v1.0.1

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

网页截图插件

配合Puppeteer完成网页截图,在线示例

预览

CropInPage

使用方法

  • ES6 Module
import CropInPage from 'crop-in-page';

const cropper = new CropInPage();
cropper.init(); // 即可打开截图界面
  • AMD Module
const CropInPage = require('crop-in-page').default;

const cropper = new CropInPage();
cropper.init();
  • Online url
<script src="${script_path}/crop-in-page/dist/index.min.js"></script>
<script>
(() => {
    const Component = CropInPage.default;
    const cropper = new Component();
    cropper.init();
})();
</script>

功能列表

  • 整页截图
  • 全屏截图
  • 选区截图