@zgfe/modules-settings 2.0.0-zhongyuan.10 → 2.0.0-zhongyuan.12
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.
|
@@ -18,7 +18,8 @@ var PersonalInfo = function PersonalInfo(_ref) {
|
|
|
18
18
|
isDemo = _useContext.isDemo;
|
|
19
19
|
var _useState = useState({
|
|
20
20
|
username: currentUser === null || currentUser === void 0 ? void 0 : currentUser.username,
|
|
21
|
-
emailNote: currentUser === null || currentUser === void 0 ? void 0 : currentUser.emailNote
|
|
21
|
+
emailNote: currentUser === null || currentUser === void 0 ? void 0 : currentUser.emailNote,
|
|
22
|
+
telphone: currentUser === null || currentUser === void 0 ? void 0 : currentUser.telphone
|
|
22
23
|
}),
|
|
23
24
|
_useState2 = _slicedToArray(_useState, 2),
|
|
24
25
|
initialValues = _useState2[0],
|
|
@@ -42,8 +43,7 @@ var PersonalInfo = function PersonalInfo(_ref) {
|
|
|
42
43
|
data: JSON.stringify({
|
|
43
44
|
name: username,
|
|
44
45
|
email: emailNote,
|
|
45
|
-
|
|
46
|
-
mobile: currentUser === null || currentUser === void 0 ? void 0 : currentUser.telphone
|
|
46
|
+
mobile: telphone
|
|
47
47
|
})
|
|
48
48
|
}
|
|
49
49
|
}).then(function (res) {
|
|
@@ -54,11 +54,13 @@ var PersonalInfo = function PersonalInfo(_ref) {
|
|
|
54
54
|
// 表单重置
|
|
55
55
|
setInitialValues({
|
|
56
56
|
username: username,
|
|
57
|
-
emailNote: emailNote
|
|
57
|
+
emailNote: emailNote,
|
|
58
|
+
telphone: telphone
|
|
58
59
|
});
|
|
59
60
|
form.resetFields();
|
|
60
61
|
currentUser.username = username;
|
|
61
62
|
currentUser.emailNote = emailNote;
|
|
63
|
+
currentUser.telphone = telphone;
|
|
62
64
|
// 主应用更新currentUser,同公司设置-更新应用名称回调
|
|
63
65
|
settingsCallback('settingChangeCompanyNameCallback');
|
|
64
66
|
} else {
|
|
@@ -109,6 +111,7 @@ var PersonalInfo = function PersonalInfo(_ref) {
|
|
|
109
111
|
message: '请输入正确的手机号'
|
|
110
112
|
}]
|
|
111
113
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
114
|
+
maxLength: 11,
|
|
112
115
|
placeholder: "\u624B\u673A\u53F7",
|
|
113
116
|
disabled: isDemo
|
|
114
117
|
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
@@ -131,7 +134,7 @@ var PersonalInfo = function PersonalInfo(_ref) {
|
|
|
131
134
|
type: "primary",
|
|
132
135
|
htmlType: "submit",
|
|
133
136
|
loading: loading,
|
|
134
|
-
disabled: isDemo || !(form.isFieldTouched('username') || form.isFieldTouched('emailNote')) || !!form.getFieldsError().filter(function (_ref2) {
|
|
137
|
+
disabled: isDemo || !(form.isFieldTouched('username') || form.isFieldTouched('emailNote') || form.isFieldTouched('telphone')) || !!form.getFieldsError().filter(function (_ref2) {
|
|
135
138
|
var errors = _ref2.errors;
|
|
136
139
|
return errors.length;
|
|
137
140
|
}).length || JSON.stringify(initialValues) === JSON.stringify(form.getFieldsValue())
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-settings",
|
|
3
|
-
"version": "2.0.0-zhongyuan.
|
|
3
|
+
"version": "2.0.0-zhongyuan.12",
|
|
4
4
|
"private": false,
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"typings": "es/index.d.ts",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "ff4b48c7cc2c7d9fca6878dfcad019a2e1a708af",
|
|
71
71
|
"gitHooks": {
|
|
72
72
|
"pre-commit": "lint-staged"
|
|
73
73
|
}
|