@yilianjituan/yilian_dgerm 0.0.1-alpha.37 → 0.0.1-alpha.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  * @Author: chengjiang
14
14
  * @Date: 2024-11-05 09:35:37
15
15
  * @Last Modified by: chengjiang
16
- * @Last Modified time: 2024-11-19 09:25:26
16
+ * @Last Modified time: 2024-11-22 09:52:49
17
17
  */
18
18
  import "./index.scss";
19
19
  import { Button, ColorPicker, Image, message, Modal, Radio, Switch } from 'antd';
@@ -369,14 +369,15 @@ var Index = function Index(props) {
369
369
 
370
370
  // 选中全部
371
371
  var handleSelectAll = function handleSelectAll() {
372
- if (!ocrResult || !ocrResult.wordsResult) {
373
- copy('');
374
- return;
372
+ if (!ocrResult || !ocrResult.wordsResult || ocrResult.wordsResult.length === 0) {
373
+ // 清空粘贴板
374
+ navigator.clipboard.writeText('');
375
+ } else {
376
+ var allText = ocrResult.wordsResult.map(function (item) {
377
+ return item.words;
378
+ }).join(' ');
379
+ copy(allText);
375
380
  }
376
- var allText = ocrResult.wordsResult.map(function (item) {
377
- return item.words;
378
- }).join(' ');
379
- copy(allText);
380
381
  message.success('复制成功');
381
382
  };
382
383
  return loading ? /*#__PURE__*/React.createElement(React.Fragment, null) : /*#__PURE__*/React.createElement(Modal, _extends({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yilianjituan/yilian_dgerm",
3
- "version": "0.0.1-alpha.37",
3
+ "version": "0.0.1-alpha.38",
4
4
  "description": "A react library developed with dumi",
5
5
  "keywords": [
6
6
  "React",