@riil-frontend/component-topology 2.15.1 → 2.15.2
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,7 @@ import DataModel from "./DataModel";
|
|
|
18
18
|
import GraphDataModel from "./GraphDataModel";
|
|
19
19
|
import { updateEdgeExpanded } from "../utils/edgeUtil"; // eslint-disable-next-line no-undef
|
|
20
20
|
|
|
21
|
-
var version = typeof "2.15.
|
|
21
|
+
var version = typeof "2.15.2" === 'string' ? "2.15.2" : null;
|
|
22
22
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
|
23
23
|
var topoDebug = {};
|
|
24
24
|
window.topoDebug = topoDebug;
|
|
@@ -10,13 +10,12 @@ export default function EditButton(props) {
|
|
|
10
10
|
var topo = props.topo,
|
|
11
11
|
onEnterEdit = props.onEnterEdit,
|
|
12
12
|
style = props.style;
|
|
13
|
-
var store = topo.store;
|
|
13
|
+
var store = topo.store; // const [topoState] = store.useModel('topoMod');
|
|
14
|
+
// const { topoPermission, } = topoState;
|
|
14
15
|
|
|
15
|
-
var
|
|
16
|
-
topoState = _store$useModel[0];
|
|
16
|
+
var functionAuthState = store.useModelState('functionAuth'); // let show = topo.options.usePermission ? topoPermissonUtil.isEditable(topoPermission) : true;
|
|
17
17
|
|
|
18
|
-
var
|
|
19
|
-
var show = topo.options.usePermission ? topoPermissonUtil.isEditable(topoPermission) : true;
|
|
18
|
+
var show = topo.options.usePermission ? functionAuthState.permissions.createTopo : true;
|
|
20
19
|
|
|
21
20
|
if (!show) {
|
|
22
21
|
return null;
|
|
@@ -44,7 +44,7 @@ var _GraphDataModel = _interopRequireDefault(require("./GraphDataModel"));
|
|
|
44
44
|
var _edgeUtil = require("../utils/edgeUtil");
|
|
45
45
|
|
|
46
46
|
// eslint-disable-next-line no-undef
|
|
47
|
-
var version = typeof "2.15.
|
|
47
|
+
var version = typeof "2.15.2" === 'string' ? "2.15.2" : null;
|
|
48
48
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
|
49
49
|
var topoDebug = {};
|
|
50
50
|
window.topoDebug = topoDebug;
|
|
@@ -20,13 +20,12 @@ function EditButton(props) {
|
|
|
20
20
|
var topo = props.topo,
|
|
21
21
|
onEnterEdit = props.onEnterEdit,
|
|
22
22
|
style = props.style;
|
|
23
|
-
var store = topo.store;
|
|
23
|
+
var store = topo.store; // const [topoState] = store.useModel('topoMod');
|
|
24
|
+
// const { topoPermission, } = topoState;
|
|
24
25
|
|
|
25
|
-
var
|
|
26
|
-
topoState = _store$useModel[0];
|
|
26
|
+
var functionAuthState = store.useModelState('functionAuth'); // let show = topo.options.usePermission ? topoPermissonUtil.isEditable(topoPermission) : true;
|
|
27
27
|
|
|
28
|
-
var
|
|
29
|
-
var show = topo.options.usePermission ? _topoPermissionUtil["default"].isEditable(topoPermission) : true;
|
|
28
|
+
var show = topo.options.usePermission ? functionAuthState.permissions.createTopo : true;
|
|
30
29
|
|
|
31
30
|
if (!show) {
|
|
32
31
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riil-frontend/component-topology",
|
|
3
|
-
"version": "2.15.
|
|
3
|
+
"version": "2.15.2",
|
|
4
4
|
"description": "拓扑",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "build-scripts start",
|
|
@@ -111,6 +111,6 @@
|
|
|
111
111
|
"access": "public"
|
|
112
112
|
},
|
|
113
113
|
"license": "MIT",
|
|
114
|
-
"homepage": "https://unpkg.com/@riil-frontend/component-topology@2.15.
|
|
114
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@2.15.2/build/index.html",
|
|
115
115
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
|
116
116
|
}
|