cloud-b2b 1.0.4 → 1.0.7
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/es/Indent/Indent.js +23 -0
- package/es/Indent/package.json +6 -0
- package/es/LayoutLink/LayoutLink.js +2 -2
- package/es/Sidebar2/Sidebar.js +1 -1
- package/es/SuperForm/SuperForm.js +2 -2
- package/es/SuperForm2/SuperForm.js +732 -0
- package/es/SuperForm2/SuperForm.less +52 -0
- package/es/SuperForm2/package.json +6 -0
- package/es/SuperTab/SuperTab.js +130 -0
- package/es/SuperTab/SuperTab.less +43 -0
- package/es/SuperTab/package.json +6 -0
- package/es/SuperTab2/SuperTab2.js +167 -0
- package/es/SuperTab2/SuperTab2.less +18 -0
- package/es/SuperTab2/package.json +6 -0
- package/es/SuperTable/DragSortRow.less +17 -17
- package/es/SuperTable/FilterDropDown.less +30 -30
- package/es/SuperTable/SuperTable.js +38 -38
- package/es/SuperTable/SuperTable.less +132 -135
- package/es/SuperTable/package.json +6 -6
- package/es/SuperTable2/SuperTable2.js +22 -22
- package/es/SuperTable2/SuperTable2.less +100 -116
- package/es/SuperTable2/package.json +6 -6
- package/es/SuperTable3/FilterDropDown.js +188 -0
- package/es/SuperTable3/FilterDropDown.less +29 -0
- package/es/SuperTable3/SuperTable.js +783 -0
- package/es/SuperTable3/SuperTable.less +99 -0
- package/es/SuperTable3/fixed.js +42 -0
- package/es/SuperTable3/package.json +6 -0
- package/es/Title/Title.less +35 -35
- package/es/Title/package.json +6 -6
- package/es/Viewer/Viewer.js +1 -1
- package/es/adjust.less +89 -89
- package/es/index.js +12 -2
- package/es/style.less +12 -2
- package/lib/Indent/Indent.js +38 -0
- package/lib/Indent/package.json +6 -0
- package/lib/LayoutLink/LayoutLink.js +2 -2
- package/lib/Sidebar2/Sidebar.js +1 -1
- package/lib/SuperForm/SuperForm.js +2 -2
- package/lib/SuperForm2/SuperForm.js +742 -0
- package/lib/SuperForm2/SuperForm.less +52 -0
- package/lib/SuperForm2/package.json +6 -0
- package/lib/SuperTab/SuperTab.js +146 -0
- package/lib/SuperTab/SuperTab.less +43 -0
- package/lib/SuperTab/package.json +6 -0
- package/lib/SuperTab2/SuperTab2.js +191 -0
- package/lib/SuperTab2/SuperTab2.less +18 -0
- package/lib/SuperTab2/package.json +6 -0
- package/lib/SuperTable/DragSortRow.less +17 -17
- package/lib/SuperTable/FilterDropDown.less +30 -30
- package/lib/SuperTable/SuperTable.js +38 -38
- package/lib/SuperTable/SuperTable.less +132 -135
- package/lib/SuperTable/package.json +6 -6
- package/lib/SuperTable2/SuperTable2.js +22 -22
- package/lib/SuperTable2/SuperTable2.less +100 -116
- package/lib/SuperTable2/package.json +6 -6
- package/lib/SuperTable3/FilterDropDown.js +205 -0
- package/lib/SuperTable3/FilterDropDown.less +29 -0
- package/lib/SuperTable3/SuperTable.js +787 -0
- package/lib/SuperTable3/SuperTable.less +99 -0
- package/lib/SuperTable3/fixed.js +55 -0
- package/lib/SuperTable3/package.json +6 -0
- package/lib/Title/Title.less +35 -35
- package/lib/Title/package.json +6 -6
- package/lib/Viewer/Viewer.js +1 -1
- package/lib/adjust.less +89 -89
- package/lib/index.js +102 -7
- package/lib/index.less +5 -1
- package/lib/style.less +12 -2
- package/package.json +1 -1
- package/es/HomeHeader/Header.js +0 -75
- package/es/HomeHeader/Header.less +0 -73
- package/es/HomeHeader/package.json +0 -6
- package/lib/HomeHeader/Header.js +0 -95
- package/lib/HomeHeader/Header.less +0 -73
- package/lib/HomeHeader/package.json +0 -6
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
@import '../variables.less';
|
|
2
|
+
|
|
3
|
+
.@{cloudlink-prefix}-SuperForm2 {
|
|
4
|
+
position: relative;
|
|
5
|
+
|
|
6
|
+
> form {
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
|
|
9
|
+
> div {
|
|
10
|
+
margin-bottom: -6px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
[role='add'] {
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
margin-left: 4px;
|
|
16
|
+
color: @primary-color;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:global(.ant-form-item-label) {
|
|
20
|
+
line-height: 16px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:global(.ant-form-item-control) > span > textArea {
|
|
24
|
+
min-height: 22px !important;
|
|
25
|
+
margin-bottom: 0 !important;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:global(.ant-form-item-control) input,
|
|
29
|
+
:global(.ant-calendar-picker),
|
|
30
|
+
:global(.ant-select) {
|
|
31
|
+
display: block;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:global(.ant-select-selection--multiple) {
|
|
35
|
+
border-top-width: 1px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:global(.ant-radio-group-small) {
|
|
39
|
+
display: block;
|
|
40
|
+
height: @input-height-sm;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.checkbox {
|
|
44
|
+
position: absolute;
|
|
45
|
+
top:15px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.formItemWithCheckbox{
|
|
49
|
+
margin-left: 20px;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
|
+
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
4
|
+
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
5
|
+
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
6
|
+
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
7
|
+
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
8
|
+
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
9
|
+
import _Tabs from "antd/es/tabs";
|
|
10
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
11
|
+
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
12
|
+
|
|
13
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
14
|
+
|
|
15
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
16
|
+
|
|
17
|
+
import React from 'react';
|
|
18
|
+
import PropTypes from 'prop-types';
|
|
19
|
+
import variables from '../variables';
|
|
20
|
+
var TabPane = _Tabs.TabPane;
|
|
21
|
+
/**
|
|
22
|
+
* key: 唯一标识一个tab
|
|
23
|
+
* title: 显示在tab上的标题
|
|
24
|
+
* close: 为true则显示关闭按钮,默认为true
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
var TabType = {
|
|
28
|
+
key: PropTypes.string.isRequired,
|
|
29
|
+
title: PropTypes.string.isRequired,
|
|
30
|
+
close: PropTypes.bool
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* activeKey: 处于活动状态tab的key值
|
|
34
|
+
* onTabChange: 切换选项卡时触发,原型为function(key)
|
|
35
|
+
* onTabClose: 关闭选项卡时触发,原型为funtion(key)
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
var SuperTab = /*#__PURE__*/function (_React$Component) {
|
|
39
|
+
_inherits(SuperTab, _React$Component);
|
|
40
|
+
|
|
41
|
+
var _super = _createSuper(SuperTab);
|
|
42
|
+
|
|
43
|
+
function SuperTab() {
|
|
44
|
+
var _context;
|
|
45
|
+
|
|
46
|
+
var _this;
|
|
47
|
+
|
|
48
|
+
_classCallCheck(this, SuperTab);
|
|
49
|
+
|
|
50
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
51
|
+
args[_key] = arguments[_key];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
_this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
|
|
55
|
+
|
|
56
|
+
_defineProperty(_assertThisInitialized(_this), "getEvent", function (name) {
|
|
57
|
+
if (_this.props[name]) {
|
|
58
|
+
return _this.props[name];
|
|
59
|
+
} else if (_this.props.callback) {
|
|
60
|
+
return _this.props.callback[name];
|
|
61
|
+
} else {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
_defineProperty(_assertThisInitialized(_this), "callEvent", function (name, key) {
|
|
67
|
+
var onEvent = _this.getEvent(name);
|
|
68
|
+
|
|
69
|
+
if (onEvent) {
|
|
70
|
+
onEvent(key);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
_defineProperty(_assertThisInitialized(_this), "onEdit", function (key, action) {
|
|
75
|
+
if (action === 'remove') {
|
|
76
|
+
_this.callEvent('onTabClose', key);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
_defineProperty(_assertThisInitialized(_this), "onChange", function (key) {
|
|
81
|
+
_this.callEvent('onTabChange', key);
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
_defineProperty(_assertThisInitialized(_this), "toTab", function (_ref) {
|
|
85
|
+
var key = _ref.key,
|
|
86
|
+
title = _ref.title,
|
|
87
|
+
close = _ref.close;
|
|
88
|
+
return /*#__PURE__*/React.createElement(TabPane, {
|
|
89
|
+
key: key,
|
|
90
|
+
tab: title,
|
|
91
|
+
closable: close
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
_defineProperty(_assertThisInitialized(_this), "getTabsProps", function () {
|
|
96
|
+
return {
|
|
97
|
+
className: variables('SuperTab'),
|
|
98
|
+
activeKey: _this.props.activeKey,
|
|
99
|
+
type: 'editable-card',
|
|
100
|
+
hideAdd: true,
|
|
101
|
+
onEdit: _this.onEdit,
|
|
102
|
+
onChange: _this.onChange
|
|
103
|
+
};
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
return _this;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
_createClass(SuperTab, [{
|
|
110
|
+
key: "render",
|
|
111
|
+
value: function render() {
|
|
112
|
+
var _context2;
|
|
113
|
+
|
|
114
|
+
return /*#__PURE__*/React.createElement(_Tabs, this.getTabsProps(), _mapInstanceProperty(_context2 = this.props.tabs).call(_context2, this.toTab));
|
|
115
|
+
}
|
|
116
|
+
}]);
|
|
117
|
+
|
|
118
|
+
return SuperTab;
|
|
119
|
+
}(React.Component);
|
|
120
|
+
|
|
121
|
+
_defineProperty(SuperTab, "propTypes", {
|
|
122
|
+
activeKey: PropTypes.string.isRequired,
|
|
123
|
+
tabs: PropTypes.arrayOf(PropTypes.shape(TabType)).isRequired,
|
|
124
|
+
onTabChange: PropTypes.func,
|
|
125
|
+
onTabClose: PropTypes.func
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
_defineProperty(SuperTab, "PROPS", ['activeKey', 'tabs', 'onTabChange', 'onTabClose']);
|
|
129
|
+
|
|
130
|
+
export default SuperTab;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@import '../variables.less';
|
|
2
|
+
|
|
3
|
+
.@{cloudlink-prefix}-SuperTab {
|
|
4
|
+
:global {
|
|
5
|
+
.ant-tabs-bar {
|
|
6
|
+
margin-bottom: 0;
|
|
7
|
+
border-color: @brand-primary;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.ant-tabs-nav-container {
|
|
11
|
+
font-size: @font-size-base;
|
|
12
|
+
line-height: 16px;
|
|
13
|
+
height: 27px !important;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.ant-tabs-tab {
|
|
17
|
+
background: @background-color !important;
|
|
18
|
+
line-height: 25px !important;
|
|
19
|
+
|
|
20
|
+
.ant-tabs-close-x {
|
|
21
|
+
width: 14px !important;
|
|
22
|
+
height: 14px !important;
|
|
23
|
+
color: #333 !important;
|
|
24
|
+
margin-left: 0 !important;
|
|
25
|
+
padding-top: 1px;
|
|
26
|
+
vertical-align: -3px !important;
|
|
27
|
+
|
|
28
|
+
&:hover {
|
|
29
|
+
background: #d5d5d8;
|
|
30
|
+
border-radius: 50% !important;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
> svg {
|
|
34
|
+
transform: scale(0.7);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ant-tabs-tab-active {
|
|
40
|
+
border-color: @brand-primary !important;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
|
+
import _Dropdown from "antd/es/dropdown";
|
|
3
|
+
import _Icon from "antd/es/icon";
|
|
4
|
+
import _Tooltip from "antd/es/tooltip";
|
|
5
|
+
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
6
|
+
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
7
|
+
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
8
|
+
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
9
|
+
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
10
|
+
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
11
|
+
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
12
|
+
import _Menu from "antd/es/menu";
|
|
13
|
+
import _Tabs from "antd/es/tabs";
|
|
14
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
15
|
+
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
16
|
+
import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
|
|
17
|
+
|
|
18
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
19
|
+
|
|
20
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
21
|
+
|
|
22
|
+
import React from 'react';
|
|
23
|
+
import PropTypes from 'prop-types';
|
|
24
|
+
import ReactDOM from 'react-dom';
|
|
25
|
+
import variables from '../variables';
|
|
26
|
+
var TabPane = _Tabs.TabPane;
|
|
27
|
+
var MenuItem = _Menu.Item;
|
|
28
|
+
/**
|
|
29
|
+
* key: 唯一标识一个tab
|
|
30
|
+
* title: 显示在tab上的标题
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
var TabType = {
|
|
34
|
+
key: PropTypes.string.isRequired,
|
|
35
|
+
title: PropTypes.string.isRequired
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* activeKey: 处于活动状态tab的key值
|
|
39
|
+
* menu: 是否需要右侧下拉列表,默认false
|
|
40
|
+
* onTabChange: 切换选项卡时触发,原型为function(key)
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
var SuperTab2 = /*#__PURE__*/function (_React$Component) {
|
|
44
|
+
_inherits(SuperTab2, _React$Component);
|
|
45
|
+
|
|
46
|
+
var _super = _createSuper(SuperTab2);
|
|
47
|
+
|
|
48
|
+
function SuperTab2() {
|
|
49
|
+
var _context;
|
|
50
|
+
|
|
51
|
+
var _this;
|
|
52
|
+
|
|
53
|
+
_classCallCheck(this, SuperTab2);
|
|
54
|
+
|
|
55
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
56
|
+
args[_key] = arguments[_key];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
_this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
|
|
60
|
+
|
|
61
|
+
_defineProperty(_assertThisInitialized(_this), "onTabChange", function (key) {
|
|
62
|
+
var _this$props = _this.props,
|
|
63
|
+
onTabChange = _this$props.onTabChange,
|
|
64
|
+
_this$props$callback = _this$props.callback,
|
|
65
|
+
callback = _this$props$callback === void 0 ? {} : _this$props$callback;
|
|
66
|
+
|
|
67
|
+
if (onTabChange) {
|
|
68
|
+
onTabChange(key);
|
|
69
|
+
} else if (callback.onTabChange) {
|
|
70
|
+
// callback被废弃,只是为了兼容旧代码而已
|
|
71
|
+
callback.onTabChange(key);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
_defineProperty(_assertThisInitialized(_this), "toTab", function (tab) {
|
|
76
|
+
return /*#__PURE__*/React.createElement(TabPane, {
|
|
77
|
+
key: tab.key,
|
|
78
|
+
tab: tab.title
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
_defineProperty(_assertThisInitialized(_this), "toMenu", function () {
|
|
83
|
+
var _this$props2 = _this.props,
|
|
84
|
+
tabs = _this$props2.tabs,
|
|
85
|
+
activeKey = _this$props2.activeKey;
|
|
86
|
+
return /*#__PURE__*/React.createElement(_Menu, {
|
|
87
|
+
style: {
|
|
88
|
+
maxHeight: '450px',
|
|
89
|
+
overflow: 'auto'
|
|
90
|
+
}
|
|
91
|
+
}, _mapInstanceProperty(tabs).call(tabs, function (tab) {
|
|
92
|
+
var _context2, _context3;
|
|
93
|
+
|
|
94
|
+
var style = activeKey === tab.key ? {
|
|
95
|
+
color: "#2196f3"
|
|
96
|
+
} : {};
|
|
97
|
+
return tab.tip ? /*#__PURE__*/React.createElement(MenuItem, {
|
|
98
|
+
key: tab.key
|
|
99
|
+
}, /*#__PURE__*/React.createElement(_Tooltip, {
|
|
100
|
+
placement: "leftTop",
|
|
101
|
+
title: tab.tip
|
|
102
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
103
|
+
onClick: _bindInstanceProperty(_context2 = _this.onTabChange).call(_context2, _assertThisInitialized(_this), tab.key),
|
|
104
|
+
style: style
|
|
105
|
+
}, tab.title))) : /*#__PURE__*/React.createElement(MenuItem, {
|
|
106
|
+
key: tab.key
|
|
107
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
108
|
+
onClick: _bindInstanceProperty(_context3 = _this.onTabChange).call(_context3, _assertThisInitialized(_this), tab.key),
|
|
109
|
+
style: style
|
|
110
|
+
}, tab.title));
|
|
111
|
+
}));
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
_defineProperty(_assertThisInitialized(_this), "getPopupContainer", function () {
|
|
115
|
+
var container = _this.props.container;
|
|
116
|
+
|
|
117
|
+
if (typeof container === 'undefined') {
|
|
118
|
+
return document.body;
|
|
119
|
+
} else {
|
|
120
|
+
return ReactDOM.findDOMNode(container);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
_defineProperty(_assertThisInitialized(_this), "toDropdown", function () {
|
|
125
|
+
return /*#__PURE__*/React.createElement(_Dropdown, {
|
|
126
|
+
overlay: _this.toMenu(),
|
|
127
|
+
getPopupContainer: _this.getPopupContainer
|
|
128
|
+
}, /*#__PURE__*/React.createElement(_Icon, {
|
|
129
|
+
type: "menu-unfold",
|
|
130
|
+
style: {
|
|
131
|
+
fontSize: 16,
|
|
132
|
+
verticalAlign: -2
|
|
133
|
+
}
|
|
134
|
+
}));
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
return _this;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
_createClass(SuperTab2, [{
|
|
141
|
+
key: "render",
|
|
142
|
+
value: function render() {
|
|
143
|
+
var _this$props3 = this.props,
|
|
144
|
+
tabs = _this$props3.tabs,
|
|
145
|
+
activeKey = _this$props3.activeKey,
|
|
146
|
+
_this$props3$menu = _this$props3.menu,
|
|
147
|
+
menu = _this$props3$menu === void 0 ? false : _this$props3$menu;
|
|
148
|
+
return /*#__PURE__*/React.createElement(_Tabs, {
|
|
149
|
+
className: variables('SuperTab2'),
|
|
150
|
+
activeKey: activeKey,
|
|
151
|
+
onChange: this.onTabChange,
|
|
152
|
+
tabBarExtraContent: menu && tabs.length > 3 && this.toDropdown()
|
|
153
|
+
}, _mapInstanceProperty(tabs).call(tabs, this.toTab));
|
|
154
|
+
}
|
|
155
|
+
}]);
|
|
156
|
+
|
|
157
|
+
return SuperTab2;
|
|
158
|
+
}(React.Component);
|
|
159
|
+
|
|
160
|
+
_defineProperty(SuperTab2, "propTypes", {
|
|
161
|
+
activeKey: PropTypes.string.isRequired,
|
|
162
|
+
tabs: PropTypes.arrayOf(PropTypes.shape(TabType)).isRequired,
|
|
163
|
+
menu: PropTypes.bool,
|
|
164
|
+
onTabChange: PropTypes.func
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
export default SuperTab2;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@import '../variables.less';
|
|
2
|
+
|
|
3
|
+
.@{cloudlink-prefix}-SuperTab2 {
|
|
4
|
+
:global(.ant-tabs-bar) {
|
|
5
|
+
margin-bottom: 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:global(.ant-tabs-nav-container) {
|
|
9
|
+
font-size: @font-size-base;
|
|
10
|
+
line-height: 16px;
|
|
11
|
+
height: 32px !important;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:global(.ant-tabs-tab) {
|
|
15
|
+
padding: 8px 6px;
|
|
16
|
+
margin-right: 4px;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
@import '
|
|
2
|
-
|
|
3
|
-
.@{cloudlink-prefix}-DragSortRow {
|
|
4
|
-
cursor: move;
|
|
5
|
-
|
|
6
|
-
&[data-drag-hover='up'] {
|
|
7
|
-
td {
|
|
8
|
-
border-top: 2px dashed @primary-color !important;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
&[data-drag-hover='down'] {
|
|
13
|
-
td {
|
|
14
|
-
border-bottom: 2px dashed @primary-color !important;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
1
|
+
@import '../variables';
|
|
2
|
+
|
|
3
|
+
.@{cloudlink-prefix}-DragSortRow {
|
|
4
|
+
cursor: move;
|
|
5
|
+
|
|
6
|
+
&[data-drag-hover='up'] {
|
|
7
|
+
td {
|
|
8
|
+
border-top: 2px dashed @primary-color !important;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&[data-drag-hover='down'] {
|
|
13
|
+
td {
|
|
14
|
+
border-bottom: 2px dashed @primary-color !important;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
@import '../variables.less';
|
|
2
|
-
|
|
3
|
-
.@{cloudlink-prefix}-FilterDropDown {
|
|
4
|
-
background: white;
|
|
5
|
-
padding: @padding-vertical @padding-horizontal;
|
|
6
|
-
border-radius: @border-radius-base;
|
|
7
|
-
border: 1px solid #d9d9d9;
|
|
8
|
-
|
|
9
|
-
> :first-child {
|
|
10
|
-
width: 135px;
|
|
11
|
-
margin-right: 10px;
|
|
12
|
-
}
|
|
13
|
-
.date{
|
|
14
|
-
background: white;
|
|
15
|
-
padding: @padding-vertical @padding-horizontal;
|
|
16
|
-
border-radius: @border-radius-base;
|
|
17
|
-
border: 1px solid #d9d9d9;
|
|
18
|
-
|
|
19
|
-
> :first-child > div {
|
|
20
|
-
display: inline-block;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
> :last-child {
|
|
24
|
-
text-align: right;
|
|
25
|
-
margin-top: 5px;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
@import '../variables.less';
|
|
2
|
+
|
|
3
|
+
.@{cloudlink-prefix}-FilterDropDown {
|
|
4
|
+
background: white;
|
|
5
|
+
padding: @padding-vertical @padding-horizontal;
|
|
6
|
+
border-radius: @border-radius-base;
|
|
7
|
+
border: 1px solid #d9d9d9;
|
|
8
|
+
|
|
9
|
+
> :first-child {
|
|
10
|
+
width: 135px;
|
|
11
|
+
margin-right: 10px;
|
|
12
|
+
}
|
|
13
|
+
.date{
|
|
14
|
+
background: white;
|
|
15
|
+
padding: @padding-vertical @padding-horizontal;
|
|
16
|
+
border-radius: @border-radius-base;
|
|
17
|
+
border: 1px solid #d9d9d9;
|
|
18
|
+
|
|
19
|
+
> :first-child > div {
|
|
20
|
+
display: inline-block;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
> :last-child {
|
|
24
|
+
text-align: right;
|
|
25
|
+
margin-top: 5px;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
@@ -50,13 +50,13 @@ import FilterDropDown from './FilterDropDown';
|
|
|
50
50
|
import fixed from './fixed';
|
|
51
51
|
import DragSortRow from './DragSortRow';
|
|
52
52
|
import variables from '../variables';
|
|
53
|
-
/**
|
|
54
|
-
* sorter: [可选],不传表示该列不支持排序;为string表示按字符串排序;为number表示按数字大小排序
|
|
55
|
-
* filter: [可选],是否支持过滤,默认为false
|
|
56
|
-
* link: [可选],为true表示超链接,内容来至items;为字符串表示超链接,内容就是该字符串;为字符串‘list’表示超链接数组,内容就是该items对应key对象数组的linkTitleKey属性拼接
|
|
57
|
-
* linkTitleKey: [可选],当link为'list'表示超链接组时,该值表示要拼接展示的属性key值
|
|
58
|
-
* isDateFilterByStartAndEnd: [可选],为true时做过滤操作会显示时间段搜索,默认为false
|
|
59
|
-
*
|
|
53
|
+
/**
|
|
54
|
+
* sorter: [可选],不传表示该列不支持排序;为string表示按字符串排序;为number表示按数字大小排序
|
|
55
|
+
* filter: [可选],是否支持过滤,默认为false
|
|
56
|
+
* link: [可选],为true表示超链接,内容来至items;为字符串表示超链接,内容就是该字符串;为字符串‘list’表示超链接数组,内容就是该items对应key对象数组的linkTitleKey属性拼接
|
|
57
|
+
* linkTitleKey: [可选],当link为'list'表示超链接组时,该值表示要拼接展示的属性key值
|
|
58
|
+
* isDateFilterByStartAndEnd: [可选],为true时做过滤操作会显示时间段搜索,默认为false
|
|
59
|
+
*
|
|
60
60
|
*/
|
|
61
61
|
|
|
62
62
|
var ColType = {
|
|
@@ -75,13 +75,13 @@ var ColType = {
|
|
|
75
75
|
var ItemType = {
|
|
76
76
|
checked: PropTypes.bool
|
|
77
77
|
};
|
|
78
|
-
/**
|
|
79
|
-
* onCheck:点击复选框时触发,原型func(isAll, checked, rowIndex);isolation为true时,原型为onCheck(checkedRows)
|
|
80
|
-
* onRadio: 点击单选按钮时触发,原型为func(checkedRows)
|
|
81
|
-
* onDoubleClick: 行双击时触发,原型func(rowIndex)
|
|
82
|
-
* onLink: 点击超链接时触发,原型为func(key, rowIndex, item)
|
|
83
|
-
* onTableChange: 排序信息改变时触发,原型为func(sortInfo, filterInfo)
|
|
84
|
-
* onMoveRow:行拖曳排序时触发,原型为func(dragIndex, targetIndex)
|
|
78
|
+
/**
|
|
79
|
+
* onCheck:点击复选框时触发,原型func(isAll, checked, rowIndex);isolation为true时,原型为onCheck(checkedRows)
|
|
80
|
+
* onRadio: 点击单选按钮时触发,原型为func(checkedRows)
|
|
81
|
+
* onDoubleClick: 行双击时触发,原型func(rowIndex)
|
|
82
|
+
* onLink: 点击超链接时触发,原型为func(key, rowIndex, item)
|
|
83
|
+
* onTableChange: 排序信息改变时触发,原型为func(sortInfo, filterInfo)
|
|
84
|
+
* onMoveRow:行拖曳排序时触发,原型为func(dragIndex, targetIndex)
|
|
85
85
|
*/
|
|
86
86
|
|
|
87
87
|
var CallbackType = {
|
|
@@ -92,22 +92,22 @@ var CallbackType = {
|
|
|
92
92
|
onTableChange: PropTypes.func,
|
|
93
93
|
onMoveRow: PropTypes.func
|
|
94
94
|
};
|
|
95
|
-
/**
|
|
96
|
-
* checkbox: [可选],是否有复选框,默认为true
|
|
97
|
-
* isPaging: [可选],是否分页,默认为false
|
|
98
|
-
* radio: [可选],是否为单选按钮,当checkbox为true时生效,默认值为false
|
|
99
|
-
* isolation: [可选],为true时,复选框的选中行采用checkedRows存储
|
|
100
|
-
* checkedRows: [可选],选中的行数,radio为true时生效
|
|
101
|
-
* index: [可选],是否有序号,默认值为true
|
|
102
|
-
* indexTitle:[可选],序号标题,默认为'序号'
|
|
103
|
-
* sortInfo: [可选],排序信息,默认为null
|
|
104
|
-
* filterInfo: [可选],过滤信息,默认为null
|
|
105
|
-
* maxHeight: [可选],设置表格的最大高度
|
|
106
|
-
* dragSort: [可选], 为true表示支持行拖曳排序,且不支持行单击选中复选或单选按钮和双击事件,默认为false
|
|
107
|
-
* isEmphasized: [可选],是否强调,行字体加粗显示;要实现字体加粗显示除了isEmphasized设置为true之外,加粗行数据里要设置__isEmphasized为true
|
|
108
|
-
* isWeaken: [可选],是否弱化行字体置灰显示,除了isWeaken设置为true之外,置灰行数据里要设置__isWeaken为true
|
|
109
|
-
* pageTotal: [可选], 为true表示开启表格末行自动汇总表格列数据,默认为false || searchTotal,当开启时,需要汇总的列需设置属性total为true,当dragSort为true时,该选项失效
|
|
110
|
-
* searchTotal: [可选], 表格汇总数据对象,该属性不为空时pageTotal默认开启,当dragSort为true时,该选项失效
|
|
95
|
+
/**
|
|
96
|
+
* checkbox: [可选],是否有复选框,默认为true
|
|
97
|
+
* isPaging: [可选],是否分页,默认为false
|
|
98
|
+
* radio: [可选],是否为单选按钮,当checkbox为true时生效,默认值为false
|
|
99
|
+
* isolation: [可选],为true时,复选框的选中行采用checkedRows存储
|
|
100
|
+
* checkedRows: [可选],选中的行数,radio为true时生效
|
|
101
|
+
* index: [可选],是否有序号,默认值为true
|
|
102
|
+
* indexTitle:[可选],序号标题,默认为'序号'
|
|
103
|
+
* sortInfo: [可选],排序信息,默认为null
|
|
104
|
+
* filterInfo: [可选],过滤信息,默认为null
|
|
105
|
+
* maxHeight: [可选],设置表格的最大高度
|
|
106
|
+
* dragSort: [可选], 为true表示支持行拖曳排序,且不支持行单击选中复选或单选按钮和双击事件,默认为false
|
|
107
|
+
* isEmphasized: [可选],是否强调,行字体加粗显示;要实现字体加粗显示除了isEmphasized设置为true之外,加粗行数据里要设置__isEmphasized为true
|
|
108
|
+
* isWeaken: [可选],是否弱化行字体置灰显示,除了isWeaken设置为true之外,置灰行数据里要设置__isWeaken为true
|
|
109
|
+
* pageTotal: [可选], 为true表示开启表格末行自动汇总表格列数据,默认为false || searchTotal,当开启时,需要汇总的列需设置属性total为true,当dragSort为true时,该选项失效
|
|
110
|
+
* searchTotal: [可选], 表格汇总数据对象,该属性不为空时pageTotal默认开启,当dragSort为true时,该选项失效
|
|
111
111
|
*/
|
|
112
112
|
|
|
113
113
|
var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
@@ -605,24 +605,24 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
605
605
|
isWeaken = _this$props6$isWeaken === void 0 ? true : _this$props6$isWeaken;
|
|
606
606
|
|
|
607
607
|
var rowClassName1 = function rowClassName1(record) {
|
|
608
|
-
if (items[record.key].__total) return
|
|
609
|
-
if (items[record.key].__warningRow) return
|
|
610
|
-
return _includesInstanceProperty(checkedRows).call(checkedRows, record.key) ?
|
|
608
|
+
if (items[record.key].__total) return variables('SuperTable').totalRow;
|
|
609
|
+
if (items[record.key].__warningRow) return variables('SuperTable').warningRow;
|
|
610
|
+
return _includesInstanceProperty(checkedRows).call(checkedRows, record.key) ? variables('SuperTable').select : '';
|
|
611
611
|
};
|
|
612
612
|
|
|
613
613
|
var rowClassName2 = function rowClassName2(record) {
|
|
614
|
-
if (items[record.key].__total) return
|
|
615
|
-
if (items[record.key].__warningRow) return
|
|
614
|
+
if (items[record.key].__total) return variables('SuperTable').totalRow;
|
|
615
|
+
if (items[record.key].__warningRow) return variables('SuperTable').warningRow;
|
|
616
616
|
|
|
617
617
|
if (isEmphasized && items[record.key].__isEmphasized) {
|
|
618
|
-
return items[record.key].checked ?
|
|
618
|
+
return items[record.key].checked ? variables('SuperTable').emphasizedSelectRow : variables('SuperTable').emphasizedUnselectRow;
|
|
619
619
|
}
|
|
620
620
|
|
|
621
621
|
if (isWeaken && items[record.key].__isWeaken) {
|
|
622
|
-
return items[record.key].checked ?
|
|
622
|
+
return items[record.key].checked ? variables('SuperTable').weakenedSelectRow : variables('SuperTable').weakenedUnselectRow;
|
|
623
623
|
}
|
|
624
624
|
|
|
625
|
-
return items[record.key].checked ?
|
|
625
|
+
return items[record.key].checked ? variables('SuperTable').select : '';
|
|
626
626
|
};
|
|
627
627
|
|
|
628
628
|
if (checkbox) {
|