@riil-frontend/component-topology 2.4.8 → 2.5.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 +19 -19
- package/demo/5/345/205/266/344/273/226/347/273/204/344/273/266//350/265/204/346/272/220/346/246/202/350/247/210/347/273/204/344/273/266.md +9 -0
- package/demo/API//345/270/203/345/261/200.md +16 -0
- package/es/components/Drawer/index.js +2 -2
- package/es/components/FormTable/index.js +16 -4
- package/es/components/ResourceSelect/ResourceSelectDrawer.module.scss +2 -0
- package/es/core/components/titlebar/TitleBar.module.scss +2 -1
- package/es/core/editor/components/settings/Settings.module.scss +10 -0
- package/es/core/editor/components/settings/common/tab/TabView.d.ts +1 -0
- package/es/core/editor/components/settings/common/tab/TabView.js +8 -0
- package/es/core/editor/components/settings/common/tab/TabView.module.scss +13 -0
- package/es/core/editor/components/settings/common/text/TextStyle.js +6 -1
- package/es/core/editor/components/settings/node/NodePropertyView.js +5 -1
- package/es/core/editor/components/settings/node/NodePropertyView.module.scss +3 -0
- package/es/core/editor/components/settings/text/TextPropertyView.js +5 -1
- package/es/core/editor/components/settings/view/ViewPropertyView.js +6 -2
- package/es/core/models/TopoApp.js +4 -0
- package/es/core/viewer/components/titlebar/TopoViewerTitleBar.js +2 -4
- package/es/core/viewer/components/titlebar/ViewerTools.js +1 -4
- package/es/models/topoMod.js +0 -1
- package/es/style.js +0 -1
- package/es/topoCenter/models/TopoCenter.js +0 -6
- package/es/topoCenter/store/topoCenter.d.ts +0 -1
- package/es/topoCenter/store/topoCenter.js +1 -4
- package/es/utils/htElementUtils.js +4 -2
- package/lib/components/Drawer/index.js +2 -2
- package/lib/components/FormTable/index.js +18 -4
- package/lib/components/ResourceSelect/ResourceSelectDrawer.module.scss +2 -0
- package/lib/core/components/titlebar/TitleBar.module.scss +2 -1
- package/lib/core/editor/components/settings/Settings.module.scss +10 -0
- package/lib/core/editor/components/settings/common/tab/TabView.d.ts +1 -0
- package/lib/core/editor/components/settings/common/tab/TabView.js +20 -0
- package/lib/core/editor/components/settings/common/tab/TabView.module.scss +13 -0
- package/lib/core/editor/components/settings/common/text/TextStyle.js +6 -1
- package/lib/core/editor/components/settings/node/NodePropertyView.js +7 -1
- package/lib/core/editor/components/settings/node/NodePropertyView.module.scss +3 -0
- package/lib/core/editor/components/settings/text/TextPropertyView.js +5 -1
- package/lib/core/editor/components/settings/view/ViewPropertyView.js +6 -2
- package/lib/core/models/TopoApp.js +4 -0
- package/lib/core/viewer/components/titlebar/TopoViewerTitleBar.js +4 -8
- package/lib/core/viewer/components/titlebar/ViewerTools.js +1 -5
- package/lib/models/topoMod.js +0 -1
- package/lib/style.js +0 -1
- package/lib/topoCenter/models/TopoCenter.js +0 -6
- package/lib/topoCenter/store/topoCenter.d.ts +0 -1
- package/lib/topoCenter/store/topoCenter.js +1 -4
- package/lib/utils/htElementUtils.js +4 -2
- package/package.json +2 -2
- package/demo/5/345/205/266/344/273/226/347/273/204/344/273/266//351/200/211/346/213/251/350/265/204/346/272/220/346/214/211/351/222/256.md +0 -12
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 布局
|
|
3
|
+
order: 5
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
```text
|
|
7
|
+
//layoutName:
|
|
8
|
+
//星型布局:'circular',均衡布局:'hierarchical',
|
|
9
|
+
//树型布局:纵向:’towardsouth‘,横向’towardeast‘
|
|
10
|
+
|
|
11
|
+
let layout = new ht.layout.AutoLayout(graphView);
|
|
12
|
+
layout.layout(layoutName, function(){
|
|
13
|
+
//此处可以添加一些布局后的操作,如不需要,请忽略
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
```
|
|
@@ -2,7 +2,7 @@ import _Table from "@alifd/next/lib/table";
|
|
|
2
2
|
import _Button from "@alifd/next/lib/button";
|
|
3
3
|
import _extends from "@babel/runtime/helpers/extends";
|
|
4
4
|
import _Search from "@alifd/next/lib/search";
|
|
5
|
-
import React from 'react';
|
|
5
|
+
import React, { useState } from 'react';
|
|
6
6
|
import { SchemaForm, SchemaMarkupField as Field } from '@formily/next';
|
|
7
7
|
import Pagination from '@riil-frontend/component-pager';
|
|
8
8
|
import MoreButtonsMenu from '@riil-frontend/component-more-buttons-menu';
|
|
@@ -11,6 +11,8 @@ import TableLayout from '@riil-frontend/component-table-layout';
|
|
|
11
11
|
import NoDataPage from '@riil-frontend/component-topology-utils/es/components/NoDataPage';
|
|
12
12
|
|
|
13
13
|
var FormTable = function FormTable(props) {
|
|
14
|
+
var _tableProps$filterPar;
|
|
15
|
+
|
|
14
16
|
var className = props.className,
|
|
15
17
|
children = props.children,
|
|
16
18
|
formProps = props.formProps,
|
|
@@ -23,6 +25,12 @@ var FormTable = function FormTable(props) {
|
|
|
23
25
|
showChecked = _props$showChecked === void 0 ? false : _props$showChecked,
|
|
24
26
|
_props$showPageSizeSe = props.showPageSizeSelector,
|
|
25
27
|
showPageSizeSelector = _props$showPageSizeSe === void 0 ? false : _props$showPageSizeSe;
|
|
28
|
+
|
|
29
|
+
var _useState = useState(false),
|
|
30
|
+
isSearching = _useState[0],
|
|
31
|
+
setIsSearching = _useState[1];
|
|
32
|
+
|
|
33
|
+
var isFilter = isSearching || ((_tableProps$filterPar = tableProps.filterParams.typeCode) === null || _tableProps$filterPar === void 0 ? void 0 : _tableProps$filterPar.selectedKeys.length);
|
|
26
34
|
return /*#__PURE__*/React.createElement("div", {
|
|
27
35
|
className: "riil-table-common " + className,
|
|
28
36
|
style: {
|
|
@@ -43,8 +51,12 @@ var FormTable = function FormTable(props) {
|
|
|
43
51
|
"x-component-props": {
|
|
44
52
|
shape: 'simple',
|
|
45
53
|
placeholder: '请输入关键字',
|
|
46
|
-
onSearch: function onSearch() {
|
|
47
|
-
|
|
54
|
+
onSearch: function onSearch(val) {
|
|
55
|
+
setIsSearching(!!val);
|
|
56
|
+
formProps.actions.submit();
|
|
57
|
+
},
|
|
58
|
+
style: {
|
|
59
|
+
width: 200
|
|
48
60
|
}
|
|
49
61
|
}
|
|
50
62
|
}))), menu && /*#__PURE__*/React.createElement("div", {
|
|
@@ -75,7 +87,7 @@ var FormTable = function FormTable(props) {
|
|
|
75
87
|
table: /*#__PURE__*/React.createElement(_Table, _extends({}, tableProps, {
|
|
76
88
|
fixedHeader: true,
|
|
77
89
|
hasBorder: false,
|
|
78
|
-
emptyContent:
|
|
90
|
+
emptyContent: !isFilter ? '暂无数据' : '暂无搜索结果'
|
|
79
91
|
}), columns.map(function (column) {
|
|
80
92
|
return /*#__PURE__*/React.createElement(_Table.Column, _extends({}, column, {
|
|
81
93
|
key: column.dataIndex
|
|
@@ -20,11 +20,13 @@
|
|
|
20
20
|
width: 7px;
|
|
21
21
|
height: 7px;
|
|
22
22
|
}
|
|
23
|
+
|
|
23
24
|
::-webkit-scrollbar-thumb {
|
|
24
25
|
background-color: rgba(0, 0, 0, 0.2);
|
|
25
26
|
border-radius: 7px;
|
|
26
27
|
transition: all 0.25s ease-in-out;
|
|
27
28
|
}
|
|
29
|
+
|
|
28
30
|
::-webkit-scrollbar-thumb:hover {
|
|
29
31
|
background-color: rgba(0, 0, 0, 0.3);
|
|
30
32
|
}
|
|
@@ -33,12 +35,20 @@
|
|
|
33
35
|
.next-collapse-panel:not(:first-child) {
|
|
34
36
|
border-top: none;
|
|
35
37
|
}
|
|
38
|
+
|
|
36
39
|
.next-collapse-panel-title {
|
|
37
40
|
background: none;
|
|
38
41
|
font-size: 12px;
|
|
39
42
|
padding-bottom: 0;
|
|
40
43
|
padding-left: 32px;
|
|
44
|
+
|
|
45
|
+
& > .next-collapse-panel-icon {
|
|
46
|
+
left: 12px;
|
|
47
|
+
margin-top: 0;
|
|
48
|
+
margin-left: 0;
|
|
49
|
+
}
|
|
41
50
|
}
|
|
51
|
+
|
|
42
52
|
.next-collapse-panel-content {
|
|
43
53
|
padding-left: 32px;
|
|
44
54
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function TabView(props: any): JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import _Tab from "@alifd/next/lib/tab";
|
|
2
|
+
import React, { useState, useEffect } from 'react';
|
|
3
|
+
import styles from "./TabView.module.scss";
|
|
4
|
+
export default function TabView(props) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(_Tab, {
|
|
6
|
+
className: styles.tabs
|
|
7
|
+
}, props.children);
|
|
8
|
+
}
|
|
@@ -9,7 +9,7 @@ var Option = _Select.Option;
|
|
|
9
9
|
|
|
10
10
|
function parseValue(value) {
|
|
11
11
|
return {
|
|
12
|
-
fontFamily: value.font.fontFamily || '
|
|
12
|
+
fontFamily: value.font.fontFamily || 'Arial',
|
|
13
13
|
fontSize: value.font.fontSize || 12,
|
|
14
14
|
color: value.color || '#000000',
|
|
15
15
|
fontStyleChecked: {
|
|
@@ -28,6 +28,11 @@ export default function TextStyle(props) {
|
|
|
28
28
|
autoUnmount: false,
|
|
29
29
|
values: parseValue(value),
|
|
30
30
|
onChange: function onChange(name, value) {
|
|
31
|
+
// 解决问题:文本设置,当前字号8,选中字号,点击退格键,字号变为12了
|
|
32
|
+
if (name === 'fontSize' && !value) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
31
36
|
var values = field.getValues();
|
|
32
37
|
var aValues = {
|
|
33
38
|
color: values.color,
|
|
@@ -11,6 +11,8 @@ import textStyles from "../../../../common/text.module.scss";
|
|
|
11
11
|
import TopoTreeSelect from "./TopoTreeSelect";
|
|
12
12
|
import NodeIconSelect from "./NodeIconSelect";
|
|
13
13
|
import NodeRelateResourceButton from "./NodeRelateResourceButton";
|
|
14
|
+
import styles from "./NodePropertyView.module.scss";
|
|
15
|
+
import TabView from "../common/tab/TabView";
|
|
14
16
|
var Option = _Select.Option;
|
|
15
17
|
var CollapsePanel = _Collapse.Panel;
|
|
16
18
|
|
|
@@ -151,7 +153,9 @@ export default function NodePropertyView(props) {
|
|
|
151
153
|
|
|
152
154
|
|
|
153
155
|
var showRelateResource = !!values.tag || !values.tag && ((_topo$options$editor = topo.options.editor) === null || _topo$options$editor === void 0 ? void 0 : _topo$options$editor.enableRelateResource) !== false;
|
|
154
|
-
return /*#__PURE__*/React.createElement("div",
|
|
156
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
157
|
+
className: styles.NodePropertyView
|
|
158
|
+
}, showRelateResource ? /*#__PURE__*/React.createElement(TabView, null, /*#__PURE__*/React.createElement(_Tab.Item, {
|
|
155
159
|
title: "\u6570\u636E",
|
|
156
160
|
key: "1"
|
|
157
161
|
}, renderData()), /*#__PURE__*/React.createElement(_Tab.Item, {
|
|
@@ -52,7 +52,11 @@ export default function TextPropertyView(props) {
|
|
|
52
52
|
useEffect(function () {
|
|
53
53
|
field.setValues(parseValues(values));
|
|
54
54
|
}, [values]);
|
|
55
|
-
return /*#__PURE__*/React.createElement("div",
|
|
55
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
56
|
+
style: {
|
|
57
|
+
paddingTop: 4
|
|
58
|
+
}
|
|
59
|
+
}, /*#__PURE__*/React.createElement(_Form, {
|
|
56
60
|
field: field,
|
|
57
61
|
labelAlign: "top"
|
|
58
62
|
}, /*#__PURE__*/React.createElement(_Form.Item, null, /*#__PURE__*/React.createElement(_Collapse, {
|
|
@@ -77,7 +77,11 @@ export default function ViewPropertyView(props) {
|
|
|
77
77
|
useEffect(function () {
|
|
78
78
|
field.setValues(parseValues(values));
|
|
79
79
|
}, [values]);
|
|
80
|
-
return /*#__PURE__*/React.createElement("div",
|
|
80
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
81
|
+
style: {
|
|
82
|
+
paddingTop: 4
|
|
83
|
+
}
|
|
84
|
+
}, /*#__PURE__*/React.createElement(_Form, {
|
|
81
85
|
field: field,
|
|
82
86
|
labelAlign: "top"
|
|
83
87
|
}, /*#__PURE__*/React.createElement(_Form.Item, null, /*#__PURE__*/React.createElement(_Collapse, {
|
|
@@ -101,5 +105,5 @@ export default function ViewPropertyView(props) {
|
|
|
101
105
|
title: "\u56FE\u7247"
|
|
102
106
|
}, /*#__PURE__*/React.createElement(_Form.Item, {
|
|
103
107
|
label: "\u56FE\u7247\u5C3A\u5BF8"
|
|
104
|
-
}
|
|
108
|
+
}))))));
|
|
105
109
|
}
|
|
@@ -423,6 +423,10 @@ var TopoApp = /*#__PURE__*/function () {
|
|
|
423
423
|
return refresh;
|
|
424
424
|
}();
|
|
425
425
|
|
|
426
|
+
_proto.getGraphView = function getGraphView() {
|
|
427
|
+
return this.view.topoClient.getGraphView();
|
|
428
|
+
};
|
|
429
|
+
|
|
426
430
|
_proto.getDataModel = function getDataModel() {
|
|
427
431
|
return this.view.topoClient.getDataModel();
|
|
428
432
|
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import _MenuButton from "@alifd/next/lib/menu-button";
|
|
2
1
|
import React, { useState, useEffect, useRef, useCallback } from 'react';
|
|
3
2
|
import ViewerTools from "./ViewerTools";
|
|
4
|
-
import TitleWidget from "../../../components/titlebar/widgets/TitleWidget";
|
|
5
3
|
import styles from "../../../components/titlebar/TitleBar.module.scss";
|
|
6
|
-
|
|
4
|
+
import SearchWidget from "./widgets/SearchWidget";
|
|
7
5
|
export default function TopoViewerTitleBar(props) {
|
|
8
6
|
var topo = props.topo,
|
|
9
7
|
showEditButton = props.showEditButton,
|
|
@@ -13,7 +11,7 @@ export default function TopoViewerTitleBar(props) {
|
|
|
13
11
|
className: styles.titlebar
|
|
14
12
|
}, /*#__PURE__*/React.createElement("div", {
|
|
15
13
|
className: styles.left
|
|
16
|
-
}, children || /*#__PURE__*/React.createElement(
|
|
14
|
+
}, children || /*#__PURE__*/React.createElement(SearchWidget, {
|
|
17
15
|
topo: topo
|
|
18
16
|
})), /*#__PURE__*/React.createElement("div", {
|
|
19
17
|
className: styles.right
|
|
@@ -4,16 +4,13 @@ import _Button from "@alifd/next/lib/button";
|
|
|
4
4
|
import _Icon from "@alifd/next/lib/icon";
|
|
5
5
|
import _extends from "@babel/runtime/helpers/extends";
|
|
6
6
|
import React, { useState, useEffect, useRef, useCallback } from 'react';
|
|
7
|
-
import SearchWidget from "./widgets/SearchWidget";
|
|
8
7
|
import styles from "../../../components/titlebar/TitleBar.module.scss";
|
|
9
8
|
import EditButton from "./widgets/EditButton";
|
|
10
9
|
export default function ViewerTools(props) {
|
|
11
10
|
var topo = props.topo,
|
|
12
11
|
_props$showEditButton = props.showEditButton,
|
|
13
12
|
showEditButton = _props$showEditButton === void 0 ? true : _props$showEditButton;
|
|
14
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(
|
|
15
|
-
topo: topo
|
|
16
|
-
}), showEditButton && /*#__PURE__*/React.createElement(EditButton, _extends({
|
|
13
|
+
return /*#__PURE__*/React.createElement("div", null, showEditButton && /*#__PURE__*/React.createElement(EditButton, _extends({
|
|
17
14
|
topo: topo
|
|
18
15
|
}, props)), /*#__PURE__*/React.createElement(_Dropdown, {
|
|
19
16
|
trigger: /*#__PURE__*/React.createElement(_Button, {
|
package/es/models/topoMod.js
CHANGED
package/es/style.js
CHANGED
|
@@ -18,7 +18,6 @@ import '@alifd/next/lib/select/style';
|
|
|
18
18
|
import '@alifd/next/lib/balloon/style';
|
|
19
19
|
import '@alifd/next/lib/grid/style';
|
|
20
20
|
import '@alifd/next/lib/box/style';
|
|
21
|
-
import '@alifd/next/lib/menu-button/style';
|
|
22
21
|
import '@alifd/next/lib/dropdown/style';
|
|
23
22
|
import '@alifd/next/lib/menu/style';
|
|
24
23
|
import '@alifd/next/lib/tab/style';
|
|
@@ -29,12 +29,6 @@ var TopoCenter = /*#__PURE__*/function (_TopoApp) {
|
|
|
29
29
|
id: _this.id
|
|
30
30
|
});
|
|
31
31
|
topoModDispatchers.refreshTopoTree();
|
|
32
|
-
|
|
33
|
-
var topoCenterDispatchers = _this.store.getModelDispatchers('topoCenter');
|
|
34
|
-
|
|
35
|
-
topoCenterDispatchers.update({
|
|
36
|
-
leftAsideOpen: true
|
|
37
|
-
});
|
|
38
32
|
}
|
|
39
33
|
})) || this;
|
|
40
34
|
var menuCommands = createMenuCommands(_assertThisInitialized(_this));
|
|
@@ -14,8 +14,6 @@ export default {
|
|
|
14
14
|
state: {
|
|
15
15
|
loading: true,
|
|
16
16
|
id: undefined,
|
|
17
|
-
leftAsideOpen: true,
|
|
18
|
-
// 左侧树是否展开
|
|
19
17
|
viewState: 'view' // view, create, 2种模式
|
|
20
18
|
|
|
21
19
|
},
|
|
@@ -47,8 +45,7 @@ export default {
|
|
|
47
45
|
id = urlParams.id || topoModState.topoId || '';
|
|
48
46
|
|
|
49
47
|
_this.update({
|
|
50
|
-
viewState: viewType
|
|
51
|
-
leftAsideOpen: viewType !== 'edit'
|
|
48
|
+
viewState: viewType
|
|
52
49
|
}); // 加载功能操作权限
|
|
53
50
|
|
|
54
51
|
|
|
@@ -64,9 +64,11 @@ export function getEdges(dataModel) {
|
|
|
64
64
|
return getElements(dataModel).filter(function (element) {
|
|
65
65
|
return element.getClassName() === 'ht.Edge';
|
|
66
66
|
}).map(function (element) {
|
|
67
|
+
var _element$getSource, _element$getTarget;
|
|
68
|
+
|
|
67
69
|
return _extends({}, element.getAttrObject(), {
|
|
68
|
-
source: element.getSource().getTag(),
|
|
69
|
-
target: element.getTarget().getTag(),
|
|
70
|
+
source: (_element$getSource = element.getSource()) === null || _element$getSource === void 0 ? void 0 : _element$getSource.getTag(),
|
|
71
|
+
target: (_element$getTarget = element.getTarget()) === null || _element$getTarget === void 0 ? void 0 : _element$getTarget.getTag(),
|
|
70
72
|
tag: element.getId()
|
|
71
73
|
});
|
|
72
74
|
});
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
+
|
|
3
5
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
6
|
|
|
5
7
|
exports.__esModule = true;
|
|
@@ -13,7 +15,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
13
15
|
|
|
14
16
|
var _search = _interopRequireDefault(require("@alifd/next/lib/search"));
|
|
15
17
|
|
|
16
|
-
var _react =
|
|
18
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
17
19
|
|
|
18
20
|
var _next = require("@formily/next");
|
|
19
21
|
|
|
@@ -28,6 +30,8 @@ var _componentTableLayout = _interopRequireDefault(require("@riil-frontend/compo
|
|
|
28
30
|
var _NoDataPage = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/components/NoDataPage"));
|
|
29
31
|
|
|
30
32
|
var FormTable = function FormTable(props) {
|
|
33
|
+
var _tableProps$filterPar;
|
|
34
|
+
|
|
31
35
|
var className = props.className,
|
|
32
36
|
children = props.children,
|
|
33
37
|
formProps = props.formProps,
|
|
@@ -40,6 +44,12 @@ var FormTable = function FormTable(props) {
|
|
|
40
44
|
showChecked = _props$showChecked === void 0 ? false : _props$showChecked,
|
|
41
45
|
_props$showPageSizeSe = props.showPageSizeSelector,
|
|
42
46
|
showPageSizeSelector = _props$showPageSizeSe === void 0 ? false : _props$showPageSizeSe;
|
|
47
|
+
|
|
48
|
+
var _useState = (0, _react.useState)(false),
|
|
49
|
+
isSearching = _useState[0],
|
|
50
|
+
setIsSearching = _useState[1];
|
|
51
|
+
|
|
52
|
+
var isFilter = isSearching || ((_tableProps$filterPar = tableProps.filterParams.typeCode) === null || _tableProps$filterPar === void 0 ? void 0 : _tableProps$filterPar.selectedKeys.length);
|
|
43
53
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
44
54
|
className: "riil-table-common " + className,
|
|
45
55
|
style: {
|
|
@@ -60,8 +70,12 @@ var FormTable = function FormTable(props) {
|
|
|
60
70
|
"x-component-props": {
|
|
61
71
|
shape: 'simple',
|
|
62
72
|
placeholder: '请输入关键字',
|
|
63
|
-
onSearch: function onSearch() {
|
|
64
|
-
|
|
73
|
+
onSearch: function onSearch(val) {
|
|
74
|
+
setIsSearching(!!val);
|
|
75
|
+
formProps.actions.submit();
|
|
76
|
+
},
|
|
77
|
+
style: {
|
|
78
|
+
width: 200
|
|
65
79
|
}
|
|
66
80
|
}
|
|
67
81
|
}))), menu && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -92,7 +106,7 @@ var FormTable = function FormTable(props) {
|
|
|
92
106
|
table: /*#__PURE__*/_react["default"].createElement(_table["default"], (0, _extends2["default"])({}, tableProps, {
|
|
93
107
|
fixedHeader: true,
|
|
94
108
|
hasBorder: false,
|
|
95
|
-
emptyContent:
|
|
109
|
+
emptyContent: !isFilter ? '暂无数据' : '暂无搜索结果'
|
|
96
110
|
}), columns.map(function (column) {
|
|
97
111
|
return /*#__PURE__*/_react["default"].createElement(_table["default"].Column, (0, _extends2["default"])({}, column, {
|
|
98
112
|
key: column.dataIndex
|
|
@@ -20,11 +20,13 @@
|
|
|
20
20
|
width: 7px;
|
|
21
21
|
height: 7px;
|
|
22
22
|
}
|
|
23
|
+
|
|
23
24
|
::-webkit-scrollbar-thumb {
|
|
24
25
|
background-color: rgba(0, 0, 0, 0.2);
|
|
25
26
|
border-radius: 7px;
|
|
26
27
|
transition: all 0.25s ease-in-out;
|
|
27
28
|
}
|
|
29
|
+
|
|
28
30
|
::-webkit-scrollbar-thumb:hover {
|
|
29
31
|
background-color: rgba(0, 0, 0, 0.3);
|
|
30
32
|
}
|
|
@@ -33,12 +35,20 @@
|
|
|
33
35
|
.next-collapse-panel:not(:first-child) {
|
|
34
36
|
border-top: none;
|
|
35
37
|
}
|
|
38
|
+
|
|
36
39
|
.next-collapse-panel-title {
|
|
37
40
|
background: none;
|
|
38
41
|
font-size: 12px;
|
|
39
42
|
padding-bottom: 0;
|
|
40
43
|
padding-left: 32px;
|
|
44
|
+
|
|
45
|
+
& > .next-collapse-panel-icon {
|
|
46
|
+
left: 12px;
|
|
47
|
+
margin-top: 0;
|
|
48
|
+
margin-left: 0;
|
|
49
|
+
}
|
|
41
50
|
}
|
|
51
|
+
|
|
42
52
|
.next-collapse-panel-content {
|
|
43
53
|
padding-left: 32px;
|
|
44
54
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function TabView(props: any): JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
exports.__esModule = true;
|
|
8
|
+
exports["default"] = TabView;
|
|
9
|
+
|
|
10
|
+
var _tab = _interopRequireDefault(require("@alifd/next/lib/tab"));
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
|
|
14
|
+
var _TabViewModule = _interopRequireDefault(require("./TabView.module.scss"));
|
|
15
|
+
|
|
16
|
+
function TabView(props) {
|
|
17
|
+
return /*#__PURE__*/_react["default"].createElement(_tab["default"], {
|
|
18
|
+
className: _TabViewModule["default"].tabs
|
|
19
|
+
}, props.children);
|
|
20
|
+
}
|
|
@@ -25,7 +25,7 @@ var Option = _select["default"].Option;
|
|
|
25
25
|
|
|
26
26
|
function parseValue(value) {
|
|
27
27
|
return {
|
|
28
|
-
fontFamily: value.font.fontFamily || '
|
|
28
|
+
fontFamily: value.font.fontFamily || 'Arial',
|
|
29
29
|
fontSize: value.font.fontSize || 12,
|
|
30
30
|
color: value.color || '#000000',
|
|
31
31
|
fontStyleChecked: {
|
|
@@ -44,6 +44,11 @@ function TextStyle(props) {
|
|
|
44
44
|
autoUnmount: false,
|
|
45
45
|
values: parseValue(value),
|
|
46
46
|
onChange: function onChange(name, value) {
|
|
47
|
+
// 解决问题:文本设置,当前字号8,选中字号,点击退格键,字号变为12了
|
|
48
|
+
if (name === 'fontSize' && !value) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
|
|
47
52
|
var values = field.getValues();
|
|
48
53
|
var aValues = {
|
|
49
54
|
color: values.color,
|
|
@@ -33,6 +33,10 @@ var _NodeIconSelect = _interopRequireDefault(require("./NodeIconSelect"));
|
|
|
33
33
|
|
|
34
34
|
var _NodeRelateResourceButton = _interopRequireDefault(require("./NodeRelateResourceButton"));
|
|
35
35
|
|
|
36
|
+
var _NodePropertyViewModule = _interopRequireDefault(require("./NodePropertyView.module.scss"));
|
|
37
|
+
|
|
38
|
+
var _TabView = _interopRequireDefault(require("../common/tab/TabView"));
|
|
39
|
+
|
|
36
40
|
var Option = _select["default"].Option;
|
|
37
41
|
var CollapsePanel = _collapse["default"].Panel;
|
|
38
42
|
|
|
@@ -173,7 +177,9 @@ function NodePropertyView(props) {
|
|
|
173
177
|
|
|
174
178
|
|
|
175
179
|
var showRelateResource = !!values.tag || !values.tag && ((_topo$options$editor = topo.options.editor) === null || _topo$options$editor === void 0 ? void 0 : _topo$options$editor.enableRelateResource) !== false;
|
|
176
|
-
return /*#__PURE__*/_react["default"].createElement("div",
|
|
180
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
181
|
+
className: _NodePropertyViewModule["default"].NodePropertyView
|
|
182
|
+
}, showRelateResource ? /*#__PURE__*/_react["default"].createElement(_TabView["default"], null, /*#__PURE__*/_react["default"].createElement(_tab["default"].Item, {
|
|
177
183
|
title: "\u6570\u636E",
|
|
178
184
|
key: "1"
|
|
179
185
|
}, renderData()), /*#__PURE__*/_react["default"].createElement(_tab["default"].Item, {
|
|
@@ -68,7 +68,11 @@ function TextPropertyView(props) {
|
|
|
68
68
|
(0, _react.useEffect)(function () {
|
|
69
69
|
field.setValues(parseValues(values));
|
|
70
70
|
}, [values]);
|
|
71
|
-
return /*#__PURE__*/_react["default"].createElement("div",
|
|
71
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
72
|
+
style: {
|
|
73
|
+
paddingTop: 4
|
|
74
|
+
}
|
|
75
|
+
}, /*#__PURE__*/_react["default"].createElement(_form["default"], {
|
|
72
76
|
field: field,
|
|
73
77
|
labelAlign: "top"
|
|
74
78
|
}, /*#__PURE__*/_react["default"].createElement(_form["default"].Item, null, /*#__PURE__*/_react["default"].createElement(_collapse["default"], {
|
|
@@ -95,7 +95,11 @@ function ViewPropertyView(props) {
|
|
|
95
95
|
(0, _react.useEffect)(function () {
|
|
96
96
|
field.setValues(parseValues(values));
|
|
97
97
|
}, [values]);
|
|
98
|
-
return /*#__PURE__*/_react["default"].createElement("div",
|
|
98
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
99
|
+
style: {
|
|
100
|
+
paddingTop: 4
|
|
101
|
+
}
|
|
102
|
+
}, /*#__PURE__*/_react["default"].createElement(_form["default"], {
|
|
99
103
|
field: field,
|
|
100
104
|
labelAlign: "top"
|
|
101
105
|
}, /*#__PURE__*/_react["default"].createElement(_form["default"].Item, null, /*#__PURE__*/_react["default"].createElement(_collapse["default"], {
|
|
@@ -119,5 +123,5 @@ function ViewPropertyView(props) {
|
|
|
119
123
|
title: "\u56FE\u7247"
|
|
120
124
|
}, /*#__PURE__*/_react["default"].createElement(_form["default"].Item, {
|
|
121
125
|
label: "\u56FE\u7247\u5C3A\u5BF8"
|
|
122
|
-
}
|
|
126
|
+
}))))));
|
|
123
127
|
}
|