react-screenshot-tool
v1.0.0
Published
一个 React 截图悬浮按钮组件,支持区域截图并自动复制到剪贴板
Maintainers
Readme
React Screenshot Tool
一个 React 截图悬浮按钮组件,支持区域截图并自动复制到剪贴板。
特性
- 🎯 右下角悬浮截图按钮
- 🖱️ 鼠标框选区域截图
- 📋 自动复制到剪贴板
- ⌨️ 支持 ESC 取消截图
- 🎨 选区外有遮罩,选区内无遮罩
- 📦 零配置,开箱即用
- 🎨 支持自定义样式
安装
npm install react-screenshot-tool
# 或
yarn add react-screenshot-tool使用方法
import React from 'react';
import ScreenshotTool from 'react-screenshot-tool';
import 'react-screenshot-tool/dist/style.css';
function App() {
return (
<>
<ScreenshotTool />
{/* 你的其他内容 */}
</>
);
}依赖
- React >= 17
- Ant Design >= 4
- html2canvas >= 1.0.0
开发
# 克隆仓库
git clone https://github.com/yourusername/react-screenshot-tool.git
# 安装依赖
npm install
# 构建
npm run build贡献
欢迎提交 Issue 和 Pull Request!
License
MIT © [Your Name]
