@fe-free/core 2.0.1 → 2.0.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @fe-free/core
2
2
 
3
+ ## 2.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: 整理
8
+ - @fe-free/tool@2.0.3
9
+
10
+ ## 2.0.2
11
+
12
+ ### Patch Changes
13
+
14
+ - feat: editor mention
15
+ - @fe-free/tool@2.0.2
16
+
3
17
  ## 2.0.1
4
18
 
5
19
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fe-free/core",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "",
5
5
  "main": "./src/index.ts",
6
6
  "author": "",
@@ -38,7 +38,7 @@
38
38
  "remark-gfm": "^4.0.1",
39
39
  "vanilla-jsoneditor": "^0.23.1",
40
40
  "zustand": "^4.5.4",
41
- "@fe-free/tool": "2.0.1"
41
+ "@fe-free/tool": "2.0.3"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@ant-design/pro-components": "^2.8.7",
package/src/crud/crud.tsx CHANGED
@@ -142,9 +142,9 @@ function CRUDComponent<
142
142
 
143
143
  if (disabled) {
144
144
  btns.push(
145
- <a key="update" disabled>
145
+ <span key="update" className="text-desc cursor-not-allowed">
146
146
  {updateProps?.operateText || '编辑'}
147
- </a>,
147
+ </span>,
148
148
  );
149
149
  } else {
150
150
  btns.push(
@@ -39,7 +39,7 @@ function OperateDelete(props: Params) {
39
39
  const { doDelete } = useDelete({ name, desc, onDelete, operateText });
40
40
 
41
41
  if (disabled) {
42
- return <a disabled>{operateText || '删除'}</a>;
42
+ return <span className="text-desc cursor-not-allowed">{operateText || '删除'}</span>;
43
43
  }
44
44
 
45
45
  return (
@@ -0,0 +1,10 @@
1
+ function escapeHTML(str: string) {
2
+ return str
3
+ .replace(/&/g, '&amp;')
4
+ .replace(/</g, '&lt;')
5
+ .replace(/>/g, '&gt;')
6
+ .replace(/"/g, '&quot;')
7
+ .replace(/'/g, '&#39;');
8
+ }
9
+
10
+ export { escapeHTML };
@@ -1,7 +1,6 @@
1
- import React from 'react';
2
1
  import { ProFormDateRangePicker } from '@ant-design/pro-components';
3
- import dayjs from 'dayjs';
4
2
  import { getDayjs } from '@fe-free/tool';
3
+ import dayjs from 'dayjs';
5
4
 
6
5
  const renderMap = {
7
6
  dateTime: (text) => {