@zgfe/business-lib 1.1.96-path.0 → 1.1.96-path.1

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.
@@ -127,23 +127,31 @@ var BizAddToPanel = function BizAddToPanel(props) {
127
127
  method: 'post',
128
128
  data: data
129
129
  }).then(function (res) {
130
- var _result$panel2;
130
+ var _props$defaultValue;
131
131
  setLoading(false);
132
132
  if (!res) return;
133
133
  var result = res.data;
134
- notification.success({
135
- message: /*#__PURE__*/React.createElement(React.Fragment, null, msgType, "\u81F3", /*#__PURE__*/React.createElement("a", {
136
- onClick: function onClick() {
137
- var _result$panel;
138
- if (router && routes) router.push({
139
- name: routes.panel,
140
- params: {
141
- panelId: ((_result$panel = result.panel) === null || _result$panel === void 0 ? void 0 : _result$panel.id) || form.panel.id
142
- }
143
- });
144
- }
145
- }, form.panel.name || ((_result$panel2 = result.panel) === null || _result$panel2 === void 0 ? void 0 : _result$panel2.name)), "\u6210\u529F")
146
- });
134
+ if (((_props$defaultValue = props.defaultValue) === null || _props$defaultValue === void 0 ? void 0 : _props$defaultValue.panel.id) && props.defaultValue.panel.id !== form.panel.id) {
135
+ notification.success({
136
+ message: '保存成功'
137
+ });
138
+ } else {
139
+ var _result$panel2;
140
+ notification.success({
141
+ message: /*#__PURE__*/React.createElement(React.Fragment, null, msgType, "\u81F3", /*#__PURE__*/React.createElement("a", {
142
+ onClick: function onClick() {
143
+ var _props$defaultValue2, _result$panel;
144
+ var methodType = ((_props$defaultValue2 = props.defaultValue) === null || _props$defaultValue2 === void 0 ? void 0 : _props$defaultValue2.panel.id) ? 'replace' : 'push';
145
+ if (router && routes) router[methodType]({
146
+ name: routes.panel,
147
+ params: {
148
+ panelId: ((_result$panel = result.panel) === null || _result$panel === void 0 ? void 0 : _result$panel.id) || form.panel.id
149
+ }
150
+ });
151
+ }
152
+ }, form.panel.name || ((_result$panel2 = result.panel) === null || _result$panel2 === void 0 ? void 0 : _result$panel2.name)), "\u6210\u529F")
153
+ });
154
+ }
147
155
  if (props.onOk) {
148
156
  var responseData = data;
149
157
  if (props.type !== 'edit') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/business-lib",
3
- "version": "1.1.96-path.0",
3
+ "version": "1.1.96-path.1",
4
4
  "module": "es/index.js",
5
5
  "typings": "es/index.d.ts",
6
6
  "files": [
@@ -55,7 +55,7 @@
55
55
  "react": "^16.12.0 || ^17.0.0",
56
56
  "yorkie": "^2.0.0"
57
57
  },
58
- "gitHead": "9e4959296426bb76642d98fc003f78cfd8aba8a2",
58
+ "gitHead": "f8a7a4604111271472256a828d5d33079abd67a5",
59
59
  "gitHooks": {
60
60
  "pre-commit": "lint-staged"
61
61
  }