szld-libs 0.4.46 → 0.4.49
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/dist/style.css +1 -1
- package/dist/szld-components.es.js +51950 -28754
- package/dist/szld-components.umd.js +396 -77
- package/es/components/AuthButton/index.d.ts +2 -1
- package/es/components/BackHeader/index.d.ts +1 -1
- package/es/components/CoralButton/index.d.ts +2 -1
- package/es/components/CreateForm/index.d.ts +1 -1
- package/es/components/CustomPagination/index.d.ts +2 -1
- package/es/components/DynamicForm/func.js +4 -0
- package/es/components/DynamicForm/index.d.ts +3 -0
- package/es/components/DynamicForm/myCascader/index.d.ts +1 -1
- package/es/components/DynamicForm/myCheckbox/index.d.ts +2 -1
- package/es/components/DynamicForm/myRadio/index.d.ts +2 -1
- package/es/components/DynamicForm/myRichText/index.d.ts +10 -0
- package/es/components/DynamicForm/myRichText/index.js +280 -0
- package/es/components/DynamicForm/myRichText/vite.svg +1 -0
- package/es/components/DynamicForm/mySelect/index.d.ts +2 -1
- package/es/components/DynamicForm/mySelect/index.js +51 -15
- package/es/components/DynamicForm/myUpload/index.d.ts +2 -1
- package/es/components/DynamicForm/radioCard/index.d.ts +1 -1
- package/es/components/DynamicForm/selectModel/index.d.ts +1 -1
- package/es/components/DynamicForm/selectModelBackfillFormItem/index.d.ts +1 -1
- package/es/components/DynamicForm/useDynamicForm.d.ts +1 -1
- package/es/components/DynamicForm/useDynamicForm.js +23 -3
- package/es/components/DynamicFormMobile/index.js +2 -0
- package/es/components/DynamicFormMobile/myCalendar/index.d.ts +2 -1
- package/es/components/DynamicFormMobile/myCascader/index.d.ts +1 -1
- package/es/components/DynamicFormMobile/myCheckbox/index.d.ts +2 -1
- package/es/components/DynamicFormMobile/myRadio/index.d.ts +2 -1
- package/es/components/DynamicFormMobile/mySelect/index.d.ts +2 -1
- package/es/components/DynamicFormMobile/myUpload/index.d.ts +2 -1
- package/es/components/DynamicFormMobile/radioCard/index.d.ts +1 -1
- package/es/components/DynamicFormMobile/selectModel/index.d.ts +1 -1
- package/es/components/DynamicFormMobile/selectModelBackfillFormItem/index.d.ts +1 -1
- package/es/components/DynamicFormMobile/useDynamicForm.d.ts +1 -1
- package/es/components/DynamicFormMobile/useDynamicForm.js +2 -0
- package/es/components/EditTable/index.d.ts +2 -1
- package/es/components/LoopSlide/index.js +1 -0
- package/es/components/SearchTable/index.d.ts +2 -1
- package/es/components/Upload/index.d.ts +1 -1
- package/es/components/VirtualTable/index.d.ts +2 -1
- package/es/components/WorkFlowNode/index.d.ts +1 -1
- package/es/components/common/403.d.ts +2 -1
- package/es/components/common/404.d.ts +2 -1
- package/es/hooks/useCaptcha.d.ts +2 -1
- package/es/hooks/useChangePwd.js +1 -0
- package/es/hooks/useDetailRender.d.ts +3 -2
- package/es/hooks/useUniversalTable.js +7 -0
- package/es/index.js +6 -9
- package/es/mock/index.d.ts +1 -14
- package/es/mock/index.js +9 -1404
- package/es/utils/formRules.js +6 -0
- package/es/utils/hmacSM3.js +40 -4
- package/es/utils/method.js +25 -5
- package/es/utils/szxkFunc.js +1 -0
- package/es/utils/verify-code.js +13 -0
- package/lib/components/AuthButton/index.d.ts +2 -1
- package/lib/components/BackHeader/index.d.ts +1 -1
- package/lib/components/CoralButton/index.d.ts +2 -1
- package/lib/components/CreateForm/index.d.ts +1 -1
- package/lib/components/CustomPagination/index.d.ts +2 -1
- package/lib/components/DynamicForm/func.js +4 -0
- package/lib/components/DynamicForm/index.d.ts +3 -0
- package/lib/components/DynamicForm/myCascader/index.d.ts +1 -1
- package/lib/components/DynamicForm/myCheckbox/index.d.ts +2 -1
- package/lib/components/DynamicForm/myRadio/index.d.ts +2 -1
- package/lib/components/DynamicForm/myRichText/index.d.ts +10 -0
- package/lib/components/DynamicForm/myRichText/index.js +279 -0
- package/lib/components/DynamicForm/myRichText/vite.svg +1 -0
- package/lib/components/DynamicForm/mySelect/index.d.ts +2 -1
- package/lib/components/DynamicForm/mySelect/index.js +49 -13
- package/lib/components/DynamicForm/myUpload/index.d.ts +2 -1
- package/lib/components/DynamicForm/radioCard/index.d.ts +1 -1
- package/lib/components/DynamicForm/selectModel/index.d.ts +1 -1
- package/lib/components/DynamicForm/selectModelBackfillFormItem/index.d.ts +1 -1
- package/lib/components/DynamicForm/useDynamicForm.d.ts +1 -1
- package/lib/components/DynamicForm/useDynamicForm.js +23 -3
- package/lib/components/DynamicFormMobile/index.js +2 -0
- package/lib/components/DynamicFormMobile/myCalendar/index.d.ts +2 -1
- package/lib/components/DynamicFormMobile/myCascader/index.d.ts +1 -1
- package/lib/components/DynamicFormMobile/myCheckbox/index.d.ts +2 -1
- package/lib/components/DynamicFormMobile/myRadio/index.d.ts +2 -1
- package/lib/components/DynamicFormMobile/mySelect/index.d.ts +2 -1
- package/lib/components/DynamicFormMobile/myUpload/index.d.ts +2 -1
- package/lib/components/DynamicFormMobile/radioCard/index.d.ts +1 -1
- package/lib/components/DynamicFormMobile/selectModel/index.d.ts +1 -1
- package/lib/components/DynamicFormMobile/selectModelBackfillFormItem/index.d.ts +1 -1
- package/lib/components/DynamicFormMobile/useDynamicForm.d.ts +1 -1
- package/lib/components/DynamicFormMobile/useDynamicForm.js +2 -0
- package/lib/components/EditTable/index.d.ts +2 -1
- package/lib/components/LoopSlide/index.js +1 -0
- package/lib/components/SearchTable/index.d.ts +2 -1
- package/lib/components/Upload/index.d.ts +1 -1
- package/lib/components/VirtualTable/index.d.ts +2 -1
- package/lib/components/WorkFlowNode/index.d.ts +1 -1
- package/lib/components/common/403.d.ts +2 -1
- package/lib/components/common/404.d.ts +2 -1
- package/lib/hooks/useCaptcha.d.ts +2 -1
- package/lib/hooks/useChangePwd.js +1 -0
- package/lib/hooks/useDetailRender.d.ts +3 -2
- package/lib/hooks/useUniversalTable.js +7 -0
- package/lib/index.js +6 -9
- package/lib/mock/index.d.ts +1 -14
- package/lib/mock/index.js +9 -1404
- package/lib/utils/formRules.js +6 -0
- package/lib/utils/hmacSM3.js +40 -4
- package/lib/utils/method.js +25 -5
- package/lib/utils/szxkFunc.js +1 -0
- package/lib/utils/verify-code.js +13 -0
- package/package.json +10 -1
package/es/utils/formRules.js
CHANGED
|
@@ -5,6 +5,7 @@ const formRules = {
|
|
|
5
5
|
},
|
|
6
6
|
telephone: {
|
|
7
7
|
pattern: /^[\d -]+$/,
|
|
8
|
+
// 只允许输入数字和 - ,11位或12位
|
|
8
9
|
message: "请输入正确的电话号码"
|
|
9
10
|
},
|
|
10
11
|
email: {
|
|
@@ -24,18 +25,22 @@ const formRules = {
|
|
|
24
25
|
message: "可输入字母、汉字、数字或()"
|
|
25
26
|
},
|
|
26
27
|
inputTextarea: {
|
|
28
|
+
// 审核原因输入限制
|
|
27
29
|
pattern: /^[\w\u4E00-\u9FA5\uF900-\uFA2D-\u3002-\uff1f-\uff01-\uff0c-\u3001-\uff1b-\uff1a]*$/,
|
|
28
30
|
message: "请输入字母、汉字或数字和中文常用字符:?!,、;。"
|
|
29
31
|
},
|
|
30
32
|
backendRestrict: {
|
|
33
|
+
// 后端不能接收这些类型的字符串
|
|
31
34
|
pattern: /^[^'"/\\]*$/,
|
|
32
35
|
message: `不能输入特殊字符\\'/"`
|
|
33
36
|
},
|
|
34
37
|
onetoNinetyNine: {
|
|
38
|
+
// 请输入1-99的整数
|
|
35
39
|
pattern: /^[1-9][0-9]{0,1}$/,
|
|
36
40
|
message: `请输入1-99的整数`
|
|
37
41
|
},
|
|
38
42
|
passwordRule: {
|
|
43
|
+
// 密码
|
|
39
44
|
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z0-9]{8,12}$/,
|
|
40
45
|
message: `密码应为字母大小写+数字8-12位组合`
|
|
41
46
|
},
|
|
@@ -48,6 +53,7 @@ const formRules = {
|
|
|
48
53
|
message: `请输入整数类型`
|
|
49
54
|
},
|
|
50
55
|
onlyBlankRule: {
|
|
56
|
+
// 不能只有空格
|
|
51
57
|
pattern: /\S/,
|
|
52
58
|
message: "输入内容不能只有空格"
|
|
53
59
|
}
|
package/es/utils/hmacSM3.js
CHANGED
|
@@ -4,10 +4,16 @@ var __publicField = (obj, key, value) => {
|
|
|
4
4
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
|
-
const _SM3 = class {
|
|
7
|
+
const _SM3 = class _SM3 {
|
|
8
|
+
/**
|
|
9
|
+
* 循环左移
|
|
10
|
+
*/
|
|
8
11
|
static rotateLeft(x, n) {
|
|
9
12
|
return x << n | x >>> 32 - n;
|
|
10
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* 布尔函数 FFj
|
|
16
|
+
*/
|
|
11
17
|
static FFj(X, Y, Z, j) {
|
|
12
18
|
if (j >= 0 && j <= 15) {
|
|
13
19
|
return X ^ Y ^ Z;
|
|
@@ -15,6 +21,9 @@ const _SM3 = class {
|
|
|
15
21
|
return X & Y | X & Z | Y & Z;
|
|
16
22
|
}
|
|
17
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* 布尔函数 GGj
|
|
26
|
+
*/
|
|
18
27
|
static GGj(X, Y, Z, j) {
|
|
19
28
|
if (j >= 0 && j <= 15) {
|
|
20
29
|
return X ^ Y ^ Z;
|
|
@@ -22,12 +31,21 @@ const _SM3 = class {
|
|
|
22
31
|
return X & Y | ~X & Z;
|
|
23
32
|
}
|
|
24
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* 置换函数 P0
|
|
36
|
+
*/
|
|
25
37
|
static P0(X) {
|
|
26
38
|
return X ^ _SM3.rotateLeft(X, 9) ^ _SM3.rotateLeft(X, 17);
|
|
27
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* 置换函数 P1
|
|
42
|
+
*/
|
|
28
43
|
static P1(X) {
|
|
29
44
|
return X ^ _SM3.rotateLeft(X, 15) ^ _SM3.rotateLeft(X, 23);
|
|
30
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* 消息填充
|
|
48
|
+
*/
|
|
31
49
|
static pad(message) {
|
|
32
50
|
const bitLength = message.length * 8;
|
|
33
51
|
const paddingLength = (448 - (bitLength + 1) % 512 + 512) % 512;
|
|
@@ -41,6 +59,9 @@ const _SM3 = class {
|
|
|
41
59
|
padded.set(lengthBytes, totalLength - 8);
|
|
42
60
|
return padded;
|
|
43
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* 处理一个512位块
|
|
64
|
+
*/
|
|
44
65
|
static processBlock(block, state) {
|
|
45
66
|
const W = new Uint32Array(68);
|
|
46
67
|
const W1 = new Uint32Array(64);
|
|
@@ -85,6 +106,9 @@ const _SM3 = class {
|
|
|
85
106
|
state[6] ^= G;
|
|
86
107
|
state[7] ^= H;
|
|
87
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* 计算SM3哈希值
|
|
111
|
+
*/
|
|
88
112
|
static hash(message) {
|
|
89
113
|
const padded = _SM3.pad(message);
|
|
90
114
|
const state = new Uint32Array(_SM3.IV);
|
|
@@ -99,14 +123,16 @@ const _SM3 = class {
|
|
|
99
123
|
}
|
|
100
124
|
return result;
|
|
101
125
|
}
|
|
126
|
+
/**
|
|
127
|
+
* 计算SM3哈希值并返回十六进制字符串
|
|
128
|
+
*/
|
|
102
129
|
static hashHex(message) {
|
|
103
130
|
const msgArray = typeof message === "string" ? new TextEncoder().encode(message) : message;
|
|
104
131
|
const hashBytes = _SM3.hash(msgArray);
|
|
105
132
|
return Array.from(hashBytes).map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
106
133
|
}
|
|
107
134
|
};
|
|
108
|
-
|
|
109
|
-
__publicField(SM3, "IV", new Uint32Array([
|
|
135
|
+
__publicField(_SM3, "IV", new Uint32Array([
|
|
110
136
|
1937774191,
|
|
111
137
|
1226093241,
|
|
112
138
|
388252375,
|
|
@@ -116,7 +142,7 @@ __publicField(SM3, "IV", new Uint32Array([
|
|
|
116
142
|
3817729613,
|
|
117
143
|
2969243214
|
|
118
144
|
]));
|
|
119
|
-
__publicField(
|
|
145
|
+
__publicField(_SM3, "T", new Uint32Array(64));
|
|
120
146
|
(() => {
|
|
121
147
|
for (let j = 0; j < 16; j++) {
|
|
122
148
|
_SM3.T[j] = 2043430169;
|
|
@@ -125,11 +151,15 @@ __publicField(SM3, "T", new Uint32Array(64));
|
|
|
125
151
|
_SM3.T[j] = 2055708042;
|
|
126
152
|
}
|
|
127
153
|
})();
|
|
154
|
+
let SM3 = _SM3;
|
|
128
155
|
class HmacSM3 {
|
|
129
156
|
constructor(key) {
|
|
130
157
|
__publicField(this, "key");
|
|
131
158
|
this.key = typeof key === "string" ? new TextEncoder().encode(key) : key;
|
|
132
159
|
}
|
|
160
|
+
/**
|
|
161
|
+
* 计算HMAC-SM3值
|
|
162
|
+
*/
|
|
133
163
|
digest(message) {
|
|
134
164
|
const msgArray = typeof message === "string" ? new TextEncoder().encode(message) : message;
|
|
135
165
|
const blockSize = 64;
|
|
@@ -159,10 +189,16 @@ class HmacSM3 {
|
|
|
159
189
|
const finalHash = SM3.hash(outerData);
|
|
160
190
|
return finalHash;
|
|
161
191
|
}
|
|
192
|
+
/**
|
|
193
|
+
* 计算HMAC-SM3值并返回十六进制字符串
|
|
194
|
+
*/
|
|
162
195
|
digestHex(message) {
|
|
163
196
|
const hashBytes = this.digest(message);
|
|
164
197
|
return Array.from(hashBytes).map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
165
198
|
}
|
|
199
|
+
/**
|
|
200
|
+
* 静态方法:快速计算HMAC-SM3
|
|
201
|
+
*/
|
|
166
202
|
static hmac(key, message) {
|
|
167
203
|
const hmac = new HmacSM3(key);
|
|
168
204
|
return hmac.digestHex(message);
|
package/es/utils/method.js
CHANGED
|
@@ -12,12 +12,28 @@ function base64ToString(base64Str) {
|
|
|
12
12
|
if (!isBase64(base64Str)) {
|
|
13
13
|
return base64Str;
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
try {
|
|
16
|
+
const decoded = atob(base64Str);
|
|
17
|
+
try {
|
|
18
|
+
const uriDecoded = decodeURIComponent(decoded);
|
|
19
|
+
if (uriDecoded.includes("%")) {
|
|
20
|
+
return decoded;
|
|
21
|
+
}
|
|
22
|
+
return uriDecoded;
|
|
23
|
+
} catch (uriError) {
|
|
24
|
+
try {
|
|
25
|
+
const bytes = new Uint8Array(decoded.length);
|
|
26
|
+
for (let i = 0; i < decoded.length; i++) {
|
|
27
|
+
bytes[i] = decoded.charCodeAt(i);
|
|
28
|
+
}
|
|
29
|
+
return new TextDecoder().decode(bytes);
|
|
30
|
+
} catch {
|
|
31
|
+
return decoded;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
} catch (error) {
|
|
35
|
+
return base64Str;
|
|
19
36
|
}
|
|
20
|
-
return new TextDecoder().decode(bytes);
|
|
21
37
|
}
|
|
22
38
|
function isBase64(str) {
|
|
23
39
|
if (!str)
|
|
@@ -147,6 +163,9 @@ const handleSubmitForm = (originalData, allValues) => {
|
|
|
147
163
|
attrItem.attrvalue = "";
|
|
148
164
|
}
|
|
149
165
|
break;
|
|
166
|
+
case "rich-text":
|
|
167
|
+
attrItem.attrvalue = btoa(encodeURIComponent(formValue));
|
|
168
|
+
break;
|
|
150
169
|
default:
|
|
151
170
|
if (!((_d = attrItem == null ? void 0 : attrItem.json) == null ? void 0 : _d["properties-multiple"])) {
|
|
152
171
|
attrItem.attrvalue = formValue;
|
|
@@ -458,6 +477,7 @@ const handleAttrListToObjDetail = async ({
|
|
|
458
477
|
currentItem.children = await handleAttrListToObjDetail({
|
|
459
478
|
attrList: v.children,
|
|
460
479
|
params: childParams,
|
|
480
|
+
// 传递子层级参数
|
|
461
481
|
extra,
|
|
462
482
|
commonRequest
|
|
463
483
|
});
|
package/es/utils/szxkFunc.js
CHANGED
|
@@ -61,6 +61,7 @@ const handleObjDetailToSignleAttrList = (attrList, detail) => {
|
|
|
61
61
|
};
|
|
62
62
|
const handleSetTableRowColor = (record, index, ngColor) => ({
|
|
63
63
|
style: {
|
|
64
|
+
// 隔行变色
|
|
64
65
|
backgroundColor: index !== void 0 && index % 2 === 1 ? (ngColor == null ? void 0 : ngColor[0]) || "rgba(0, 77, 50, 0.16)" : (ngColor == null ? void 0 : ngColor[1]) || "rgba(0, 77, 50, 0.24)"
|
|
65
66
|
}
|
|
66
67
|
});
|
package/es/utils/verify-code.js
CHANGED
|
@@ -6,12 +6,19 @@ var __publicField = (obj, key, value) => {
|
|
|
6
6
|
};
|
|
7
7
|
class getGVerify {
|
|
8
8
|
constructor(options) {
|
|
9
|
+
//创建图形验证码
|
|
9
10
|
__publicField(this, "options", {
|
|
11
|
+
//默认值
|
|
10
12
|
id: "",
|
|
13
|
+
//容器Id
|
|
11
14
|
canvasId: "verifyCanvas",
|
|
15
|
+
//canvas的ID
|
|
12
16
|
width: 100,
|
|
17
|
+
//默认canvas宽度
|
|
13
18
|
height: 30,
|
|
19
|
+
//默认canvas高度
|
|
14
20
|
type: "blend",
|
|
21
|
+
//图形验证码默认类型blend:数字字母混合类型、number:纯数字、letter:纯字母
|
|
15
22
|
code: ""
|
|
16
23
|
});
|
|
17
24
|
this.options = options;
|
|
@@ -22,6 +29,7 @@ class getGVerify {
|
|
|
22
29
|
this._init();
|
|
23
30
|
this.refresh();
|
|
24
31
|
}
|
|
32
|
+
/**初始化方法**/
|
|
25
33
|
_init() {
|
|
26
34
|
const con = document.getElementById(this.options.id);
|
|
27
35
|
const canvas = document.createElement("canvas");
|
|
@@ -37,6 +45,7 @@ class getGVerify {
|
|
|
37
45
|
this.refresh();
|
|
38
46
|
};
|
|
39
47
|
}
|
|
48
|
+
/**生成验证码**/
|
|
40
49
|
refresh() {
|
|
41
50
|
this.options.code = "";
|
|
42
51
|
const canvas = document.getElementById(this.options.canvasId);
|
|
@@ -87,6 +96,7 @@ class getGVerify {
|
|
|
87
96
|
ctx.fill();
|
|
88
97
|
}
|
|
89
98
|
}
|
|
99
|
+
/**验证验证码**/
|
|
90
100
|
validate(code) {
|
|
91
101
|
const verifyCode = code.toLowerCase();
|
|
92
102
|
const v_code = this.options.code.toLowerCase();
|
|
@@ -96,13 +106,16 @@ class getGVerify {
|
|
|
96
106
|
return false;
|
|
97
107
|
}
|
|
98
108
|
}
|
|
109
|
+
/**生成字母数组**/
|
|
99
110
|
getAllLetter() {
|
|
100
111
|
const letterStr = "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z";
|
|
101
112
|
return letterStr.split(",");
|
|
102
113
|
}
|
|
114
|
+
/**生成一个随机数**/
|
|
103
115
|
randomNum(min, max) {
|
|
104
116
|
return Math.floor(Math.random() * (max - min) + min);
|
|
105
117
|
}
|
|
118
|
+
/**生成一个随机色**/
|
|
106
119
|
randomColor(min, max) {
|
|
107
120
|
const r = this.randomNum(min, max);
|
|
108
121
|
const g = this.randomNum(min, max);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { ButtonProps } from "antd";
|
|
2
3
|
export interface AuthButtonProps extends ButtonProps {
|
|
3
4
|
auth?: boolean;
|
|
4
5
|
}
|
|
5
|
-
declare const AuthButton: (props: AuthButtonProps) => import("react
|
|
6
|
+
declare const AuthButton: (props: AuthButtonProps) => import("react").JSX.Element | null;
|
|
6
7
|
export default AuthButton;
|
|
@@ -21,5 +21,5 @@ interface BackHeaderProps {
|
|
|
21
21
|
/** 自定义返回事件 */
|
|
22
22
|
onBack?: () => void;
|
|
23
23
|
}
|
|
24
|
-
declare const BackHeader: (props: BackHeaderProps) => import("react
|
|
24
|
+
declare const BackHeader: (props: BackHeaderProps) => import("react").JSX.Element;
|
|
25
25
|
export default BackHeader;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { ButtonProps } from "antd";
|
|
2
3
|
interface AuthProps {
|
|
3
4
|
PId: number;
|
|
@@ -6,5 +7,5 @@ export interface CoralButtonProps extends ButtonProps {
|
|
|
6
7
|
PId: number | number[];
|
|
7
8
|
auths?: AuthProps[];
|
|
8
9
|
}
|
|
9
|
-
declare const CoralButton: (props: CoralButtonProps) => import("react
|
|
10
|
+
declare const CoralButton: (props: CoralButtonProps) => import("react").JSX.Element;
|
|
10
11
|
export default CoralButton;
|
|
@@ -45,7 +45,7 @@ export interface CreateFormProps {
|
|
|
45
45
|
hiddenTitle?: boolean;
|
|
46
46
|
langId?: string;
|
|
47
47
|
}
|
|
48
|
-
declare const CreateForm: (props: CreateFormProps) =>
|
|
48
|
+
declare const CreateForm: (props: CreateFormProps) => React.JSX.Element;
|
|
49
49
|
interface FormFieldsProps extends Pick<CreateFormItemProps<ValueType>, 'valueType' | 'valueProps'> {
|
|
50
50
|
onChange?: (e: any) => void;
|
|
51
51
|
value?: any;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { PaginationProps } from 'antd';
|
|
2
3
|
export interface CustomPaginationProps {
|
|
3
4
|
/** 总数文本 */
|
|
@@ -11,5 +12,5 @@ export interface CustomPaginationProps {
|
|
|
11
12
|
/** pagination属性配置 */
|
|
12
13
|
paginationProps?: PaginationProps;
|
|
13
14
|
}
|
|
14
|
-
declare function CustomPagination(props: CustomPaginationProps): import("react
|
|
15
|
+
declare function CustomPagination(props: CustomPaginationProps): import("react").JSX.Element;
|
|
15
16
|
export default CustomPagination;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const dayjs = require("dayjs");
|
|
4
4
|
const antd = require("antd");
|
|
5
|
+
const method = require("../../utils/method");
|
|
5
6
|
const handleGetPlaceholder = (itemWithJson, langId) => {
|
|
6
7
|
const { input = "" } = (itemWithJson == null ? void 0 : itemWithJson.json) || {};
|
|
7
8
|
let placeholderCn = "请输入", placeholderEn = "Please input";
|
|
@@ -89,6 +90,9 @@ const handleSetFormItemInitialValue = (itemWithJson) => {
|
|
|
89
90
|
if (itemWithJson.attrtype === 1) {
|
|
90
91
|
initialValue = handleGetSingleAttrListObj(itemWithJson.children || []);
|
|
91
92
|
}
|
|
93
|
+
if (inputType === "rich-text" && initialValue) {
|
|
94
|
+
initialValue = method.base64ToString(initialValue);
|
|
95
|
+
}
|
|
92
96
|
return initialValue || null;
|
|
93
97
|
};
|
|
94
98
|
const disabledDate = (current) => {
|
|
@@ -18,6 +18,8 @@ export interface IformConfigItem {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export interface Ijson {
|
|
21
|
+
'operation-types'?: string[]; // 自定义按钮类型列表
|
|
22
|
+
'custom-operation'?: boolean; // 是否自定义按钮
|
|
21
23
|
extraDescObj?: Record<string, any>;
|
|
22
24
|
hidden?: boolean; // 是否隐藏属性
|
|
23
25
|
'auto-generate'?: boolean; // 是否自动生成时间
|
|
@@ -102,6 +104,7 @@ export type InputType =
|
|
|
102
104
|
| 'checkbox'
|
|
103
105
|
| 'cascader'
|
|
104
106
|
| 'mult-field-modal-select' // 弹窗选择对应多个表单字段
|
|
107
|
+
| 'rich-text' // 富文本
|
|
105
108
|
| string;
|
|
106
109
|
|
|
107
110
|
// 定义文件上传值类型
|
|
@@ -15,5 +15,5 @@ interface MyCascaderProps {
|
|
|
15
15
|
actionUrlExtraParams: object;
|
|
16
16
|
langId?: string;
|
|
17
17
|
}
|
|
18
|
-
declare const MyCascader: ({ item, readonly, value, onChange, style, commonRequestWidthParams, commonRequest, interfaceTypeDict, interfaceTypeSysDict, actionUrlKey, actionUrlExtraParams, langId, }: MyCascaderProps) => import("react
|
|
18
|
+
declare const MyCascader: ({ item, readonly, value, onChange, style, commonRequestWidthParams, commonRequest, interfaceTypeDict, interfaceTypeSysDict, actionUrlKey, actionUrlExtraParams, langId, }: MyCascaderProps) => import("react").JSX.Element;
|
|
19
19
|
export default MyCascader;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { AxiosResponse } from 'axios';
|
|
2
3
|
import { Ijson } from '../index.d';
|
|
3
4
|
export interface IMYRadio {
|
|
@@ -15,5 +16,5 @@ export interface IMYRadio {
|
|
|
15
16
|
actionUrlKey: string;
|
|
16
17
|
actionUrlExtraParams: object;
|
|
17
18
|
}
|
|
18
|
-
declare const MyCheckbox: (props: IMYRadio) => import("react
|
|
19
|
+
declare const MyCheckbox: (props: IMYRadio) => import("react").JSX.Element;
|
|
19
20
|
export default MyCheckbox;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { RadioChangeEvent } from 'antd';
|
|
2
3
|
import { AxiosResponse } from 'axios';
|
|
3
4
|
import { Ijson } from '../index.d';
|
|
@@ -16,5 +17,5 @@ export interface IMYRadio {
|
|
|
16
17
|
actionUrlKey: string;
|
|
17
18
|
actionUrlExtraParams: object;
|
|
18
19
|
}
|
|
19
|
-
declare const MyRadio: (props: IMYRadio) => import("react
|
|
20
|
+
declare const MyRadio: (props: IMYRadio) => import("react").JSX.Element;
|
|
20
21
|
export default MyRadio;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface IMyRichTextProps {
|
|
3
|
+
item: any;
|
|
4
|
+
readonly: boolean;
|
|
5
|
+
style: React.CSSProperties;
|
|
6
|
+
value: string;
|
|
7
|
+
onChange: (val: string) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const MyRichText: ({ item, readonly, style, value, onChange }: IMyRichTextProps) => import("react").JSX.Element | null;
|
|
10
|
+
export default MyRichText;
|