fan-standard-comp 3.1.4 → 3.1.6
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/dist/f26952c118ab6cdcd23dc0028ee98c11.svg +173 -0
- package/dist/fan-standard-comp.umd.js +597 -0
- package/dist/fonts/iconfont.eot +0 -0
- package/dist/fonts/iconfont.ttf +0 -0
- package/dist/fonts/iconfont.woff +0 -0
- package/es/ButtonGroup/ButtonList.d.ts +2 -0
- package/es/ButtonGroup/ButtonList.js +37 -0
- package/es/ButtonGroup/ButtonMenu.d.ts +2 -0
- package/es/ButtonGroup/ButtonMenu.js +38 -0
- package/es/ButtonGroup/PopConfirmTitle.d.ts +9 -0
- package/es/ButtonGroup/PopConfirmTitle.js +37 -0
- package/es/ButtonGroup/index.d.ts +30 -0
- package/es/ButtonGroup/index.js +374 -0
- package/es/ButtonGroup/style/index.less +36 -0
- package/es/DragContent/DragBar.js +21 -0
- package/es/DragContent/index.d.ts +14 -0
- package/es/DragContent/index.js +173 -0
- package/es/DragContent/index.less +44 -0
- package/es/FormComp/ChunkUploader/api.js +76 -0
- package/es/FormComp/ChunkUploader/index.js +391 -0
- package/es/FormComp/ChunkUploader/lib.js +96 -0
- package/es/FormComp/ChunkUploader/style/style.less +3 -0
- package/es/FormComp/ChunkUploader/upload-queue.class.js +167 -0
- package/es/FormComp/ChunkUploader/worker.js +23 -0
- package/es/FormComp/EditButton/index.d.ts +26 -0
- package/es/FormComp/EditButton/index.js +140 -0
- package/es/FormComp/FieldComponent/ReUpload.d.ts +3 -0
- package/es/FormComp/FieldComponent/ReUpload.js +131 -0
- package/es/FormComp/FieldComponent/RefactorTreeSelect.js +251 -0
- package/es/FormComp/FieldComponent/TitleNode.d.ts +6 -0
- package/es/FormComp/FieldComponent/TitleNode.js +9 -0
- package/es/FormComp/FieldComponent/index.d.ts +38 -0
- package/es/FormComp/FieldComponent/index.js +413 -0
- package/es/FormComp/FieldComponent/setReadonlyValues.js +236 -0
- package/es/FormComp/FieldComponent/style/index.less +120 -0
- package/es/FormComp/RenderItemGroup/index.d.ts +37 -0
- package/es/FormComp/RenderItemGroup/index.js +234 -0
- package/es/FormComp/Uploader/index.d.ts +21 -0
- package/es/FormComp/Uploader/index.js +277 -0
- package/es/FormComp/Uploader/style/index.less +14 -0
- package/es/FormComp/Uploader/util.d.ts +8 -0
- package/es/FormComp/Uploader/util.js +38 -0
- package/es/FormComp/VarTemplate/index.js +293 -0
- package/es/FormComp/index.d.ts +1 -0
- package/es/FormComp/index.js +1 -0
- package/es/NavLeafScroll/index.js +379 -0
- package/es/NavLeafScroll/style/index.less +119 -0
- package/es/RefactorTree/data.d.ts +7 -0
- package/es/RefactorTree/index.d.ts +40 -0
- package/es/RefactorTree/index.js +167 -0
- package/es/RefactorTree/indexTreeNode.d.ts +39 -0
- package/es/RefactorTree/indexTreeNode.js +237 -0
- package/es/RefactorTree/style/index.d.ts +1 -0
- package/es/RefactorTree/style/index.js +1 -0
- package/es/RefactorTree/style/index.less +22 -0
- package/es/RefactorTree/util.d.ts +42 -0
- package/es/RefactorTree/util.js +187 -0
- package/es/SpecIcon/fonts/demo.css +539 -0
- package/es/SpecIcon/fonts/demo_index.html +1315 -0
- package/es/SpecIcon/fonts/iconfont.css +211 -0
- package/es/SpecIcon/fonts/iconfont.eot +0 -0
- package/es/SpecIcon/fonts/iconfont.js +41 -0
- package/es/SpecIcon/fonts/iconfont.json +352 -0
- package/es/SpecIcon/fonts/iconfont.svg +173 -0
- package/es/SpecIcon/fonts/iconfont.ttf +0 -0
- package/es/SpecIcon/fonts/iconfont.woff +0 -0
- package/es/SpecIcon/fonts/iconfont.woff2 +0 -0
- package/es/SpecIcon/index.d.ts +17 -0
- package/es/SpecIcon/index.js +77 -0
- package/es/SpecIcon/style/iconfont.less +213 -0
- package/es/SpecIcon/style/index.less +98 -0
- package/es/SplitterLayout/Pane.d.ts +13 -0
- package/es/SplitterLayout/Pane.js +36 -0
- package/es/SplitterLayout/index.js +375 -0
- package/es/SplitterLayout/index.less +58 -0
- package/es/StandardContent/SplitterLayout/Pane.js +50 -0
- package/es/StandardContent/SplitterLayout/index.js +374 -0
- package/es/StandardContent/SplitterLayout/index.less +58 -0
- package/es/StandardContent/SubfieldContent.d.ts +17 -0
- package/es/StandardContent/SubfieldContent.js +41 -0
- package/es/StandardContent/WrapperContent.d.ts +13 -0
- package/es/StandardContent/WrapperContent.js +29 -0
- package/es/StandardContent/data.d.ts +101 -0
- package/es/StandardContent/style/index.less +80 -0
- package/es/StandardDragModal/index.d.ts +11 -0
- package/es/StandardDragModal/index.js +30 -0
- package/es/StandardFilter/index.d.ts +35 -0
- package/es/StandardFilter/index.js +253 -0
- package/es/StandardFilter/style/index.less +62 -0
- package/es/StandardForm/ActionList.js +44 -0
- package/es/StandardForm/StepForm.d.ts +19 -0
- package/es/StandardForm/StepForm.js +267 -0
- package/es/StandardForm/TabForm.d.ts +19 -0
- package/es/StandardForm/TabForm.js +122 -0
- package/es/StandardForm/index.d.ts +32 -0
- package/es/StandardForm/index.js +170 -0
- package/es/StandardForm/style/index.less +58 -0
- package/es/StandardModal/UpdateFormRef.js +18 -0
- package/es/StandardModal/index.d.ts +44 -0
- package/es/StandardModal/index.js +495 -0
- package/es/StandardModal/style/index.less +50 -0
- package/es/StandardPanel/index.d.ts +28 -0
- package/es/StandardPanel/index.js +134 -0
- package/es/StandardPanel/style/index.less +135 -0
- package/es/StandardTable/index.d.ts +22 -0
- package/es/StandardTable/index.js +126 -0
- package/es/StandardTable/style/index.d.ts +1 -0
- package/es/StandardTable/style/index.js +1 -0
- package/es/StandardTable/style/index.less +206 -0
- package/es/components/IconNode/index.d.ts +16 -0
- package/es/components/IconNode/index.js +28 -0
- package/es/components/index.d.ts +2 -0
- package/es/components/index.js +2 -0
- package/es/data/func.code.js +112 -0
- package/es/data/general.config.js +172 -0
- package/es/data/index.js +3 -0
- package/es/index.d.ts +24 -0
- package/es/index.js +31 -0
- package/es/styles/index.less +0 -0
- package/es/theme/spec-variable.less +48 -0
- package/es/utils/ValueFormat.js +50 -0
- package/es/utils/filterPermission.js +111 -0
- package/es/utils/getParentNodes.js +215 -0
- package/es/utils/index.js +3 -0
- package/lib/ButtonGroup/ButtonList.d.ts +2 -0
- package/lib/ButtonGroup/ButtonList.js +55 -0
- package/lib/ButtonGroup/ButtonMenu.d.ts +2 -0
- package/lib/ButtonGroup/ButtonMenu.js +51 -0
- package/lib/ButtonGroup/PopConfirmTitle.d.ts +9 -0
- package/lib/ButtonGroup/PopConfirmTitle.js +48 -0
- package/lib/ButtonGroup/index.d.ts +30 -0
- package/lib/ButtonGroup/index.js +405 -0
- package/lib/ButtonGroup/style/index.less +36 -0
- package/lib/DragContent/DragBar.js +33 -0
- package/lib/DragContent/index.d.ts +14 -0
- package/lib/DragContent/index.js +191 -0
- package/lib/DragContent/index.less +44 -0
- package/lib/FormComp/ChunkUploader/api.js +89 -0
- package/lib/FormComp/ChunkUploader/index.js +410 -0
- package/lib/FormComp/ChunkUploader/lib.js +113 -0
- package/lib/FormComp/ChunkUploader/style/style.less +3 -0
- package/lib/FormComp/ChunkUploader/upload-queue.class.js +174 -0
- package/lib/FormComp/ChunkUploader/worker.js +28 -0
- package/lib/FormComp/EditButton/index.d.ts +26 -0
- package/lib/FormComp/EditButton/index.js +159 -0
- package/lib/FormComp/FieldComponent/ReUpload.d.ts +3 -0
- package/lib/FormComp/FieldComponent/ReUpload.js +151 -0
- package/lib/FormComp/FieldComponent/RefactorTreeSelect.js +274 -0
- package/lib/FormComp/FieldComponent/TitleNode.d.ts +6 -0
- package/lib/FormComp/FieldComponent/TitleNode.js +19 -0
- package/lib/FormComp/FieldComponent/index.d.ts +38 -0
- package/lib/FormComp/FieldComponent/index.js +457 -0
- package/lib/FormComp/FieldComponent/setReadonlyValues.js +263 -0
- package/lib/FormComp/FieldComponent/style/index.less +120 -0
- package/lib/FormComp/RenderItemGroup/index.d.ts +37 -0
- package/lib/FormComp/RenderItemGroup/index.js +255 -0
- package/lib/FormComp/Uploader/index.d.ts +21 -0
- package/lib/FormComp/Uploader/index.js +303 -0
- package/lib/FormComp/Uploader/style/index.less +14 -0
- package/lib/FormComp/Uploader/util.d.ts +8 -0
- package/lib/FormComp/Uploader/util.js +47 -0
- package/lib/FormComp/VarTemplate/index.js +308 -0
- package/lib/FormComp/index.d.ts +1 -0
- package/lib/FormComp/index.js +15 -0
- package/lib/NavLeafScroll/index.js +397 -0
- package/lib/NavLeafScroll/style/index.less +119 -0
- package/lib/RefactorTree/data.d.ts +7 -0
- package/lib/RefactorTree/index.d.ts +40 -0
- package/lib/RefactorTree/index.js +190 -0
- package/lib/RefactorTree/indexTreeNode.d.ts +39 -0
- package/lib/RefactorTree/indexTreeNode.js +260 -0
- package/lib/RefactorTree/style/index.d.ts +1 -0
- package/lib/RefactorTree/style/index.js +3 -0
- package/lib/RefactorTree/style/index.less +22 -0
- package/lib/RefactorTree/util.d.ts +42 -0
- package/lib/RefactorTree/util.js +195 -0
- package/lib/SpecIcon/fonts/demo.css +539 -0
- package/lib/SpecIcon/fonts/demo_index.html +1315 -0
- package/lib/SpecIcon/fonts/iconfont.css +211 -0
- package/lib/SpecIcon/fonts/iconfont.eot +0 -0
- package/lib/SpecIcon/fonts/iconfont.js +43 -0
- package/lib/SpecIcon/fonts/iconfont.json +352 -0
- package/lib/SpecIcon/fonts/iconfont.svg +173 -0
- package/lib/SpecIcon/fonts/iconfont.ttf +0 -0
- package/lib/SpecIcon/fonts/iconfont.woff +0 -0
- package/lib/SpecIcon/fonts/iconfont.woff2 +0 -0
- package/lib/SpecIcon/index.d.ts +17 -0
- package/lib/SpecIcon/index.js +90 -0
- package/lib/SpecIcon/style/iconfont.less +213 -0
- package/lib/SpecIcon/style/index.less +98 -0
- package/lib/SplitterLayout/Pane.d.ts +13 -0
- package/lib/SplitterLayout/Pane.js +48 -0
- package/lib/SplitterLayout/index.js +386 -0
- package/lib/SplitterLayout/index.less +58 -0
- package/lib/StandardContent/SplitterLayout/Pane.js +62 -0
- package/lib/StandardContent/SplitterLayout/index.js +387 -0
- package/lib/StandardContent/SplitterLayout/index.less +58 -0
- package/lib/StandardContent/SubfieldContent.d.ts +17 -0
- package/lib/StandardContent/SubfieldContent.js +56 -0
- package/lib/StandardContent/WrapperContent.d.ts +13 -0
- package/lib/StandardContent/WrapperContent.js +43 -0
- package/lib/StandardContent/data.d.ts +101 -0
- package/lib/StandardContent/style/index.less +80 -0
- package/lib/StandardDragModal/index.d.ts +11 -0
- package/lib/StandardDragModal/index.js +43 -0
- package/lib/StandardFilter/index.d.ts +35 -0
- package/lib/StandardFilter/index.js +272 -0
- package/lib/StandardFilter/style/index.less +62 -0
- package/lib/StandardForm/ActionList.js +57 -0
- package/lib/StandardForm/StepForm.d.ts +19 -0
- package/lib/StandardForm/StepForm.js +295 -0
- package/lib/StandardForm/TabForm.d.ts +19 -0
- package/lib/StandardForm/TabForm.js +148 -0
- package/lib/StandardForm/index.d.ts +32 -0
- package/lib/StandardForm/index.js +197 -0
- package/lib/StandardForm/style/index.less +58 -0
- package/lib/StandardModal/UpdateFormRef.js +32 -0
- package/lib/StandardModal/index.d.ts +44 -0
- package/lib/StandardModal/index.js +525 -0
- package/lib/StandardModal/style/index.less +50 -0
- package/lib/StandardPanel/index.d.ts +28 -0
- package/lib/StandardPanel/index.js +155 -0
- package/lib/StandardPanel/style/index.less +135 -0
- package/lib/StandardTable/index.d.ts +22 -0
- package/lib/StandardTable/index.js +143 -0
- package/lib/StandardTable/style/index.d.ts +1 -0
- package/lib/StandardTable/style/index.js +3 -0
- package/lib/StandardTable/style/index.less +206 -0
- package/lib/components/IconNode/index.d.ts +16 -0
- package/lib/components/IconNode/index.js +39 -0
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.js +15 -0
- package/lib/data/func.code.js +119 -0
- package/lib/data/general.config.js +179 -0
- package/lib/data/index.js +23 -0
- package/lib/index.d.ts +24 -0
- package/lib/index.js +236 -0
- package/lib/styles/index.less +0 -0
- package/lib/theme/spec-variable.less +48 -0
- package/lib/utils/ValueFormat.js +58 -0
- package/lib/utils/filterPermission.js +127 -0
- package/lib/utils/getParentNodes.js +226 -0
- package/lib/utils/index.js +35 -0
- package/package.json +1 -1
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
require("antd/es/popover/style");
|
|
11
|
+
|
|
12
|
+
var _popover = _interopRequireDefault(require("antd/es/popover"));
|
|
13
|
+
|
|
14
|
+
require("antd/es/radio/style");
|
|
15
|
+
|
|
16
|
+
var _radio = _interopRequireDefault(require("antd/es/radio"));
|
|
17
|
+
|
|
18
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
19
|
+
|
|
20
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
21
|
+
|
|
22
|
+
require("./style/index.less");
|
|
23
|
+
|
|
24
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
25
|
+
|
|
26
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
+
|
|
28
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
|
+
|
|
30
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
31
|
+
|
|
32
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
33
|
+
|
|
34
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
35
|
+
|
|
36
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
37
|
+
|
|
38
|
+
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
39
|
+
|
|
40
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
|
+
|
|
42
|
+
var StandardPanel = function StandardPanel(props) {
|
|
43
|
+
var className = props.className,
|
|
44
|
+
style = props.style,
|
|
45
|
+
height = props.height,
|
|
46
|
+
children = props.children,
|
|
47
|
+
title = props.title,
|
|
48
|
+
badges = props.badges,
|
|
49
|
+
cateConfig = props.cateConfig,
|
|
50
|
+
buttonConfig = props.buttonConfig,
|
|
51
|
+
type = props.type,
|
|
52
|
+
postfix = props.postfix;
|
|
53
|
+
|
|
54
|
+
var _useState = (0, _react.useState)(56),
|
|
55
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
56
|
+
headerHeight = _useState2[0],
|
|
57
|
+
setHeaderHeight = _useState2[1];
|
|
58
|
+
|
|
59
|
+
var RenderGroupList = function RenderGroupList(values) {
|
|
60
|
+
var list = values.list,
|
|
61
|
+
activeKey = values.activeKey,
|
|
62
|
+
onChange = values.onChange,
|
|
63
|
+
className = values.className,
|
|
64
|
+
size = values.size;
|
|
65
|
+
|
|
66
|
+
var handleChange = function handleChange(e) {
|
|
67
|
+
if (onChange) {
|
|
68
|
+
onChange(e.target.value, list.filter(function (data) {
|
|
69
|
+
return data.value === e.target.value;
|
|
70
|
+
})[0]);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
75
|
+
className: className
|
|
76
|
+
}, /*#__PURE__*/_react.default.createElement(_radio.default.Group, {
|
|
77
|
+
size: size,
|
|
78
|
+
defaultValue: activeKey,
|
|
79
|
+
buttonStyle: "solid",
|
|
80
|
+
onChange: function onChange(e) {
|
|
81
|
+
return handleChange(e);
|
|
82
|
+
}
|
|
83
|
+
}, list && Array.isArray(list) && list.map(function (item) {
|
|
84
|
+
return /*#__PURE__*/_react.default.createElement(_radio.default.Button, {
|
|
85
|
+
key: item.value,
|
|
86
|
+
value: item.value
|
|
87
|
+
}, item.label);
|
|
88
|
+
})));
|
|
89
|
+
}; // 是否显示提示框
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
var popoverShow = function popoverShow() {
|
|
93
|
+
return title.content ? /*#__PURE__*/_react.default.createElement(_popover.default, {
|
|
94
|
+
content: title.content,
|
|
95
|
+
placement: title.placement
|
|
96
|
+
}, " ", title.label, " ") : title;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
var panelHeaderRef = (0, _react.useRef)();
|
|
100
|
+
var bodyLimitStyle = (0, _react.useMemo)(function () {
|
|
101
|
+
if (height) {
|
|
102
|
+
return {
|
|
103
|
+
overflow: 'auto',
|
|
104
|
+
height: "".concat(height - headerHeight, "px")
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return {};
|
|
109
|
+
}, [height, headerHeight]);
|
|
110
|
+
(0, _react.useEffect)(function () {
|
|
111
|
+
if (panelHeaderRef && panelHeaderRef.current) {
|
|
112
|
+
setHeaderHeight(panelHeaderRef.current.clientHeight);
|
|
113
|
+
}
|
|
114
|
+
}, [panelHeaderRef]);
|
|
115
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
116
|
+
className: (0, _classnames.default)('spec-panel', className, type === 'reverse' ? 'spec-panel-reverse' : '', type === 'border' ? 'spec-panel-border' : ''),
|
|
117
|
+
style: Object.assign(Object.assign({}, style), {
|
|
118
|
+
height: "".concat(height, "px")
|
|
119
|
+
})
|
|
120
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
121
|
+
className: "spec-panel-header",
|
|
122
|
+
ref: panelHeaderRef
|
|
123
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
124
|
+
className: "spec-panel-title"
|
|
125
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
126
|
+
className: (0, _classnames.default)(type === 'border' ? 'sub-header-line' : 'sub-header-base')
|
|
127
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
128
|
+
className: "header-text"
|
|
129
|
+
}, popoverShow()))), /*#__PURE__*/_react.default.createElement("div", {
|
|
130
|
+
className: "spec-panel-inner"
|
|
131
|
+
}, badges && Array.isArray(badges) && /*#__PURE__*/_react.default.createElement("span", {
|
|
132
|
+
className: "badges"
|
|
133
|
+
}, badges.map(function (item) {
|
|
134
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
135
|
+
className: "badges-item",
|
|
136
|
+
key: item.value
|
|
137
|
+
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
138
|
+
style: item.color ? {
|
|
139
|
+
background: item.color
|
|
140
|
+
} : {}
|
|
141
|
+
}), item.label);
|
|
142
|
+
}))), cateConfig && /*#__PURE__*/_react.default.createElement(RenderGroupList, Object.assign({
|
|
143
|
+
className: "spec-panel-cate"
|
|
144
|
+
}, cateConfig)), buttonConfig && /*#__PURE__*/_react.default.createElement(RenderGroupList, Object.assign({
|
|
145
|
+
className: "spec-panel-buttons"
|
|
146
|
+
}, buttonConfig)), postfix && /*#__PURE__*/_react.default.createElement("div", {
|
|
147
|
+
className: "spec-panel-extra"
|
|
148
|
+
}, postfix)), /*#__PURE__*/_react.default.createElement("div", {
|
|
149
|
+
className: "spec-panel-body",
|
|
150
|
+
style: Object.assign({}, bodyLimitStyle)
|
|
151
|
+
}, children));
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
var _default = StandardPanel;
|
|
155
|
+
exports.default = _default;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
@root-entry-name: default;
|
|
2
|
+
@import (reference) '~antd/es/style/themes/index';
|
|
3
|
+
@import '../../theme/spec-variable.less';
|
|
4
|
+
.spec-panel {
|
|
5
|
+
margin-bottom: @padding-md;
|
|
6
|
+
background: @layout-body-background;
|
|
7
|
+
border-radius: 4px;
|
|
8
|
+
box-shadow: @spec-box-shadow;
|
|
9
|
+
&.spec-panel-border {
|
|
10
|
+
box-shadow: none;
|
|
11
|
+
.spec-panel-header {
|
|
12
|
+
height: 32px;
|
|
13
|
+
padding:0;
|
|
14
|
+
line-height: 32px;
|
|
15
|
+
.spec-panel-title {
|
|
16
|
+
width: 100%;
|
|
17
|
+
padding: 0;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
.spec-panel-body {
|
|
21
|
+
padding: @padding-md;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
&.spec-panel-reverse {
|
|
25
|
+
.spec-panel-header {
|
|
26
|
+
height: 32px;
|
|
27
|
+
padding:0 @padding-md;
|
|
28
|
+
line-height: 32px;
|
|
29
|
+
background: @table-header-bg;
|
|
30
|
+
border-top-left-radius: 4px;
|
|
31
|
+
border-top-right-radius: 4px;
|
|
32
|
+
}
|
|
33
|
+
.spec-panel-body {
|
|
34
|
+
padding: @padding-md;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
.sub-header-base{
|
|
39
|
+
color: @text-color;
|
|
40
|
+
font-size: @font-size-lg;
|
|
41
|
+
}
|
|
42
|
+
.spec-panel-header {
|
|
43
|
+
display: flex;
|
|
44
|
+
padding: 12px @padding-md;
|
|
45
|
+
line-height: 32px;
|
|
46
|
+
.spec-panel-title {
|
|
47
|
+
padding-right: @padding-md
|
|
48
|
+
}
|
|
49
|
+
.spec-panel-inner {
|
|
50
|
+
flex: 1;
|
|
51
|
+
}
|
|
52
|
+
.badges {
|
|
53
|
+
display: inline-block;
|
|
54
|
+
height: 20px;
|
|
55
|
+
//margin-top: 6px;
|
|
56
|
+
padding-left: 80px;
|
|
57
|
+
line-height: 20px;
|
|
58
|
+
vertical-align: middle;
|
|
59
|
+
.badges-item {
|
|
60
|
+
position: relative;
|
|
61
|
+
margin-right: @padding-md;
|
|
62
|
+
padding-left: 20px;
|
|
63
|
+
color: @text-color-secondary;
|
|
64
|
+
i {
|
|
65
|
+
position: absolute;
|
|
66
|
+
top: 50%;
|
|
67
|
+
left:0;
|
|
68
|
+
display: inline-block;
|
|
69
|
+
width: 14px;
|
|
70
|
+
height: 14px;
|
|
71
|
+
border-radius: 4px;
|
|
72
|
+
transform: translate(0, -50%);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
.spec-panel-cate {
|
|
77
|
+
.ant-radio-button-wrapper{
|
|
78
|
+
//min-width: 68px;
|
|
79
|
+
margin-left: @padding-sm;
|
|
80
|
+
text-align: center;
|
|
81
|
+
border: 0;
|
|
82
|
+
border-bottom: 2px solid transparent;
|
|
83
|
+
border-radius: 0;
|
|
84
|
+
&::before {
|
|
85
|
+
display: none;
|
|
86
|
+
}
|
|
87
|
+
&:active,
|
|
88
|
+
&:visited,
|
|
89
|
+
&:focus {
|
|
90
|
+
box-shadow: none;
|
|
91
|
+
}
|
|
92
|
+
&:focus-within {
|
|
93
|
+
outline: none;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled){
|
|
97
|
+
color:@primary-color;
|
|
98
|
+
background: none;
|
|
99
|
+
border-color: @primary-color;
|
|
100
|
+
box-shadow: none;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
+ .spec-panel-buttons {
|
|
104
|
+
margin-left: 80px;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
.spec-panel-buttons {
|
|
108
|
+
.ant-radio-button-wrapper{
|
|
109
|
+
//min-width: 68px;
|
|
110
|
+
margin-left: @padding-sm;
|
|
111
|
+
text-align: center;
|
|
112
|
+
border-left: 1px solid @border-color-base;
|
|
113
|
+
border-radius: 4px;
|
|
114
|
+
&::before {
|
|
115
|
+
display: none;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled){
|
|
119
|
+
border-color: @primary-color;
|
|
120
|
+
box-shadow: none;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
.spec-panel-extra{
|
|
124
|
+
margin-left: @padding-sm;
|
|
125
|
+
.anticon, .specfont, .specicon {
|
|
126
|
+
margin-left: @padding-xs;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
.spec-panel-body {
|
|
131
|
+
padding: 0 @padding-md @padding-md;
|
|
132
|
+
color: @text-color;
|
|
133
|
+
.spec-scrollbar();
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import './style/index.less';
|
|
3
|
+
interface StandardTableDataProps {
|
|
4
|
+
list?: object[];
|
|
5
|
+
pagination?: any;
|
|
6
|
+
}
|
|
7
|
+
interface StandardTableProps {
|
|
8
|
+
columns?: any[];
|
|
9
|
+
data: StandardTableDataProps;
|
|
10
|
+
rowKey?: string;
|
|
11
|
+
onChange?: (pageConfig?: any) => void;
|
|
12
|
+
hideOrderNumber?: boolean;
|
|
13
|
+
emptyText?: string;
|
|
14
|
+
codes?: object[];
|
|
15
|
+
permissionCodes?: string[];
|
|
16
|
+
className?: string;
|
|
17
|
+
rowSelection?: any;
|
|
18
|
+
orderNumber?: object;
|
|
19
|
+
[k: string]: any;
|
|
20
|
+
}
|
|
21
|
+
declare const StandardTable: FC<StandardTableProps>;
|
|
22
|
+
export default StandardTable;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
require("antd/es/table/style");
|
|
9
|
+
|
|
10
|
+
var _table = _interopRequireDefault(require("antd/es/table"));
|
|
11
|
+
|
|
12
|
+
require("antd/es/card/style");
|
|
13
|
+
|
|
14
|
+
var _card = _interopRequireDefault(require("antd/es/card"));
|
|
15
|
+
|
|
16
|
+
var _tslib = require("tslib");
|
|
17
|
+
|
|
18
|
+
var _react = _interopRequireDefault(require("react"));
|
|
19
|
+
|
|
20
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
21
|
+
|
|
22
|
+
var _index = _interopRequireDefault(require("../ButtonGroup/index"));
|
|
23
|
+
|
|
24
|
+
require("./style/index.less");
|
|
25
|
+
|
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
|
+
|
|
28
|
+
var StandardTable = function StandardTable(props) {
|
|
29
|
+
// const ref= React.createRef<Card>();
|
|
30
|
+
var _props$data = props.data,
|
|
31
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
32
|
+
rowKey = props.rowKey,
|
|
33
|
+
rowSelection = props.rowSelection,
|
|
34
|
+
columns = props.columns,
|
|
35
|
+
hideOrderNumber = props.hideOrderNumber,
|
|
36
|
+
_props$orderNumber = props.orderNumber,
|
|
37
|
+
orderNumber = _props$orderNumber === void 0 ? {} : _props$orderNumber,
|
|
38
|
+
className = props.className,
|
|
39
|
+
emptyText = props.emptyText,
|
|
40
|
+
codes = props.codes,
|
|
41
|
+
permissionCodes = props.permissionCodes,
|
|
42
|
+
rest = (0, _tslib.__rest)(props, ["data", "rowKey", "rowSelection", "columns", "hideOrderNumber", "orderNumber", "className", "emptyText", "codes", "permissionCodes"]); // 加上类型修复 TS:2322 报警
|
|
43
|
+
|
|
44
|
+
var resetColumns = [Object.assign({
|
|
45
|
+
width: 58,
|
|
46
|
+
align: 'center',
|
|
47
|
+
title: '序号',
|
|
48
|
+
key: 'orderNum',
|
|
49
|
+
// fixed: 'left',
|
|
50
|
+
// render: (text, o, index) => pagination ? (pagination.current - 1) * pagination.pageSize + index + 1 : index + 1,
|
|
51
|
+
render: function render(text, record, index) {
|
|
52
|
+
return index + 1;
|
|
53
|
+
}
|
|
54
|
+
}, orderNumber)];
|
|
55
|
+
var _data$list = data.list,
|
|
56
|
+
list = _data$list === void 0 ? [] : _data$list,
|
|
57
|
+
pagination = data.pagination;
|
|
58
|
+
var paginationProps = Object.assign({
|
|
59
|
+
// showQuickJumper: true,
|
|
60
|
+
className: 'spec-pagination',
|
|
61
|
+
showSizeChanger: true,
|
|
62
|
+
pageSizeOptions: ['5', '10', '15', '20', '30', '50'],
|
|
63
|
+
showTotal: function showTotal(total, range) {
|
|
64
|
+
return "".concat(range[0], "-").concat(range[1], "\u6761 \u5171").concat(total, "\u6761");
|
|
65
|
+
}
|
|
66
|
+
}, pagination);
|
|
67
|
+
|
|
68
|
+
if (columns) {
|
|
69
|
+
columns.map(function (colItem) {
|
|
70
|
+
if (colItem.type === 'action') {
|
|
71
|
+
colItem.width = colItem.width || (colItem.buttonGroup.length > 1 ? 120 : 80);
|
|
72
|
+
colItem.align = 'center';
|
|
73
|
+
colItem.title = colItem.title || '操作';
|
|
74
|
+
colItem.key = 'control'; // colItem.fixed = colItem.fixed || 'right'
|
|
75
|
+
|
|
76
|
+
colItem.render = function (text, record, rowIndex) {
|
|
77
|
+
// 按钮列表组
|
|
78
|
+
var renderTableButtonGroup = function renderTableButtonGroup(buttonGroup) {
|
|
79
|
+
if (!buttonGroup) return '-';
|
|
80
|
+
var recombinationGroup = []; // 重组数据
|
|
81
|
+
// 类型为数组
|
|
82
|
+
|
|
83
|
+
if (Array.isArray(buttonGroup)) recombinationGroup = buttonGroup; // 类型为方法
|
|
84
|
+
|
|
85
|
+
if (typeof buttonGroup === 'function') recombinationGroup = buttonGroup(text, record, rowIndex); // 方法返回数组结构
|
|
86
|
+
// 判断是否是数组且长度大于0时 ?{如下结构渲染} : {按buttonGroup返回的node渲染}
|
|
87
|
+
|
|
88
|
+
if (Array.isArray(buttonGroup) || typeof buttonGroup === 'function') {
|
|
89
|
+
if (recombinationGroup.length === 0) return '-';
|
|
90
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
91
|
+
type: "text",
|
|
92
|
+
min: colItem.min || 2,
|
|
93
|
+
options: recombinationGroup,
|
|
94
|
+
codes: codes,
|
|
95
|
+
permissionCodes: permissionCodes,
|
|
96
|
+
rowParams: {
|
|
97
|
+
text: text,
|
|
98
|
+
record: record,
|
|
99
|
+
rowIndex: rowIndex
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
} else {
|
|
103
|
+
return buttonGroup;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, renderTableButtonGroup(colItem.buttonGroup));
|
|
108
|
+
};
|
|
109
|
+
} else if (!colItem.render) {
|
|
110
|
+
// 若未配置render,则给加个默认的返回方法
|
|
111
|
+
colItem.render = function (text, record, rowIndex) {
|
|
112
|
+
return text || text === 0 ? text : '-';
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
return colItem;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return colItem;
|
|
119
|
+
});
|
|
120
|
+
resetColumns = hideOrderNumber ? columns : resetColumns.concat(columns);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return /*#__PURE__*/_react.default.createElement(_card.default, {
|
|
124
|
+
className: (0, _classnames.default)('standard-table', className),
|
|
125
|
+
bordered: false
|
|
126
|
+
}, /*#__PURE__*/_react.default.createElement(_table.default, Object.assign({
|
|
127
|
+
rowKey: rowKey || 'id',
|
|
128
|
+
rowSelection: rowSelection ? Object.assign(Object.assign({}, rowSelection), {
|
|
129
|
+
columnWidth: 30
|
|
130
|
+
}) : rowSelection,
|
|
131
|
+
dataSource: list,
|
|
132
|
+
pagination: !pagination ? false : paginationProps,
|
|
133
|
+
columns: resetColumns,
|
|
134
|
+
locale: {
|
|
135
|
+
filterConfirm: '确定',
|
|
136
|
+
filterReset: '重置',
|
|
137
|
+
emptyText: emptyText || '暂无数据'
|
|
138
|
+
}
|
|
139
|
+
}, rest)));
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
var _default = StandardTable;
|
|
143
|
+
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.less';
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
@root-entry-name: default;
|
|
2
|
+
@import (reference) '~antd/es/style/themes/index';
|
|
3
|
+
@import '../../theme/spec-variable.less';
|
|
4
|
+
|
|
5
|
+
@spec-card-padding: @padding-xs;
|
|
6
|
+
@spec-card-background: @background-color-base;
|
|
7
|
+
@spec-table-hover-border-color: fade(@primary-color, 50%);
|
|
8
|
+
.standard-table {
|
|
9
|
+
.ant-table-middle ~ .ant-table-pagination {
|
|
10
|
+
margin-top: 8px;
|
|
11
|
+
margin-bottom: 0;
|
|
12
|
+
}
|
|
13
|
+
.spec-pagination {
|
|
14
|
+
width: 100%;
|
|
15
|
+
margin-top: 0;
|
|
16
|
+
margin-bottom: 0;
|
|
17
|
+
padding: @padding-sm 0 @padding-xs 0;
|
|
18
|
+
text-align: right;
|
|
19
|
+
background: @spec-card-background;
|
|
20
|
+
border-radius: 0;
|
|
21
|
+
.ant-pagination-total-text {
|
|
22
|
+
float: left;
|
|
23
|
+
}
|
|
24
|
+
.ant-pagination-options-size-changer.ant-select {
|
|
25
|
+
margin-right: 0
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
.ant-card-body {
|
|
29
|
+
padding: 0;
|
|
30
|
+
background: transparent;
|
|
31
|
+
//padding: @spec-card-padding;
|
|
32
|
+
//background: @spec-card-background;
|
|
33
|
+
}
|
|
34
|
+
.ant-table-tbody {
|
|
35
|
+
background: transparent;
|
|
36
|
+
}
|
|
37
|
+
.ant-table-fixed-left .ant-table-thead > tr > th:first-child {
|
|
38
|
+
padding: 0;
|
|
39
|
+
}
|
|
40
|
+
//&.ant-card {
|
|
41
|
+
// background: transparent;
|
|
42
|
+
//}
|
|
43
|
+
.ant-table-body {
|
|
44
|
+
.spec-scrollbar-base()
|
|
45
|
+
}
|
|
46
|
+
.spec-table-dropdown {
|
|
47
|
+
li a[disabled] {
|
|
48
|
+
color: @disabled-bg;
|
|
49
|
+
cursor: not-allowed;
|
|
50
|
+
pointer-events: none;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ant-form-item-control.has-error .ant-table.ant-table-small {
|
|
56
|
+
border-color: @error-color
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.themeTech {
|
|
60
|
+
.standard-table .spec-pagination {
|
|
61
|
+
background: transparent;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.spec-pagination {
|
|
66
|
+
.ant-pagination-total-text {
|
|
67
|
+
float: left;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.ant-table {
|
|
72
|
+
// 固定左侧列的样式
|
|
73
|
+
.ant-table-fixed-left {
|
|
74
|
+
table.ant-table-fixed {
|
|
75
|
+
.ant-table-thead > tr > th,
|
|
76
|
+
.ant-table-tbody > tr > td {
|
|
77
|
+
&:first-child {
|
|
78
|
+
padding-left: @padding-md;
|
|
79
|
+
padding-right: @padding-md/2;
|
|
80
|
+
}
|
|
81
|
+
padding-right: @padding-md/2;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
// 固定右侧列的样式
|
|
86
|
+
.ant-table-fixed-right {
|
|
87
|
+
table.ant-table-fixed {
|
|
88
|
+
.ant-table-thead > tr > th,
|
|
89
|
+
.ant-table-tbody > tr > td {
|
|
90
|
+
&:first-child {
|
|
91
|
+
padding-left: @padding-md/2;
|
|
92
|
+
}
|
|
93
|
+
&:nth-last-child(1) {
|
|
94
|
+
padding-left: @padding-md/2;
|
|
95
|
+
padding-right: @padding-md;
|
|
96
|
+
}
|
|
97
|
+
padding-right: @padding-md/2;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
table {
|
|
102
|
+
font-size: @font-size-base; // 14px
|
|
103
|
+
//color: #707070;
|
|
104
|
+
> .ant-table-thead {
|
|
105
|
+
> tr > th {
|
|
106
|
+
//color: @text-color;
|
|
107
|
+
font-weight: bold;
|
|
108
|
+
font-size: @font-size-lg;
|
|
109
|
+
border-bottom: 0;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
> .ant-table-expand-icon-th, .ant-table-row-expand-icon-cell {
|
|
113
|
+
}
|
|
114
|
+
.ant-table-thead > tr > th {
|
|
115
|
+
//min-width: 60px;
|
|
116
|
+
//padding: 14px @padding-md/2;
|
|
117
|
+
//&.ant-table-selection-column {
|
|
118
|
+
// width: 15px;
|
|
119
|
+
// height: 15px;
|
|
120
|
+
// color: @primary-color;
|
|
121
|
+
// line-height: 12px;
|
|
122
|
+
// border-color: @primary-color;
|
|
123
|
+
//}
|
|
124
|
+
&:first-child {
|
|
125
|
+
padding-left: @padding-md;
|
|
126
|
+
}
|
|
127
|
+
&:last-child {
|
|
128
|
+
padding-right: @padding-md;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
.ant-table-tbody > tr > td {
|
|
132
|
+
padding: 12px @padding-md/2;
|
|
133
|
+
&:first-child {
|
|
134
|
+
padding-left: @padding-md;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
.ant-table-tbody > tr > td {
|
|
138
|
+
padding: 12px @padding-md/2;
|
|
139
|
+
&:first-child {
|
|
140
|
+
padding-left: @padding-md;
|
|
141
|
+
border-left: 1px solid transparent;
|
|
142
|
+
}
|
|
143
|
+
&:last-child {
|
|
144
|
+
padding-right: @padding-md;
|
|
145
|
+
border-right: 1px solid transparent;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
.ant-table-thead > tr.ant-table-row-hover:not(.ant-table-expanded-row),
|
|
149
|
+
.ant-table-tbody > tr.ant-table-row-hover:not(.ant-table-expanded-row),
|
|
150
|
+
.ant-table-thead > tr:hover:not(.ant-table-expanded-row),
|
|
151
|
+
.ant-table-tbody > tr:hover:not(.ant-table-expanded-row) {
|
|
152
|
+
> td {
|
|
153
|
+
position: relative;
|
|
154
|
+
border-color: @spec-table-hover-border-color;
|
|
155
|
+
&::before {
|
|
156
|
+
position: absolute;
|
|
157
|
+
top: 0;
|
|
158
|
+
left: 0;
|
|
159
|
+
display: inline-block;
|
|
160
|
+
width: 100%;
|
|
161
|
+
border-top: 1px solid @spec-table-hover-border-color;
|
|
162
|
+
content: '';
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
//.ant-table-tbody > tr.ant-table-expanded-row,
|
|
167
|
+
//.ant-table-tbody > tr.ant-table-expanded-row:hover {
|
|
168
|
+
// background: #f9f9fb;
|
|
169
|
+
//}
|
|
170
|
+
.ant-table-expand-icon-th, .ant-table-row-expand-icon-cell {
|
|
171
|
+
width: 40px;
|
|
172
|
+
min-width: 40px !important;
|
|
173
|
+
text-align: center;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
//.ant-table-small > .ant-table-content > .ant-table-body > table > .ant-table-thead > tr > th
|
|
177
|
+
&.ant-table-small {
|
|
178
|
+
> .ant-table-content > .ant-table-body {
|
|
179
|
+
margin: 0;
|
|
180
|
+
> table {
|
|
181
|
+
font-size: 14px;
|
|
182
|
+
> .ant-table-thead {
|
|
183
|
+
> tr > th {
|
|
184
|
+
font-weight: bold;
|
|
185
|
+
font-size: @font-size-base; // 14px
|
|
186
|
+
background: @table-header-bg;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
> .ant-table-thead > tr > th,
|
|
190
|
+
> .ant-table-tbody > tr > td {
|
|
191
|
+
&:first-child {
|
|
192
|
+
padding-left: @table-padding-horizontal;
|
|
193
|
+
}
|
|
194
|
+
&:last-child {
|
|
195
|
+
padding-right: @table-padding-horizontal;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
.ant-empty-normal {
|
|
201
|
+
margin: 0;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* @params { String,Array,ReactNode } icon: 图标支持传值为字符串,
|
|
4
|
+
* @value {String} 当表示为String,单个名称字符串 如'plus' ==> 结果渲染为'speci-plus'
|
|
5
|
+
* 说明1.当数据里面包含','则将区分两个参数,第一个参数代表图标类名前缀,第二个参数代表当前图标类名 ‘speci,plus’ ==> 结果SVG渲染名称为 'speci-plus'
|
|
6
|
+
* 说明2.当数据里面包含','第一个参数为空或者为noPrefix,结构渲染为最后一个作为图标的名称,即',plus'或'noPrefix,plus' ==》 结果SVG渲染名称为 'plus'
|
|
7
|
+
* @value {Array} 当表示为Array时,必须包含两个参数['speci','plus'],
|
|
8
|
+
* 说明1.第一个参数代表图标类名前缀,第二个参数代表当前图标类名 => 结果渲染'speci-plus'
|
|
9
|
+
* 说明2.如果第一个参数为'noPrefix'或空,则将不显示前缀值,即:['', 'spec-plus]或 ['noPrefix', 'spec-plus] => 结果渲染'speci-plus'
|
|
10
|
+
* @value {ReactNode} 当表示为ReactNode时,则直接渲染
|
|
11
|
+
*/
|
|
12
|
+
interface IconNodeProps {
|
|
13
|
+
icon?: string | string[] | React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
declare const IconNode: (props: IconNodeProps) => JSX.Element;
|
|
16
|
+
export default IconNode;
|