@riil-frontend/component-topology 2.4.3 → 2.4.4

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.
@@ -133,8 +133,6 @@ export default function (topoApp) {
133
133
  var _this2 = this;
134
134
 
135
135
  return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
136
- var _data$config;
137
-
138
136
  var id, data, linkTo, viewState, topoId;
139
137
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
140
138
  while (1) {
@@ -142,7 +140,7 @@ export default function (topoApp) {
142
140
  case 0:
143
141
  id = playload.id, data = playload.data, linkTo = playload.linkTo;
144
142
  viewState = playload.mode || playload.viewState || 'view';
145
- topoId = id || (data === null || data === void 0 ? void 0 : (_data$config = data.config) === null || _data$config === void 0 ? void 0 : _data$config.id);
143
+ topoId = id || data.config.id;
146
144
 
147
145
  _this2.update({
148
146
  viewState: viewState,
@@ -151,34 +149,24 @@ export default function (topoApp) {
151
149
  topoPermission: undefined
152
150
  });
153
151
 
154
- if (id) {
155
- _context2.next = 7;
156
- break;
157
- }
158
-
159
- _this2.clearData();
160
-
161
- return _context2.abrupt("return");
162
-
163
- case 7:
164
- _context2.next = 9;
152
+ _context2.next = 6;
165
153
  return topoApp.open(topoId);
166
154
 
167
- case 9:
168
- _context2.next = 11;
155
+ case 6:
156
+ _context2.next = 8;
169
157
  return _this2.initTopoData({
170
158
  topoId: topoId,
171
159
  data: data,
172
160
  linkTo: linkTo
173
161
  });
174
162
 
175
- case 11:
163
+ case 8:
176
164
  if (viewState === 'edit') {
177
165
  // TODO 待优化进入编辑模式方式
178
166
  _this2.enterEditMode();
179
167
  }
180
168
 
181
- case 12:
169
+ case 9:
182
170
  case "end":
183
171
  return _context2.stop();
184
172
  }
@@ -189,10 +189,23 @@ export default {
189
189
  viewState: viewState || 'view'
190
190
  });
191
191
 
192
- _context4.next = 5;
192
+ if (!id) {
193
+ _context4.next = 8;
194
+ break;
195
+ }
196
+
197
+ _context4.next = 6;
193
198
  return dispatch.topoMod.openTopoPage(playload);
194
199
 
195
- case 5:
200
+ case 6:
201
+ _context4.next = 10;
202
+ break;
203
+
204
+ case 8:
205
+ _context4.next = 10;
206
+ return dispatch.topoMod.clearData();
207
+
208
+ case 10:
196
209
  case "end":
197
210
  return _context4.stop();
198
211
  }
@@ -154,8 +154,6 @@ function _default(topoApp) {
154
154
  var _this2 = this;
155
155
 
156
156
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
157
- var _data$config;
158
-
159
157
  var id, data, linkTo, viewState, topoId;
160
158
  return _regenerator["default"].wrap(function _callee2$(_context2) {
161
159
  while (1) {
@@ -163,7 +161,7 @@ function _default(topoApp) {
163
161
  case 0:
164
162
  id = playload.id, data = playload.data, linkTo = playload.linkTo;
165
163
  viewState = playload.mode || playload.viewState || 'view';
166
- topoId = id || (data === null || data === void 0 ? void 0 : (_data$config = data.config) === null || _data$config === void 0 ? void 0 : _data$config.id);
164
+ topoId = id || data.config.id;
167
165
 
168
166
  _this2.update({
169
167
  viewState: viewState,
@@ -172,34 +170,24 @@ function _default(topoApp) {
172
170
  topoPermission: undefined
173
171
  });
174
172
 
175
- if (id) {
176
- _context2.next = 7;
177
- break;
178
- }
179
-
180
- _this2.clearData();
181
-
182
- return _context2.abrupt("return");
183
-
184
- case 7:
185
- _context2.next = 9;
173
+ _context2.next = 6;
186
174
  return topoApp.open(topoId);
187
175
 
188
- case 9:
189
- _context2.next = 11;
176
+ case 6:
177
+ _context2.next = 8;
190
178
  return _this2.initTopoData({
191
179
  topoId: topoId,
192
180
  data: data,
193
181
  linkTo: linkTo
194
182
  });
195
183
 
196
- case 11:
184
+ case 8:
197
185
  if (viewState === 'edit') {
198
186
  // TODO 待优化进入编辑模式方式
199
187
  _this2.enterEditMode();
200
188
  }
201
189
 
202
- case 12:
190
+ case 9:
203
191
  case "end":
204
192
  return _context2.stop();
205
193
  }
@@ -200,10 +200,23 @@ var _default = {
200
200
  viewState: viewState || 'view'
201
201
  });
202
202
 
203
- _context4.next = 5;
203
+ if (!id) {
204
+ _context4.next = 8;
205
+ break;
206
+ }
207
+
208
+ _context4.next = 6;
204
209
  return dispatch.topoMod.openTopoPage(playload);
205
210
 
206
- case 5:
211
+ case 6:
212
+ _context4.next = 10;
213
+ break;
214
+
215
+ case 8:
216
+ _context4.next = 10;
217
+ return dispatch.topoMod.clearData();
218
+
219
+ case 10:
207
220
  case "end":
208
221
  return _context4.stop();
209
222
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riil-frontend/component-topology",
3
- "version": "2.4.3",
3
+ "version": "2.4.4",
4
4
  "description": "拓扑",
5
5
  "files": [
6
6
  "demo/",
@@ -100,6 +100,6 @@
100
100
  "access": "public"
101
101
  },
102
102
  "license": "MIT",
103
- "homepage": "https://unpkg.com/@riil-frontend/component-topology@2.4.3/build/index.html",
103
+ "homepage": "https://unpkg.com/@riil-frontend/component-topology@2.4.4/build/index.html",
104
104
  "gitHead": "8d9f286eb5da11dfadbef62890d74d2c2dd4d3a9"
105
105
  }