@deepinnet-components/pc 0.0.27 → 0.0.29
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.
|
@@ -110,12 +110,7 @@ var schema = {
|
|
|
110
110
|
required: true,
|
|
111
111
|
message: '请输入密码'
|
|
112
112
|
}, {
|
|
113
|
-
validator:
|
|
114
|
-
var regex = /^(?=(?:.*[a-z]))(?=(?:.*[A-Z]))(?=(?:.*\d)).{8,}$|^(?=(?:.*[a-z]))(?=(?:.*[A-Z]))(?=(?:.*[^A-Za-z0-9])).{8,}$|^(?=(?:.*[a-z]))(?=(?:.*\d))(?=(?:.*[^A-Za-z0-9])).{8,}$|^(?=(?:.*[A-Z]))(?=(?:.*\d))(?=(?:.*[^A-Za-z0-9])).{8,}$/;
|
|
115
|
-
if (val && !regex.test(val)) {
|
|
116
|
-
return '密码需至少包含大、小写字母、数字以及特殊符号3种,且不少于8位';
|
|
117
|
-
}
|
|
118
|
-
}
|
|
113
|
+
validator: "{{\n (val) => {\n if (!passwordConfig) return;\n const regex = passwordConfig.regex;\n if (val && !regex.test(val)) {\n return passwordConfig.message\n }\n }\n }}"
|
|
119
114
|
}],
|
|
120
115
|
'x-reactions': [{
|
|
121
116
|
when: '{{addOrEdit === "add"}}',
|
|
@@ -163,6 +158,7 @@ var CreateAccount = function CreateAccount(props) {
|
|
|
163
158
|
Components = contextValue.Components,
|
|
164
159
|
userType = contextValue.userType,
|
|
165
160
|
isMultiRole = contextValue.isMultiRole,
|
|
161
|
+
passwordConfig = contextValue.passwordConfig,
|
|
166
162
|
passwordEncryption = contextValue.passwordEncryption,
|
|
167
163
|
passwordEncryptionNeedSalt = contextValue.passwordEncryptionNeedSalt;
|
|
168
164
|
var getAccountDetail = /*#__PURE__*/function () {
|
|
@@ -357,7 +353,8 @@ var CreateAccount = function CreateAccount(props) {
|
|
|
357
353
|
schema: schema,
|
|
358
354
|
scope: {
|
|
359
355
|
addOrEdit: addOrEdit,
|
|
360
|
-
isMultiRole: isMultiRole
|
|
356
|
+
isMultiRole: isMultiRole,
|
|
357
|
+
passwordConfig: passwordConfig
|
|
361
358
|
}
|
|
362
359
|
}), /*#__PURE__*/React.createElement(FormButtonGroup.FormItem, null, /*#__PURE__*/React.createElement(Button, {
|
|
363
360
|
type: "primary",
|
|
@@ -58,6 +58,8 @@ var Index = function Index(props) {
|
|
|
58
58
|
showDataAuth = _props$showDataAuth === void 0 ? false : _props$showDataAuth,
|
|
59
59
|
_props$isMultiRole = props.isMultiRole,
|
|
60
60
|
isMultiRole = _props$isMultiRole === void 0 ? true : _props$isMultiRole,
|
|
61
|
+
_props$passwordConfig = props.passwordConfig,
|
|
62
|
+
passwordConfig = _props$passwordConfig === void 0 ? null : _props$passwordConfig,
|
|
61
63
|
_props$passwordEncryp = props.passwordEncryption,
|
|
62
64
|
passwordEncryption = _props$passwordEncryp === void 0 ? 'md5' : _props$passwordEncryp,
|
|
63
65
|
_props$passwordEncryp2 = props.passwordEncryptionNeedSalt,
|
|
@@ -213,6 +215,7 @@ var Index = function Index(props) {
|
|
|
213
215
|
userType: userType,
|
|
214
216
|
showDataAuth: showDataAuth,
|
|
215
217
|
isMultiRole: isMultiRole,
|
|
218
|
+
passwordConfig: passwordConfig,
|
|
216
219
|
passwordEncryption: passwordEncryption,
|
|
217
220
|
passwordEncryptionNeedSalt: passwordEncryptionNeedSalt,
|
|
218
221
|
hideDeleteAccountBtn: hideDeleteAccountBtn,
|
|
@@ -11,7 +11,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
11
11
|
import { Form, FormItem, Input, Select } from '@formily/antd-v5';
|
|
12
12
|
import { createForm } from '@formily/core';
|
|
13
13
|
import { createSchemaField } from '@formily/react';
|
|
14
|
-
import { Modal, message
|
|
14
|
+
import { Checkbox, Modal, message } from 'antd';
|
|
15
15
|
import React, { useContext, useEffect, useMemo, useState } from 'react';
|
|
16
16
|
import OrgSelect from "../../../OrgSelect";
|
|
17
17
|
import { MEMBER_TYPE_ENUM, MEMBER_TYPE_TEXT_ENUM } from "../../../enum";
|
|
@@ -227,6 +227,9 @@ var CreateMember = function CreateMember(props) {
|
|
|
227
227
|
// disabled: '{{type === "edit"}}',
|
|
228
228
|
},
|
|
229
229
|
'x-validator': [{
|
|
230
|
+
required: true,
|
|
231
|
+
message: '请输入手机号'
|
|
232
|
+
}, {
|
|
230
233
|
format: 'phone',
|
|
231
234
|
message: '请输入正确的手机号'
|
|
232
235
|
}]
|