@cqsjjb/jjb-react-admin-component 3.2.0-beta.0 → 3.2.0-beta.1
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.
- package/Editor/index.js +8 -8
- package/Editor/index.ts +2 -0
- package/package.json +3 -3
package/Editor/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
import '@wangeditor/editor/dist/css/style.css';
|
|
2
|
+
import '@wangeditor-next/editor/dist/css/style.css';
|
|
3
3
|
import React, { forwardRef, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
4
4
|
import { message } from 'antd';
|
|
5
5
|
import { http, tools } from '@cqsjjb/jjb-common-lib';
|
|
6
|
-
import { createEditor, createToolbar } from '@wangeditor/editor';
|
|
6
|
+
import { createEditor, createToolbar } from '@wangeditor-next/editor';
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* 工具函数:标准化 HTML 内容为空值
|
|
8
|
+
/**
|
|
9
|
+
* 工具函数:标准化 HTML 内容为空值
|
|
10
10
|
*/
|
|
11
11
|
function normalizeEmptyHtml(html) {
|
|
12
12
|
if (!html) return '';
|
|
@@ -14,8 +14,8 @@ function normalizeEmptyHtml(html) {
|
|
|
14
14
|
return cleaned === '<p><br></p>' || cleaned === '<p></p>' || cleaned === '' ? '' : html;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
* 校验上传文件类型和大小
|
|
17
|
+
/**
|
|
18
|
+
* 校验上传文件类型和大小
|
|
19
19
|
*/
|
|
20
20
|
function validateFile(file, {
|
|
21
21
|
validTypes,
|
|
@@ -35,8 +35,8 @@ function validateFile(file, {
|
|
|
35
35
|
return true;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
/**
|
|
39
|
-
* 通用上传函数
|
|
38
|
+
/**
|
|
39
|
+
* 通用上传函数
|
|
40
40
|
*/
|
|
41
41
|
async function handleUpload(file, insertFn, options) {
|
|
42
42
|
const {
|
package/Editor/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cqsjjb/jjb-react-admin-component",
|
|
3
|
-
"version": "3.2.0-beta.
|
|
3
|
+
"version": "3.2.0-beta.1",
|
|
4
4
|
"description": "jjb-react-admin-组件库@new",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "jjb-front-team",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"axios": "^1.6.5",
|
|
13
13
|
"spark-md5": "^3.0.2",
|
|
14
|
-
"cropperjs": "
|
|
15
|
-
"@wangeditor/editor": "latest",
|
|
14
|
+
"cropperjs": "^1.6.2",
|
|
15
|
+
"@wangeditor-next/editor": "latest",
|
|
16
16
|
"@cqsjjb-formily/renderer": "latest",
|
|
17
17
|
"@ant-design/pro-layout": "latest",
|
|
18
18
|
"use-antd-resizable-header": "latest",
|