@titaui/pc 1.7.54 → 1.7.58
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/lib/components/error-boundary/index.js +11 -7
- package/lib/components/menus/export-modules/manage-menus/index.js +1 -1
- package/lib/pages/personal-info/components/base-info/index.js +1 -1
- package/package.json +1 -1
- package/src/components/error-boundary/index.tsx +7 -6
- package/src/components/menus/export-modules/manage-menus/index.tsx +1 -1
- package/src/pages/personal-info/components/base-info/index.tsx +1 -1
|
@@ -58,13 +58,17 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
58
58
|
_createClass(ErrorBoundary, [{
|
|
59
59
|
key: "componentDidCatch",
|
|
60
60
|
value: function componentDidCatch(error, errorInfo) {
|
|
61
|
-
var
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
eventId
|
|
61
|
+
var _this2 = this;
|
|
62
|
+
|
|
63
|
+
Sentry.withScope(function (scope) {
|
|
64
|
+
scope.setTag("error-level", "P".concat(_this2.props.errorLevel || 0));
|
|
65
|
+
scope.setTag("error-type", "\u767D\u9875");
|
|
66
|
+
scope.setExtra("componentStack", errorInfo.componentStack);
|
|
67
|
+
var eventId = Sentry.captureException(new Error(error), scope);
|
|
68
|
+
|
|
69
|
+
_this2.setState({
|
|
70
|
+
eventId: eventId
|
|
71
|
+
});
|
|
68
72
|
});
|
|
69
73
|
}
|
|
70
74
|
}, {
|
|
@@ -78,7 +78,7 @@ var ManageMenus = function ManageMenus(props) {
|
|
|
78
78
|
var search = history.location.search;
|
|
79
79
|
var activeMenu = new _handleHighlight.JudgeManageHighLightMenu(search).getHighLightMenu();
|
|
80
80
|
setSelectedMenuKeys([activeMenu]);
|
|
81
|
-
}, [history]);
|
|
81
|
+
}, [history.location.pathname, history.location.search]);
|
|
82
82
|
|
|
83
83
|
var onSelectHandler = function onSelectHandler(selectedKyes, _ref) {
|
|
84
84
|
var node = _ref.node;
|
|
@@ -183,7 +183,7 @@ var BaseInfo = function BaseInfo() {
|
|
|
183
183
|
placeholder: "请输入联系邮箱",
|
|
184
184
|
verifies: [{
|
|
185
185
|
"tip": "邮箱格式错误",
|
|
186
|
-
"test": /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/
|
|
186
|
+
"test": /^([a-zA-Z0-9_-]|\.)+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/
|
|
187
187
|
}],
|
|
188
188
|
onChange: handleEmailChange
|
|
189
189
|
}))));
|
package/package.json
CHANGED
|
@@ -21,12 +21,13 @@ class ErrorBoundary extends React.Component<PropsType, StateType> {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
componentDidCatch(error, errorInfo) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
Sentry.withScope((scope) => {
|
|
25
|
+
scope.setTag("error-level", `P${this.props.errorLevel || 0}`);
|
|
26
|
+
scope.setTag("error-type", `白页`);
|
|
27
|
+
scope.setExtra("componentStack", errorInfo.componentStack);
|
|
28
|
+
const eventId = Sentry.captureException(new Error(error), scope);
|
|
29
|
+
this.setState({ eventId });
|
|
30
|
+
});
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
render() {
|
|
@@ -61,7 +61,7 @@ const ManageMenus = (props: Props) => {
|
|
|
61
61
|
const search = history.location.search;
|
|
62
62
|
const activeMenu = new JudgeManageHighLightMenu(search).getHighLightMenu();
|
|
63
63
|
setSelectedMenuKeys([activeMenu]);
|
|
64
|
-
}, [history]);
|
|
64
|
+
}, [history.location.pathname,history.location.search]);
|
|
65
65
|
|
|
66
66
|
const onSelectHandler = (selectedKyes, { node }) => {
|
|
67
67
|
// 处理菜单选中
|
|
@@ -130,7 +130,7 @@ const BaseInfo: FC = () => {
|
|
|
130
130
|
verifies={[
|
|
131
131
|
{
|
|
132
132
|
"tip": "邮箱格式错误",
|
|
133
|
-
"test": /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/,
|
|
133
|
+
"test": /^([a-zA-Z0-9_-]|\.)+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/,
|
|
134
134
|
},
|
|
135
135
|
]}
|
|
136
136
|
onChange={handleEmailChange}
|