@riil-frontend/component-topology 4.0.21 → 4.0.22

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.
@@ -21,7 +21,7 @@ import PluginManager from "./PluginManager";
21
21
  import topoFactory from "./topoFactory";
22
22
  import ElementTagTipConfig from "./tagstips/ElementTagTipConfig"; // eslint-disable-next-line no-undef
23
23
 
24
- var version = typeof "4.0.21" === 'string' ? "4.0.21" : null;
24
+ var version = typeof "4.0.22" === 'string' ? "4.0.22" : null;
25
25
  console.info("\u62D3\u6251\u7248\u672C: " + version);
26
26
  /**
27
27
  * 拓扑显示和编辑
@@ -169,11 +169,14 @@ export var plurals = {
169
169
  4: ["phy", "agg"]
170
170
  };
171
171
  export var showLinkByConfig = function showLinkByConfig(props) {
172
- console.log("showLinkByConfig-----------------------------", props);
172
+ var _plurals$showType;
173
+
173
174
  var topo = props.topo,
174
- showType = props.showType; //const displayConfig = topo.store.getModelState("displayConfig");
175
+ _props$showType = props.showType,
176
+ showType = _props$showType === void 0 ? 1 : _props$showType;
177
+ console.log("showLinkByConfig-----------------------------", props, showType); //const displayConfig = topo.store.getModelState("displayConfig");
175
178
 
176
- var types = plurals[showType]; // 查询所有连线
179
+ var types = (_plurals$showType = plurals[showType]) !== null && _plurals$showType !== void 0 ? _plurals$showType : []; // 查询所有连线
177
180
 
178
181
  var gv = topo.getGraphView();
179
182
  var dm = gv.getDataModel();
@@ -184,7 +187,7 @@ export var showLinkByConfig = function showLinkByConfig(props) {
184
187
 
185
188
  if (Array.isArray(edges) && edges.length > 0) {
186
189
  edges.map(function (edge) {
187
- if (showType === 1) {
190
+ if (showType === 1 || showType === true) {
188
191
  // 单链路全部显示
189
192
  edge.s("2d.visible", true);
190
193
  } else {
@@ -50,7 +50,7 @@ var _topoFactory = _interopRequireDefault(require("./topoFactory"));
50
50
  var _ElementTagTipConfig = _interopRequireDefault(require("./tagstips/ElementTagTipConfig"));
51
51
 
52
52
  // eslint-disable-next-line no-undef
53
- var version = typeof "4.0.21" === 'string' ? "4.0.21" : null;
53
+ var version = typeof "4.0.22" === 'string' ? "4.0.22" : null;
54
54
  console.info("\u62D3\u6251\u7248\u672C: " + version);
55
55
  /**
56
56
  * 拓扑显示和编辑
@@ -195,11 +195,14 @@ var plurals = {
195
195
  exports.plurals = plurals;
196
196
 
197
197
  var showLinkByConfig = function showLinkByConfig(props) {
198
- console.log("showLinkByConfig-----------------------------", props);
198
+ var _plurals$showType;
199
+
199
200
  var topo = props.topo,
200
- showType = props.showType; //const displayConfig = topo.store.getModelState("displayConfig");
201
+ _props$showType = props.showType,
202
+ showType = _props$showType === void 0 ? 1 : _props$showType;
203
+ console.log("showLinkByConfig-----------------------------", props, showType); //const displayConfig = topo.store.getModelState("displayConfig");
201
204
 
202
- var types = plurals[showType]; // 查询所有连线
205
+ var types = (_plurals$showType = plurals[showType]) !== null && _plurals$showType !== void 0 ? _plurals$showType : []; // 查询所有连线
203
206
 
204
207
  var gv = topo.getGraphView();
205
208
  var dm = gv.getDataModel();
@@ -210,7 +213,7 @@ var showLinkByConfig = function showLinkByConfig(props) {
210
213
 
211
214
  if (Array.isArray(edges) && edges.length > 0) {
212
215
  edges.map(function (edge) {
213
- if (showType === 1) {
216
+ if (showType === 1 || showType === true) {
214
217
  // 单链路全部显示
215
218
  edge.s("2d.visible", true);
216
219
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riil-frontend/component-topology",
3
- "version": "4.0.21",
3
+ "version": "4.0.22",
4
4
  "description": "拓扑",
5
5
  "scripts": {
6
6
  "start": "build-scripts start",
@@ -114,6 +114,6 @@
114
114
  "access": "public"
115
115
  },
116
116
  "license": "MIT",
117
- "homepage": "https://unpkg.com/@riil-frontend/component-topology@4.0.21/build/index.html",
117
+ "homepage": "https://unpkg.com/@riil-frontend/component-topology@4.0.22/build/index.html",
118
118
  "gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
119
119
  }