- 安装
yarn add react-ocr-plugin
npm install react-ocr-plugin
- 使用
// 样式引入
import 'react-ocr-plugin/lib/assets/index.css';
import { OCREditor, OCRViewer } from 'react-ocr-plugin'
function Demo() {
return <OCREditor
fileData={...}
ocrData={...}
env={getEditorConf()}
isLoading={isKvaLoad}
doAction={onEditorAction}
/>
}