@riil-frontend/component-topology 6.0.0-alpha.1 → 6.0.0-alpha.3
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/build/1.js +2 -2
- package/build/2.js +1 -1
- package/build/index.css +1 -1
- package/build/index.js +21 -21
- package/es/components/VerticalIconTab/VerticalIconTab.js +4 -3
- package/es/components/VerticalIconTab/VerticalIconTab.module.scss +26 -4
- package/es/components/collapse/Collapse.js +7 -0
- package/es/components/collapse/Collapse.module.scss +44 -0
- package/es/components/collapse/CollapseFullheight.module.scss +20 -0
- package/es/components/collapse/Panel.js +3 -0
- package/es/core/common/icons/icon.js +18 -5
- package/es/core/editor/components/Sidebar/Sidebar.js +19 -18
- package/es/core/editor/components/Sidebar/Sidebar.module.scss +18 -2
- package/es/core/editor/components/Sidebar/views/BackgroundPanel/BackgroundPanel.js +9 -0
- package/es/core/editor/components/Sidebar/views/BackgroundPanel/index.js +2 -0
- package/es/core/editor/components/Sidebar/views/CanvasPanel/ImagePanel.js +4 -0
- package/es/core/editor/components/Sidebar/views/CanvasPanel/index.js +2 -0
- package/es/core/editor/components/Sidebar/views/ComponentPanel.js +41 -0
- package/es/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +20 -0
- package/es/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +20 -0
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +45 -0
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +44 -0
- package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +44 -0
- package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +29 -0
- package/es/core/editor/components/Sidebar/views/ImagePanel/index.js +2 -0
- package/es/core/editor/components/Sidebar/views/LinkPanel.js +43 -0
- package/es/core/editor/components/Toolbar/widgets/AddResourceButton.js +54 -6
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +48 -0
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceButton.js +12 -18
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceDrawer.js +13 -46
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/RelateData.js +2 -1
- package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +9 -15
- package/es/core/editor/hooks/useLayerAddResource.js +28 -0
- package/es/core/models/TopoApp.js +1 -1
- package/lib/components/VerticalIconTab/VerticalIconTab.js +4 -3
- package/lib/components/VerticalIconTab/VerticalIconTab.module.scss +26 -4
- package/lib/components/collapse/Collapse.js +15 -0
- package/lib/components/collapse/Collapse.module.scss +44 -0
- package/lib/components/collapse/CollapseFullheight.module.scss +20 -0
- package/lib/components/collapse/Panel.js +3 -0
- package/lib/core/common/icons/icon.js +20 -5
- package/lib/core/editor/components/Sidebar/Sidebar.js +25 -19
- package/lib/core/editor/components/Sidebar/Sidebar.module.scss +18 -2
- package/lib/core/editor/components/Sidebar/views/BackgroundPanel/BackgroundPanel.js +18 -0
- package/lib/core/editor/components/Sidebar/views/BackgroundPanel/index.js +11 -0
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/ImagePanel.js +12 -0
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/index.js +11 -0
- package/lib/core/editor/components/Sidebar/views/ComponentPanel.js +53 -0
- package/lib/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +34 -0
- package/lib/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +34 -0
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +58 -0
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +56 -0
- package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +56 -0
- package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePanel.js +45 -0
- package/lib/core/editor/components/Sidebar/views/ImagePanel/index.js +11 -0
- package/lib/core/editor/components/Sidebar/views/{LinkView.js → LinkPanel.js} +28 -17
- package/lib/core/editor/components/Toolbar/widgets/AddResourceButton.js +61 -6
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +63 -0
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceButton.js +13 -22
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceDrawer.js +12 -50
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/RelateData.js +2 -1
- package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +5 -11
- package/lib/core/editor/hooks/useLayerAddResource.js +34 -0
- package/lib/core/models/TopoApp.js +1 -1
- package/package.json +2 -2
- package/es/core/editor/components/Sidebar/views/LinkView.js +0 -35
- package/es/core/editor/components/Toolbar/widgets/AddResourceWidget.js +0 -17
- package/lib/core/editor/components/Toolbar/widgets/AddResourceWidget.js +0 -27
@@ -1,23 +1,71 @@
|
|
1
|
-
import React from 'react';
|
1
|
+
import React, { useEffect, useState } from 'react';
|
2
|
+
import { isGroup, isLayer } from "../../../../../utils/htElementDataUtil";
|
3
|
+
import useLayerAddResource from "../../../hooks/useLayerAddResource";
|
4
|
+
import LayerAddResourceDrawer from "../../settings/propertyViews/layer/DataTab/LayerAddResourceDrawer";
|
2
5
|
import ButtonBox from "./components/ButtonBox";
|
3
6
|
import WidgetBox from "./WidgetBox";
|
4
7
|
|
8
|
+
function getAddType(selection) {
|
9
|
+
if (selection.length === 1) {
|
10
|
+
var data = selection[0];
|
11
|
+
|
12
|
+
if (isLayer(data)) {
|
13
|
+
return 'layer';
|
14
|
+
} else if (isGroup(data)) {
|
15
|
+
return 'group';
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
5
20
|
function AddResourceButton(props) {
|
6
21
|
var showLabel = props.showLabel,
|
7
22
|
topo = props.topo,
|
8
|
-
topoEdit = props.topoEdit
|
23
|
+
topoEdit = props.topoEdit,
|
24
|
+
editorProps = props.editorProps; // 选中的元素
|
25
|
+
|
26
|
+
var selection = topo.selectionManager.useSelection();
|
27
|
+
|
28
|
+
var _useState = useState(getAddType(selection)),
|
29
|
+
addType = _useState[0],
|
30
|
+
setAddType = _useState[1]; // 选中分层添加
|
31
|
+
|
32
|
+
|
33
|
+
var layerAddResource = useLayerAddResource({
|
34
|
+
topo: topo,
|
35
|
+
topoEdit: topoEdit
|
36
|
+
});
|
37
|
+
useEffect(function () {
|
38
|
+
setAddType(getAddType(selection));
|
39
|
+
}, [selection]);
|
40
|
+
|
41
|
+
var handleClick = function handleClick() {
|
42
|
+
if (!addType) {
|
43
|
+
// 未选中分层、分区添加资源
|
44
|
+
topoEdit.showGlobalAddResourceDrawer();
|
45
|
+
} else if (addType === 'layer') {
|
46
|
+
// 选中分层添加资源
|
47
|
+
layerAddResource.open();
|
48
|
+
} else if (addType === 'group') {
|
49
|
+
// 选中区域添加资源
|
50
|
+
var group = selection[0];
|
51
|
+
topoEdit.groupAddResource.open(group);
|
52
|
+
}
|
53
|
+
};
|
54
|
+
|
9
55
|
return /*#__PURE__*/React.createElement(WidgetBox, {
|
10
56
|
label: "\u6DFB\u52A0\u8D44\u6E90",
|
11
57
|
tooltip: "\u6DFB\u52A0\u8D44\u6E90",
|
12
58
|
showLabel: showLabel
|
13
59
|
}, /*#__PURE__*/React.createElement(ButtonBox, {
|
14
|
-
onClick:
|
15
|
-
topoEdit.showGlobalAddResourceDrawer();
|
16
|
-
}
|
60
|
+
onClick: handleClick
|
17
61
|
}, /*#__PURE__*/React.createElement("img", {
|
18
62
|
src: "/img/topo/editor/toolbar/add/Normal.svg",
|
19
63
|
alt: ""
|
20
|
-
}))
|
64
|
+
})), addType === 'layer' && /*#__PURE__*/React.createElement(LayerAddResourceDrawer, {
|
65
|
+
layer: selection[0],
|
66
|
+
editorProps: editorProps,
|
67
|
+
layerAddResource: layerAddResource
|
68
|
+
}));
|
21
69
|
}
|
22
70
|
|
23
71
|
export default AddResourceButton;
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
3
|
+
import React, { useState, useEffect } from 'react';
|
4
|
+
import ResourceSelectDrawer from "../../../../../../../components/NetworkTopoResourceSelectDrawer";
|
5
|
+
|
6
|
+
var LayerAddResourceDrawer = function LayerAddResourceDrawer(props) {
|
7
|
+
var visible = props.visible,
|
8
|
+
layer = props.layer,
|
9
|
+
topo = props.topo,
|
10
|
+
topoEdit = props.topoEdit,
|
11
|
+
onClose = props.onClose;
|
12
|
+
|
13
|
+
var onOk = /*#__PURE__*/function () {
|
14
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(selected) {
|
15
|
+
var layerData;
|
16
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
17
|
+
while (1) {
|
18
|
+
switch (_context.prev = _context.next) {
|
19
|
+
case 0:
|
20
|
+
layerData = {
|
21
|
+
id: layer.tag,
|
22
|
+
tag: layer.attrObject.tag
|
23
|
+
};
|
24
|
+
_context.next = 3;
|
25
|
+
return topoEdit.addLayerResources(layerData, selected);
|
26
|
+
|
27
|
+
case 3:
|
28
|
+
case "end":
|
29
|
+
return _context.stop();
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}, _callee);
|
33
|
+
}));
|
34
|
+
|
35
|
+
return function onOk(_x) {
|
36
|
+
return _ref.apply(this, arguments);
|
37
|
+
};
|
38
|
+
}();
|
39
|
+
|
40
|
+
return /*#__PURE__*/React.createElement(ResourceSelectDrawer, {
|
41
|
+
visible: visible,
|
42
|
+
getExcludeIds: topoEdit.getAllNodeResourceIds,
|
43
|
+
onOk: onOk,
|
44
|
+
onClose: onClose
|
45
|
+
});
|
46
|
+
};
|
47
|
+
|
48
|
+
export default LayerAddResourceDrawer;
|
package/es/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceButton.js
CHANGED
@@ -1,35 +1,29 @@
|
|
1
|
-
import React
|
1
|
+
import React from 'react';
|
2
|
+
import useLayerAddResource from "../../../../../hooks/useLayerAddResource";
|
2
3
|
import AddResourceButton from "../../../common/AddResourceButton";
|
3
4
|
import LayerAddResourceDrawer from "./LayerAddResourceDrawer";
|
4
5
|
export default function LayerAddResourceButton(props) {
|
5
6
|
var topo = props.topo,
|
6
|
-
|
7
|
+
editorProps = props.editorProps,
|
7
8
|
layerData = props.layerData,
|
8
|
-
CustomAddResourceDrawer = props.addResourceDrawer,
|
9
9
|
onAdd = props.onAdd,
|
10
10
|
topoEdit = props.topoEdit;
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
var AddResourceDrawer = CustomAddResourceDrawer || LayerAddResourceDrawer;
|
11
|
+
var layerAddResource = useLayerAddResource({
|
12
|
+
topo: topo,
|
13
|
+
topoEdit: topoEdit,
|
14
|
+
layerData: layerData
|
15
|
+
});
|
17
16
|
|
18
17
|
var handleClick = function handleClick() {
|
19
|
-
|
18
|
+
layerAddResource.open();
|
20
19
|
};
|
21
20
|
|
22
21
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AddResourceButton, {
|
23
22
|
onClick: handleClick
|
24
|
-
}), /*#__PURE__*/React.createElement(
|
25
|
-
visible: drawerVisible,
|
23
|
+
}), /*#__PURE__*/React.createElement(LayerAddResourceDrawer, {
|
26
24
|
layer: layerData,
|
27
|
-
|
28
|
-
|
29
|
-
onClose: function onClose() {
|
30
|
-
setDrawerVisible(false);
|
31
|
-
},
|
32
|
-
setVisible: setDrawerVisible
|
25
|
+
editorProps: editorProps,
|
26
|
+
layerAddResource: layerAddResource
|
33
27
|
}));
|
34
28
|
}
|
35
29
|
;
|
package/es/core/editor/components/settings/propertyViews/layer/DataTab/LayerAddResourceDrawer.js
CHANGED
@@ -1,48 +1,15 @@
|
|
1
|
-
import
|
2
|
-
import
|
3
|
-
import
|
4
|
-
|
5
|
-
|
6
|
-
var
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(selected) {
|
15
|
-
var layerData;
|
16
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
17
|
-
while (1) {
|
18
|
-
switch (_context.prev = _context.next) {
|
19
|
-
case 0:
|
20
|
-
layerData = {
|
21
|
-
id: layer.tag,
|
22
|
-
tag: layer.attrObject.tag
|
23
|
-
};
|
24
|
-
_context.next = 3;
|
25
|
-
return topoEdit.addLayerResources(layerData, selected);
|
26
|
-
|
27
|
-
case 3:
|
28
|
-
case "end":
|
29
|
-
return _context.stop();
|
30
|
-
}
|
31
|
-
}
|
32
|
-
}, _callee);
|
33
|
-
}));
|
34
|
-
|
35
|
-
return function onOk(_x) {
|
36
|
-
return _ref.apply(this, arguments);
|
37
|
-
};
|
38
|
-
}();
|
39
|
-
|
40
|
-
return /*#__PURE__*/React.createElement(ResourceSelectDrawer, {
|
41
|
-
visible: visible,
|
42
|
-
getExcludeIds: topoEdit.getAllNodeResourceIds,
|
43
|
-
onOk: onOk,
|
44
|
-
onClose: onClose
|
45
|
-
});
|
46
|
-
};
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
2
|
+
import React from 'react';
|
3
|
+
import DefaultLayerAddResourceDrawer from "./DefaultLayerAddResourceDrawer";
|
4
|
+
|
5
|
+
function LayerAddResourceDrawer(props) {
|
6
|
+
var layer = props.layer,
|
7
|
+
editorProps = props.editorProps,
|
8
|
+
layerAddResource = props.layerAddResource;
|
9
|
+
var AddResourceDrawer = (editorProps === null || editorProps === void 0 ? void 0 : editorProps.layerResourceSelectComponent) || DefaultLayerAddResourceDrawer;
|
10
|
+
return /*#__PURE__*/React.createElement(AddResourceDrawer, _extends({
|
11
|
+
layer: layer
|
12
|
+
}, layerAddResource.drawerProps));
|
13
|
+
}
|
47
14
|
|
48
15
|
export default LayerAddResourceDrawer;
|
@@ -18,9 +18,10 @@ export default function LayerRelateData(props) {
|
|
18
18
|
title: "\u5173\u8054\u8D44\u6E90",
|
19
19
|
extra: /*#__PURE__*/React.createElement(LayerAddResourceButton, {
|
20
20
|
topo: topo,
|
21
|
+
topoEdit: topoEditApi,
|
22
|
+
editorProps: editorProps,
|
21
23
|
layer: layer,
|
22
24
|
layerData: values,
|
23
|
-
topoEdit: topoEditApi,
|
24
25
|
onAdd: function onAdd() {
|
25
26
|
/* TODO 刷新列表 refreshList */
|
26
27
|
},
|
@@ -3,19 +3,19 @@ import _Dialog from "@alifd/next/es/dialog";
|
|
3
3
|
import _Button from "@alifd/next/es/button";
|
4
4
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
5
5
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
6
|
-
import React from
|
7
|
-
import classnames from
|
6
|
+
import React from 'react';
|
7
|
+
import classnames from 'classnames';
|
8
8
|
import TitleWidget from "../../../components/titlebar/widgets/TitleWidget";
|
9
9
|
import styles from "../../../components/titlebar/TitleBar.module.scss";
|
10
|
-
import { useState } from
|
11
|
-
import { useEffect } from
|
10
|
+
import { useState } from 'react';
|
11
|
+
import { useEffect } from 'react';
|
12
12
|
import DebugTools from "./widgets/DebugTools";
|
13
13
|
export default function TopoEditorTitleBar(props) {
|
14
14
|
var topo = props.topo,
|
15
15
|
topoEditApi = props.topoEditApi;
|
16
16
|
var store = topo.store;
|
17
17
|
|
18
|
-
var _store$useModel = store.useModel(
|
18
|
+
var _store$useModel = store.useModel('topoEdit'),
|
19
19
|
topoEditState = _store$useModel[0],
|
20
20
|
topoEditDispatchers = _store$useModel[1];
|
21
21
|
|
@@ -69,12 +69,6 @@ export default function TopoEditorTitleBar(props) {
|
|
69
69
|
}, /*#__PURE__*/React.createElement(DebugTools, {
|
70
70
|
topo: topo
|
71
71
|
}), /*#__PURE__*/React.createElement(_Button, {
|
72
|
-
type: "primary",
|
73
|
-
className: styles.button,
|
74
|
-
onClick: function onClick() {
|
75
|
-
topoEditApi.showGlobalAddResourceDrawer();
|
76
|
-
}
|
77
|
-
}, "\u6DFB\u52A0\u8D44\u6E90"), /*#__PURE__*/React.createElement(_Button, {
|
78
72
|
className: styles.button,
|
79
73
|
onClick: function onClick() {
|
80
74
|
setExitFlag(false);
|
@@ -84,8 +78,8 @@ export default function TopoEditorTitleBar(props) {
|
|
84
78
|
className: styles.button,
|
85
79
|
onClick: function onClick() {
|
86
80
|
_Dialog.confirm({
|
87
|
-
title:
|
88
|
-
content:
|
81
|
+
title: '提示',
|
82
|
+
content: '若直接退出,图上修改的内容将不会保存!',
|
89
83
|
onOk: function () {
|
90
84
|
var _onOk = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
91
85
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
@@ -131,10 +125,10 @@ export default function TopoEditorTitleBar(props) {
|
|
131
125
|
return onCancel;
|
132
126
|
}(),
|
133
127
|
cancelProps: {
|
134
|
-
children:
|
128
|
+
children: '退出'
|
135
129
|
},
|
136
130
|
okProps: {
|
137
|
-
children:
|
131
|
+
children: '保存并退出'
|
138
132
|
}
|
139
133
|
});
|
140
134
|
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { useState } from 'react';
|
2
|
+
export default function useLayerAddResource(props) {
|
3
|
+
var topo = props.topo,
|
4
|
+
layer = props.layer,
|
5
|
+
topoEdit = props.topoEdit;
|
6
|
+
|
7
|
+
var _useState = useState(false),
|
8
|
+
drawerVisible = _useState[0],
|
9
|
+
setDrawerVisible = _useState[1];
|
10
|
+
|
11
|
+
return {
|
12
|
+
open: function open() {
|
13
|
+
return setDrawerVisible(true);
|
14
|
+
},
|
15
|
+
close: function close() {
|
16
|
+
return setDrawerVisible(false);
|
17
|
+
},
|
18
|
+
drawerProps: {
|
19
|
+
visible: drawerVisible,
|
20
|
+
setVisible: setDrawerVisible,
|
21
|
+
onClose: function onClose() {
|
22
|
+
setDrawerVisible(false);
|
23
|
+
},
|
24
|
+
topo: topo,
|
25
|
+
topoEdit: topoEdit
|
26
|
+
}
|
27
|
+
};
|
28
|
+
}
|
@@ -22,7 +22,7 @@ import topoFactory from "./topoFactory";
|
|
22
22
|
import ElementTagTipConfig from "./tagstips/ElementTagTipConfig";
|
23
23
|
import SelectionManager from "./SelectionManager"; // eslint-disable-next-line no-undef
|
24
24
|
|
25
|
-
var version = typeof "6.0.0-alpha.
|
25
|
+
var version = typeof "6.0.0-alpha.3" === 'string' ? "6.0.0-alpha.3" : null;
|
26
26
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
27
27
|
/**
|
28
28
|
* 拓扑显示和编辑
|
@@ -25,11 +25,12 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
25
25
|
* @returns
|
26
26
|
*/
|
27
27
|
function CustomTabItem(_ref) {
|
28
|
-
var title = _ref.title
|
28
|
+
var title = _ref.title,
|
29
|
+
icon = _ref.icon;
|
29
30
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
30
31
|
className: "v-icon-tab-item"
|
31
32
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
32
|
-
src:
|
33
|
+
src: icon,
|
33
34
|
alt: ""
|
34
35
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
35
36
|
className: "tab-title"
|
@@ -61,7 +62,7 @@ function VerticalIconTab(props) {
|
|
61
62
|
}, props));
|
62
63
|
}
|
63
64
|
}, props, {
|
64
|
-
className: _VerticalIconTabModule["default"].
|
65
|
+
className: _VerticalIconTabModule["default"].tabs,
|
65
66
|
navClassName: _VerticalIconTabModule["default"].nav,
|
66
67
|
contentClassName: (0, _classnames["default"])(_VerticalIconTabModule["default"].content, (_classNames = {}, _classNames[_VerticalIconTabModule["default"].hide] = !activeKey, _classNames)),
|
67
68
|
onClick: handleClick
|
@@ -1,25 +1,42 @@
|
|
1
1
|
@import '~@alifd/next/variables.scss';
|
2
2
|
|
3
3
|
|
4
|
-
.
|
4
|
+
.tabs {
|
5
5
|
height: 100%;
|
6
|
+
|
6
7
|
}
|
7
8
|
|
8
9
|
// 导航
|
9
10
|
.nav {
|
10
11
|
width: 60px;
|
11
12
|
height: 100%;
|
12
|
-
|
13
|
+
padding-top: 4px;
|
14
|
+
border-right: 1px solid var(--tab-wrapped-border-line-color);
|
15
|
+
background: none !important;
|
13
16
|
|
14
17
|
:global {
|
15
18
|
|
19
|
+
.#{$css-prefix}tabs-tab {
|
20
|
+
background-color: transparent !important;
|
21
|
+
|
22
|
+
&.active .v-icon-tab-item {
|
23
|
+
background-color: rgba(76, 137, 255, 0.1);
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
16
27
|
// 图标区
|
17
28
|
.v-icon-tab-item {
|
29
|
+
height: 76px;
|
18
30
|
display: flex;
|
19
31
|
flex-direction: column;
|
20
32
|
align-items: center;
|
21
33
|
justify-content: center;
|
22
|
-
|
34
|
+
margin: 0 4px;
|
35
|
+
border-radius: 4px;
|
36
|
+
|
37
|
+
&:hover {
|
38
|
+
background-color: rgba(76, 137, 255, 0.1);
|
39
|
+
}
|
23
40
|
}
|
24
41
|
}
|
25
42
|
}
|
@@ -28,15 +45,20 @@
|
|
28
45
|
.content {
|
29
46
|
width: 260px;
|
30
47
|
height: 100%;
|
48
|
+
transition: all .1s linear;
|
49
|
+
border-left: none !important;
|
50
|
+
border-right: 1px solid var(--tab-wrapped-border-line-color);
|
31
51
|
|
32
52
|
:global {
|
33
53
|
.#{$css-prefix}tabs-tabpane {
|
34
54
|
width: 100%;
|
35
55
|
height: 100%;
|
56
|
+
overflow: auto;
|
36
57
|
}
|
37
58
|
}
|
38
59
|
|
39
60
|
&.hide {
|
40
|
-
|
61
|
+
width: 0;
|
62
|
+
border-right: none;
|
41
63
|
}
|
42
64
|
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
exports.__esModule = true;
|
6
|
+
exports["default"] = void 0;
|
7
|
+
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
9
|
+
|
10
|
+
function Collapse(props) {
|
11
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, "Collapse");
|
12
|
+
}
|
13
|
+
|
14
|
+
var _default = Collapse;
|
15
|
+
exports["default"] = _default;
|
@@ -0,0 +1,44 @@
|
|
1
|
+
@import "@alifd/next/variables";
|
2
|
+
|
3
|
+
.collapse {
|
4
|
+
:global {
|
5
|
+
|
6
|
+
// 折叠模板标题
|
7
|
+
.#{$css-prefix}collapse-panel:not(:first-child) {
|
8
|
+
border-top: none;
|
9
|
+
}
|
10
|
+
|
11
|
+
.#{$css-prefix}collapse-panel-title:hover {
|
12
|
+
background: none;
|
13
|
+
}
|
14
|
+
|
15
|
+
.#{$css-prefix}collapse-panel-title {
|
16
|
+
background: none;
|
17
|
+
font-size: 12px;
|
18
|
+
padding-left: 32px;
|
19
|
+
|
20
|
+
&>.#{$css-prefix}collapse-panel-icon {
|
21
|
+
left: 12px;
|
22
|
+
margin-top: 0;
|
23
|
+
margin-left: 0;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
.#{$css-prefix}collapse-panel-content,
|
28
|
+
.#{$css-prefix}collapse-panel-expanded>.#{$css-prefix}collapse-panel-content {
|
29
|
+
// padding-left: 32px;
|
30
|
+
padding-top: 8px;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
&.contentNoPadding {
|
35
|
+
|
36
|
+
:global {
|
37
|
+
|
38
|
+
.#{$css-prefix}collapse-panel-content,
|
39
|
+
.#{$css-prefix}collapse-panel-expanded>.#{$css-prefix}collapse-panel-content {
|
40
|
+
padding: 8px 0;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
@import "@alifd/next/variables";
|
2
|
+
|
3
|
+
.fullheight {
|
4
|
+
height: 100%;
|
5
|
+
display: flex;
|
6
|
+
flex-direction: column;
|
7
|
+
|
8
|
+
.panelFullHeight {
|
9
|
+
height: 100%;
|
10
|
+
display: flex;
|
11
|
+
flex-direction: column;
|
12
|
+
|
13
|
+
:global {
|
14
|
+
.#{$css-prefix}collapse-panel-content {
|
15
|
+
flex: 1;
|
16
|
+
overflow: auto;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
@@ -11,6 +11,7 @@ exports.getGroupIconGroups = getGroupIconGroups;
|
|
11
11
|
exports.getNodeDefaultIcons = getNodeDefaultIcons;
|
12
12
|
exports.getNodeIconGroups = getNodeIconGroups;
|
13
13
|
exports.getUserCustomIcons = getUserCustomIcons;
|
14
|
+
exports.getUserCustomIconsForHt = getUserCustomIconsForHt;
|
14
15
|
exports.transformCustomIcon2HtIcon = transformCustomIcon2HtIcon;
|
15
16
|
exports.transformCustomIcons2HtIcons = transformCustomIcons2HtIcons;
|
16
17
|
|
@@ -30,6 +31,20 @@ function getNodeDefaultIcons(topo) {
|
|
30
31
|
function getGroupDefaultIcons(topo) {
|
31
32
|
return [].concat(_manager["default"].iconLibManager.getIcons());
|
32
33
|
}
|
34
|
+
|
35
|
+
function getUserCustomIconsForHt(topo) {
|
36
|
+
return getUserCustomIcons(topo).map(function (_ref) {
|
37
|
+
var id = _ref.id,
|
38
|
+
name = _ref.name,
|
39
|
+
url = _ref.url,
|
40
|
+
jsonUrl = _ref.jsonUrl;
|
41
|
+
return {
|
42
|
+
id: id,
|
43
|
+
name: name,
|
44
|
+
url: jsonUrl || url
|
45
|
+
};
|
46
|
+
});
|
47
|
+
}
|
33
48
|
/**
|
34
49
|
* 获取编辑模式左侧图片列表
|
35
50
|
* @param {*} topo
|
@@ -41,11 +56,11 @@ function getEditorIcons(topo) {
|
|
41
56
|
// 默认图标
|
42
57
|
system: getNodeDefaultIcons(topo),
|
43
58
|
// 自定义上传图标
|
44
|
-
custom: getUserCustomIcons(topo).map(function (
|
45
|
-
var id =
|
46
|
-
name =
|
47
|
-
url =
|
48
|
-
jsonUrl =
|
59
|
+
custom: getUserCustomIcons(topo).map(function (_ref2) {
|
60
|
+
var id = _ref2.id,
|
61
|
+
name = _ref2.name,
|
62
|
+
url = _ref2.url,
|
63
|
+
jsonUrl = _ref2.jsonUrl;
|
49
64
|
return {
|
50
65
|
id: id,
|
51
66
|
name: name,
|