fan-standard-comp 4.0.6 → 4.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/dist/fan-standard-comp.min.css +1 -1
- package/dist/fan-standard-comp.min.js +1 -1
- package/es/ButtonGroup/index.d.ts +2 -0
- package/es/ButtonGroup/index.js +31 -18
- package/es/ButtonGroup/styles/index.js +9 -1
- package/es/DragContent/index.js +1 -1
- package/es/DragContent/index.less +2 -3
- package/es/StandardContent/ContentHeader.d.ts +9 -0
- package/es/StandardContent/ContentHeader.js +79 -0
- package/es/StandardContent/SubfieldContent.d.ts +2 -0
- package/es/StandardContent/SubfieldContent.js +47 -20
- package/es/StandardContent/WrapperContent.d.ts +2 -0
- package/es/StandardContent/WrapperContent.js +52 -17
- package/es/StandardContent/styles/Header.d.ts +6 -0
- package/es/StandardContent/styles/Header.js +33 -0
- package/es/StandardContent/styles/Subfield.js +22 -4
- package/es/StandardContent/styles/Wrapper.js +7 -3
- package/es/StandardContent/styles/index.less +11 -11
- package/es/StandardForm/style/index.less +1 -1
- package/es/StandardModal/style/index.js +5 -3
- package/es/StandardModal/style/index.less +5 -5
- package/es/StandardTable/index.js +9 -9
- package/es/StandardTable/style/index.js +1 -1
- package/es/components/IconNode/index.d.ts +1 -0
- package/es/components/IconNode/index.js +6 -3
- package/es/theme/index.js +4 -4
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +3 -1
- package/es/utils/regExp.js +111 -0
- package/lib/ButtonGroup/index.d.ts +2 -0
- package/lib/ButtonGroup/index.js +31 -18
- package/lib/ButtonGroup/styles/index.js +9 -1
- package/lib/DragContent/index.js +1 -1
- package/lib/DragContent/index.less +2 -3
- package/lib/StandardContent/ContentHeader.d.ts +9 -0
- package/lib/StandardContent/ContentHeader.js +89 -0
- package/lib/StandardContent/SubfieldContent.d.ts +2 -0
- package/lib/StandardContent/SubfieldContent.js +49 -20
- package/lib/StandardContent/WrapperContent.d.ts +2 -0
- package/lib/StandardContent/WrapperContent.js +54 -17
- package/lib/StandardContent/styles/Header.d.ts +6 -0
- package/lib/StandardContent/styles/Header.js +39 -0
- package/lib/StandardContent/styles/Subfield.js +22 -4
- package/lib/StandardContent/styles/Wrapper.js +7 -3
- package/lib/StandardContent/styles/index.less +11 -11
- package/lib/StandardForm/style/index.less +1 -1
- package/lib/StandardModal/style/index.js +5 -3
- package/lib/StandardModal/style/index.less +5 -5
- package/lib/StandardTable/index.js +9 -9
- package/lib/StandardTable/style/index.js +1 -1
- package/lib/components/IconNode/index.d.ts +1 -0
- package/lib/components/IconNode/index.js +6 -3
- package/lib/theme/index.js +4 -4
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +11 -0
- package/lib/utils/regExp.js +116 -0
- package/package.json +1 -1
|
@@ -35,6 +35,8 @@ interface ButtonGroupProps {
|
|
|
35
35
|
dropdownConfig?: Object;
|
|
36
36
|
moreText?: string;
|
|
37
37
|
moreIcon?: React.ReactNode | string | number;
|
|
38
|
+
size?: any;
|
|
39
|
+
showTextIcon?: boolean;
|
|
38
40
|
}
|
|
39
41
|
declare const ButtonGroup: (props: ButtonGroupProps) => any;
|
|
40
42
|
export default ButtonGroup;
|
package/es/ButtonGroup/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["code", "fn", "exName", "name", "children", "icon"],
|
|
1
|
+
var _excluded = ["code", "fn", "exName", "name", "children", "icon", "confirmText", "confirmConfig", "render"],
|
|
2
2
|
_excluded2 = ["exName", "name", "type", "icon", "ghost", "danger", "disabled", "loading", "fn", "code", "rowParams", "isHide"],
|
|
3
3
|
_excluded3 = ["code", "fn", "exName", "name", "children", "icon", "confirmText", "confirmConfig"];
|
|
4
4
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
@@ -51,7 +51,11 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
51
51
|
dropdownConfig = _providerConfig$props4 === void 0 ? {} : _providerConfig$props4,
|
|
52
52
|
_providerConfig$props5 = _providerConfig$props.moreText,
|
|
53
53
|
moreText = _providerConfig$props5 === void 0 ? '更多' : _providerConfig$props5,
|
|
54
|
-
|
|
54
|
+
_providerConfig$props6 = _providerConfig$props.size,
|
|
55
|
+
size = _providerConfig$props6 === void 0 ? 'default' : _providerConfig$props6,
|
|
56
|
+
moreIcon = _providerConfig$props.moreIcon,
|
|
57
|
+
_providerConfig$props7 = _providerConfig$props.showTextIcon,
|
|
58
|
+
showTextIcon = _providerConfig$props7 === void 0 ? false : _providerConfig$props7;
|
|
55
59
|
var _props$options = props.options,
|
|
56
60
|
options = _props$options === void 0 ? [] : _props$options,
|
|
57
61
|
_props$min = props.min,
|
|
@@ -87,6 +91,9 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
87
91
|
name = vItem.name,
|
|
88
92
|
children = vItem.children,
|
|
89
93
|
icon = vItem.icon,
|
|
94
|
+
confirmText = vItem.confirmText,
|
|
95
|
+
confirmConfig = vItem.confirmConfig,
|
|
96
|
+
render = vItem.render,
|
|
90
97
|
others = _objectWithoutProperties(vItem, _excluded);
|
|
91
98
|
return _objectSpread(_objectSpread({}, others), {}, {
|
|
92
99
|
key: code ? code + i : i,
|
|
@@ -156,7 +163,9 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
156
163
|
},
|
|
157
164
|
placement: "bottomRight"
|
|
158
165
|
}, (item === null || item === void 0 ? void 0 : item.dropdownConfig) || dropdownConfig || {}), /*#__PURE__*/React.createElement(Button, {
|
|
159
|
-
type: "primary"
|
|
166
|
+
type: "primary",
|
|
167
|
+
size: size
|
|
168
|
+
// icon={item?.icon ? <IconNode icon={item?.icon}/> : null}
|
|
160
169
|
}, item.exName || item.name, " ", /*#__PURE__*/React.createElement(SpecIcon, {
|
|
161
170
|
name: "down"
|
|
162
171
|
})));
|
|
@@ -168,7 +177,8 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
168
177
|
loading: loading,
|
|
169
178
|
onClick: fn ? function () {
|
|
170
179
|
return fn(item);
|
|
171
|
-
} : null
|
|
180
|
+
} : null,
|
|
181
|
+
size: size
|
|
172
182
|
}, others, {
|
|
173
183
|
icon: icon ? /*#__PURE__*/React.createElement(IconNode, {
|
|
174
184
|
icon: icon
|
|
@@ -261,10 +271,12 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
261
271
|
}));
|
|
262
272
|
};
|
|
263
273
|
// 自定义渲染显示的文本
|
|
264
|
-
var renderCustomLabel = function renderCustomLabel(gItem) {
|
|
274
|
+
var renderCustomLabel = function renderCustomLabel(gItem, hideIcon) {
|
|
265
275
|
return gItem.render ? gItem.render.apply(gItem, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
266
276
|
return rowParams[pItem];
|
|
267
|
-
}))) : /*#__PURE__*/React.createElement(React.Fragment, null, gItem.icon
|
|
277
|
+
}))) : /*#__PURE__*/React.createElement(React.Fragment, null, !hideIcon && gItem.icon && showTextIcon ? /*#__PURE__*/React.createElement(IconNode, {
|
|
278
|
+
icon: gItem.icon
|
|
279
|
+
}) : '', " ", gItem.exName || gItem.name);
|
|
268
280
|
};
|
|
269
281
|
// 递归转换原来的数组结构
|
|
270
282
|
var deepTransTextMenus = function deepTransTextMenus(groupArray) {
|
|
@@ -285,7 +297,13 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
285
297
|
danger: others.danger,
|
|
286
298
|
disabled: btnIsDisabled(others.disabled, rowParams),
|
|
287
299
|
key: code ? code + i : i,
|
|
288
|
-
|
|
300
|
+
icon: icon && showTextIcon ? /*#__PURE__*/React.createElement(IconNode, {
|
|
301
|
+
icon: icon,
|
|
302
|
+
style: {
|
|
303
|
+
marginRight: '4px'
|
|
304
|
+
}
|
|
305
|
+
}) : null,
|
|
306
|
+
// 不显示图标
|
|
289
307
|
label: /*#__PURE__*/React.createElement("a", {
|
|
290
308
|
onClick: function onClick() {
|
|
291
309
|
// 配置二次确认
|
|
@@ -298,7 +316,7 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
298
316
|
})));
|
|
299
317
|
}
|
|
300
318
|
}
|
|
301
|
-
}, renderCustomLabel(vItem)),
|
|
319
|
+
}, renderCustomLabel(vItem, true)),
|
|
302
320
|
title: vItem.exName || vItem.name,
|
|
303
321
|
children: children && children.length > 0 ? deepTransTextMenus(children) : undefined
|
|
304
322
|
};
|
|
@@ -315,9 +333,7 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
315
333
|
placement: "bottomRight"
|
|
316
334
|
}, (item === null || item === void 0 ? void 0 : item.dropdownConfig) || dropdownConfig || {}), /*#__PURE__*/React.createElement("a", {
|
|
317
335
|
className: 'spec-button-group-text'
|
|
318
|
-
}, item
|
|
319
|
-
return rowParams[pItem];
|
|
320
|
-
}))) : item.exName || item.name, " ", /*#__PURE__*/React.createElement(SpecIcon, {
|
|
336
|
+
}, renderCustomLabel(item, true), " ", /*#__PURE__*/React.createElement(SpecIcon, {
|
|
321
337
|
name: "down"
|
|
322
338
|
})));
|
|
323
339
|
}
|
|
@@ -356,9 +372,7 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
356
372
|
// @ts-ignore
|
|
357
373
|
,
|
|
358
374
|
disabled: btnIsDisabled(item.disabled, rowParams)
|
|
359
|
-
}, item
|
|
360
|
-
return rowParams[pItem];
|
|
361
|
-
}))) : item.exName || item.name)) : /*#__PURE__*/React.createElement("a", {
|
|
375
|
+
}, renderCustomLabel(item))) : /*#__PURE__*/React.createElement("a", {
|
|
362
376
|
className: 'spec-button-group-text',
|
|
363
377
|
title: item.exName || item.name,
|
|
364
378
|
key: item.index
|
|
@@ -370,9 +384,7 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
370
384
|
return rowParams[pItem];
|
|
371
385
|
})));
|
|
372
386
|
} : undefined
|
|
373
|
-
},
|
|
374
|
-
return rowParams[pItem];
|
|
375
|
-
}))) : item.exName || item.name));
|
|
387
|
+
}, renderCustomLabel(item)));
|
|
376
388
|
};
|
|
377
389
|
var RenderCustomNode = function RenderCustomNode(item) {
|
|
378
390
|
var render = item.render,
|
|
@@ -432,7 +444,8 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
432
444
|
},
|
|
433
445
|
placement: "bottomRight"
|
|
434
446
|
}, dropdownConfig), /*#__PURE__*/React.createElement(Button, {
|
|
435
|
-
type: "primary"
|
|
447
|
+
type: "primary",
|
|
448
|
+
size: size
|
|
436
449
|
}, moreText || '更多', moreIcon || /*#__PURE__*/React.createElement(DownOutlined, null))) : /*#__PURE__*/React.createElement(Popconfirm, _extends({
|
|
437
450
|
placement: "topRight",
|
|
438
451
|
open: popVisibleIndex === rowParams.rowIndex,
|
|
@@ -48,13 +48,21 @@ var SpecButtonGroupStyleFunc = function SpecButtonGroupStyleFunc(prefix) {
|
|
|
48
48
|
return [_defineProperty({}, prefixCls, _objectSpread({
|
|
49
49
|
display: 'inline-block',
|
|
50
50
|
verticalAlign: 'middle',
|
|
51
|
+
alignItems: 'center',
|
|
51
52
|
'> *': {
|
|
52
53
|
marginLeft: token.marginSM,
|
|
53
54
|
'&:first-child': {
|
|
54
55
|
marginLeft: 0
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
|
-
}, SpecButtonGroupTextStyle(prefixCls, SpecButtonGroupToken)))
|
|
58
|
+
}, SpecButtonGroupTextStyle(prefixCls, SpecButtonGroupToken))), {
|
|
59
|
+
'.ant-dropdown-menu-item': {
|
|
60
|
+
background: '#f00',
|
|
61
|
+
'.spec-icon + .ant-dropdown-menu-title-content': {
|
|
62
|
+
marginLeft: token.marginSM
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}];
|
|
58
66
|
}, prepareComponentToken // 当前组件扩展的变量
|
|
59
67
|
);
|
|
60
68
|
};
|
package/es/DragContent/index.js
CHANGED
|
@@ -143,7 +143,7 @@ var DragContent = function DragContent(props) {
|
|
|
143
143
|
};
|
|
144
144
|
return wrapSSR( /*#__PURE__*/React.createElement("div", {
|
|
145
145
|
ref: divRef,
|
|
146
|
-
className: classNames(componentName, hashId
|
|
146
|
+
className: classNames(className, componentName, hashId),
|
|
147
147
|
style: style
|
|
148
148
|
}, children, direction && direction.map(function (item, idx) {
|
|
149
149
|
return /*#__PURE__*/React.createElement(DragBar, {
|
|
@@ -8,16 +8,15 @@
|
|
|
8
8
|
|
|
9
9
|
.spec-grid-dragbar-left-horizontal{
|
|
10
10
|
height: 100%;
|
|
11
|
-
width:
|
|
11
|
+
width: 10px;
|
|
12
12
|
position: absolute;
|
|
13
13
|
left: 0;
|
|
14
14
|
top: 0;
|
|
15
15
|
cursor: col-resize;
|
|
16
|
-
|
|
17
16
|
}
|
|
18
17
|
.spec-grid-dragbar-right-horizontal{
|
|
19
18
|
height: 100%;
|
|
20
|
-
width:
|
|
19
|
+
width: 10px;
|
|
21
20
|
position: absolute;
|
|
22
21
|
right: 0;
|
|
23
22
|
top: 0;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ContentHeaderProps {
|
|
3
|
+
title?: string | React.ReactNode;
|
|
4
|
+
breadcrumb?: object;
|
|
5
|
+
componentName?: string;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}
|
|
8
|
+
declare const ContentHeader: React.ForwardRefExoticComponent<Omit<ContentHeaderProps, "ref"> & React.RefAttributes<unknown>>;
|
|
9
|
+
export default ContentHeader;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React, { forwardRef, useImperativeHandle, useRef, useEffect, useState } from 'react';
|
|
8
|
+
import { Breadcrumb } from "antd";
|
|
9
|
+
import classNames from 'classnames';
|
|
10
|
+
import useStyle from "./styles/Header";
|
|
11
|
+
var Child = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
12
|
+
var _useState = useState(0),
|
|
13
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
14
|
+
count = _useState2[0],
|
|
15
|
+
setCount = _useState2[1];
|
|
16
|
+
useImperativeHandle(ref, function () {
|
|
17
|
+
return {
|
|
18
|
+
getCurrentCount: function getCurrentCount() {
|
|
19
|
+
return count;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}, [count]);
|
|
23
|
+
return /*#__PURE__*/React.createElement("div", null, "Count: ", count);
|
|
24
|
+
});
|
|
25
|
+
var ContentHeader = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
26
|
+
var breadcrumb = props.breadcrumb,
|
|
27
|
+
className = props.className,
|
|
28
|
+
title = props.title,
|
|
29
|
+
getClientHeight = props.getClientHeight;
|
|
30
|
+
var componentName = 'spec-content-header';
|
|
31
|
+
var _useStyle = useStyle(componentName),
|
|
32
|
+
_useStyle2 = _slicedToArray(_useStyle, 2),
|
|
33
|
+
wrapSSR = _useStyle2[0],
|
|
34
|
+
hashId = _useStyle2[1];
|
|
35
|
+
var _useState3 = useState(false),
|
|
36
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
37
|
+
visible = _useState4[0],
|
|
38
|
+
setVisible = _useState4[1];
|
|
39
|
+
var _useState5 = useState(0),
|
|
40
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
41
|
+
clientHeight = _useState6[0],
|
|
42
|
+
setClientHeight = _useState6[1];
|
|
43
|
+
var headerRef = useRef(null);
|
|
44
|
+
useEffect(function () {
|
|
45
|
+
if (title || breadcrumb) {
|
|
46
|
+
setVisible(true);
|
|
47
|
+
}
|
|
48
|
+
}, [title, breadcrumb]);
|
|
49
|
+
useImperativeHandle(ref, function () {
|
|
50
|
+
return {
|
|
51
|
+
getClientHeight: function getClientHeight() {
|
|
52
|
+
return clientHeight;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}, [clientHeight]);
|
|
56
|
+
useEffect(function () {
|
|
57
|
+
if (visible && headerRef.current) {
|
|
58
|
+
setClientHeight(headerRef.current.clientHeight);
|
|
59
|
+
// 使用 clientHeight
|
|
60
|
+
}
|
|
61
|
+
}, [visible]);
|
|
62
|
+
useEffect(function () {
|
|
63
|
+
getClientHeight && getClientHeight(clientHeight);
|
|
64
|
+
}, [clientHeight]);
|
|
65
|
+
// ref 的转发
|
|
66
|
+
// 将需要暴露给父组件的属性或方法定义在这个函数中
|
|
67
|
+
// useImperativeHandle(ref, () => headerRef.current, [headerRef, breadcrumb, title]);
|
|
68
|
+
|
|
69
|
+
// @ts-ignore
|
|
70
|
+
return wrapSSR( /*#__PURE__*/React.createElement("div", {
|
|
71
|
+
className: classNames(className, componentName, hashId),
|
|
72
|
+
ref: headerRef
|
|
73
|
+
}, breadcrumb ? /*#__PURE__*/React.createElement("div", {
|
|
74
|
+
className: componentName + '-breadcrumb'
|
|
75
|
+
}, /*#__PURE__*/React.createElement(Breadcrumb, breadcrumb || {})) : null, title ? /*#__PURE__*/React.createElement("div", {
|
|
76
|
+
className: componentName + '-title'
|
|
77
|
+
}, title) : null));
|
|
78
|
+
});
|
|
79
|
+
export default ContentHeader;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { ContentHeaderProps } from './ContentHeader';
|
|
2
3
|
import './styles/index.less';
|
|
3
4
|
interface SubfieldContentProps {
|
|
4
5
|
leftSiderWidth?: number;
|
|
@@ -12,6 +13,7 @@ interface SubfieldContentProps {
|
|
|
12
13
|
leftSiderDragDirection?: string[];
|
|
13
14
|
leftSiderMoveMaxWidth?: number;
|
|
14
15
|
leftSiderMoveMaxHeight?: number;
|
|
16
|
+
header?: ContentHeaderProps;
|
|
15
17
|
[k: string]: any;
|
|
16
18
|
}
|
|
17
19
|
declare const SubfieldContent: (props: SubfieldContentProps) => any;
|
|
@@ -1,41 +1,64 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
1
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
4
|
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."); }
|
|
3
5
|
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); }
|
|
4
6
|
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; }
|
|
5
7
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
8
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
|
|
9
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
13
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
|
+
import React, { useContext, useState } from 'react';
|
|
8
15
|
import classNames from 'classnames';
|
|
9
16
|
import { Spin } from 'antd';
|
|
10
17
|
import DragContent from "../DragContent";
|
|
18
|
+
import ContentHeader from "./ContentHeader";
|
|
11
19
|
import useStyle from "./styles/Subfield";
|
|
12
20
|
import "./styles/index.less";
|
|
21
|
+
import { FanContext } from "../ConfigContext";
|
|
13
22
|
var SubfieldContent = function SubfieldContent(props) {
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
var _proLayoutProps$heade;
|
|
24
|
+
var InitFanContext = useContext(FanContext);
|
|
25
|
+
var providerConfig = InitFanContext['SubfieldContent'] || {}; // 使用上下文(全局配置)设置扩展的配置项
|
|
26
|
+
var proLayoutProps = InitFanContext['proLayoutProps'] || {};
|
|
27
|
+
var _providerConfig$props = _objectSpread(_objectSpread({}, providerConfig), props),
|
|
28
|
+
_providerConfig$props2 = _providerConfig$props.leftSiderWidth,
|
|
29
|
+
leftSiderWidth = _providerConfig$props2 === void 0 ? 180 : _providerConfig$props2,
|
|
30
|
+
leftSiderNode = _providerConfig$props.leftSiderNode,
|
|
31
|
+
children = _providerConfig$props.children,
|
|
32
|
+
className = _providerConfig$props.className,
|
|
33
|
+
style = _providerConfig$props.style,
|
|
34
|
+
leftSiderClassName = _providerConfig$props.leftSiderClassName,
|
|
35
|
+
_providerConfig$props3 = _providerConfig$props.loading,
|
|
36
|
+
loading = _providerConfig$props3 === void 0 ? false : _providerConfig$props3,
|
|
37
|
+
loadingTip = _providerConfig$props.loadingTip,
|
|
38
|
+
leftSiderDragDirection = _providerConfig$props.leftSiderDragDirection,
|
|
39
|
+
leftSiderMoveMaxWidth = _providerConfig$props.leftSiderMoveMaxWidth,
|
|
40
|
+
leftSiderMoveMaxHeight = _providerConfig$props.leftSiderMoveMaxHeight,
|
|
41
|
+
header = _providerConfig$props.header;
|
|
42
|
+
var _useState = useState(0),
|
|
43
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
44
|
+
headerHeight = _useState2[0],
|
|
45
|
+
setHeaderHeight = _useState2[1];
|
|
27
46
|
var componentName = 'spec-grid-content';
|
|
28
47
|
var _useStyle = useStyle(componentName),
|
|
29
48
|
_useStyle2 = _slicedToArray(_useStyle, 2),
|
|
30
49
|
wrapSSR = _useStyle2[0],
|
|
31
50
|
hashId = _useStyle2[1];
|
|
32
|
-
return wrapSSR( /*#__PURE__*/React.createElement(
|
|
33
|
-
spinning: loading,
|
|
34
|
-
tip: loadingTip,
|
|
35
|
-
wrapperClassName: 'spec-grid-content-spinning'
|
|
36
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
51
|
+
return wrapSSR( /*#__PURE__*/React.createElement("div", {
|
|
37
52
|
className: classNames(componentName, className, hashId),
|
|
38
53
|
style: style
|
|
54
|
+
}, proLayoutProps !== null && proLayoutProps !== void 0 && proLayoutProps.header || header ? /*#__PURE__*/React.createElement(ContentHeader, _extends({
|
|
55
|
+
getClientHeight: setHeaderHeight,
|
|
56
|
+
className: classNames('spec-grid-content-header', proLayoutProps !== null && proLayoutProps !== void 0 && (_proLayoutProps$heade = proLayoutProps.header) !== null && _proLayoutProps$heade !== void 0 && _proLayoutProps$heade.fixed || header !== null && header !== void 0 && header.fixed ? 'spec-grid-content-header-fixed' : '')
|
|
57
|
+
}, (proLayoutProps === null || proLayoutProps === void 0 ? void 0 : proLayoutProps.header) || {}, header || {})) : null, /*#__PURE__*/React.createElement("div", {
|
|
58
|
+
className: 'spec-grid-content-body',
|
|
59
|
+
style: {
|
|
60
|
+
height: "calc(100% - ".concat(headerHeight ? headerHeight + 20 : 0, "px")
|
|
61
|
+
}
|
|
39
62
|
}, /*#__PURE__*/React.createElement(DragContent, {
|
|
40
63
|
direction: leftSiderDragDirection,
|
|
41
64
|
className: classNames('spec-grid-left', leftSiderClassName),
|
|
@@ -46,6 +69,10 @@ var SubfieldContent = function SubfieldContent(props) {
|
|
|
46
69
|
moveMaxHeight: leftSiderMoveMaxHeight
|
|
47
70
|
}, leftSiderNode), /*#__PURE__*/React.createElement("div", {
|
|
48
71
|
className: "spec-grid-right"
|
|
49
|
-
},
|
|
72
|
+
}, /*#__PURE__*/React.createElement(Spin, {
|
|
73
|
+
spinning: loading,
|
|
74
|
+
tip: loadingTip,
|
|
75
|
+
wrapperClassName: 'spec-grid-content-spinning'
|
|
76
|
+
}, children)))));
|
|
50
77
|
};
|
|
51
78
|
export default SubfieldContent;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './styles/index.less';
|
|
3
|
+
import { ContentHeaderProps } from './ContentHeader';
|
|
3
4
|
interface WrapperContentProps {
|
|
4
5
|
className?: string;
|
|
5
6
|
loading?: boolean;
|
|
@@ -8,6 +9,7 @@ interface WrapperContentProps {
|
|
|
8
9
|
style?: React.CSSProperties;
|
|
9
10
|
noMargin?: boolean;
|
|
10
11
|
light?: boolean;
|
|
12
|
+
header?: ContentHeaderProps;
|
|
11
13
|
}
|
|
12
14
|
declare const WrapperContent: (props: WrapperContentProps) => any;
|
|
13
15
|
export default WrapperContent;
|
|
@@ -1,38 +1,73 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
1
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
4
|
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."); }
|
|
3
5
|
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); }
|
|
4
6
|
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; }
|
|
5
7
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
8
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
|
|
9
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
13
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
|
+
import React, { useContext, useRef, useState } from 'react';
|
|
8
15
|
import classNames from 'classnames';
|
|
9
16
|
import { Spin } from 'antd';
|
|
10
17
|
import "./styles/index.less";
|
|
11
18
|
import useStyle from "./styles/Wrapper";
|
|
19
|
+
import { FanContext } from "../ConfigContext";
|
|
20
|
+
import ContentHeader from "./ContentHeader";
|
|
12
21
|
var WrapperContent = function WrapperContent(props) {
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
var _proLayoutProps$heade, _proLayoutProps$heade2;
|
|
23
|
+
var InitFanContext = useContext(FanContext);
|
|
24
|
+
var providerConfig = InitFanContext['SubfieldContent'] || {}; // 使用上下文(全局配置)设置扩展的配置项
|
|
25
|
+
var proLayoutProps = InitFanContext['proLayoutProps'] || {};
|
|
26
|
+
var _providerConfig$props = _objectSpread(_objectSpread({}, providerConfig), props),
|
|
27
|
+
children = _providerConfig$props.children,
|
|
28
|
+
light = _providerConfig$props.light,
|
|
29
|
+
className = _providerConfig$props.className,
|
|
30
|
+
style = _providerConfig$props.style,
|
|
31
|
+
_providerConfig$props2 = _providerConfig$props.noMargin,
|
|
32
|
+
noMargin = _providerConfig$props2 === void 0 ? false : _providerConfig$props2,
|
|
33
|
+
_providerConfig$props3 = _providerConfig$props.loading,
|
|
34
|
+
loading = _providerConfig$props3 === void 0 ? false : _providerConfig$props3,
|
|
35
|
+
loadingTip = _providerConfig$props.loadingTip,
|
|
36
|
+
header = _providerConfig$props.header;
|
|
22
37
|
var componentName = 'spec-wrapper-content';
|
|
23
38
|
var _useStyle = useStyle(componentName),
|
|
24
39
|
_useStyle2 = _slicedToArray(_useStyle, 2),
|
|
25
40
|
wrapSSR = _useStyle2[0],
|
|
26
41
|
hashId = _useStyle2[1];
|
|
27
|
-
|
|
42
|
+
var _useState = useState(0),
|
|
43
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
44
|
+
headerHeight = _useState2[0],
|
|
45
|
+
setHeaderHeight = _useState2[1];
|
|
46
|
+
var headerRef = useRef();
|
|
47
|
+
return wrapSSR( /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
className: classNames(componentName, className, noMargin ? 'has-margin' : '', hashId),
|
|
49
|
+
style: style
|
|
50
|
+
}, proLayoutProps !== null && proLayoutProps !== void 0 && proLayoutProps.header || header ? /*#__PURE__*/React.createElement(ContentHeader, _extends({
|
|
51
|
+
ref: headerRef,
|
|
52
|
+
getClientHeight: setHeaderHeight,
|
|
53
|
+
className: classNames('spec-wrapper-content-header', proLayoutProps !== null && proLayoutProps !== void 0 && (_proLayoutProps$heade = proLayoutProps.header) !== null && _proLayoutProps$heade !== void 0 && _proLayoutProps$heade.fixed || header !== null && header !== void 0 && header.fixed ? 'spec-wrapper-content-header-fixed' : '')
|
|
54
|
+
}, (proLayoutProps === null || proLayoutProps === void 0 ? void 0 : proLayoutProps.header) || {}, header || {})) : null, light ? /*#__PURE__*/React.createElement("div", {
|
|
55
|
+
className: "spec-wrapper-content-block light-block"
|
|
56
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
57
|
+
className: 'spec-wrapper-content-body'
|
|
58
|
+
}, /*#__PURE__*/React.createElement(Spin, {
|
|
28
59
|
spinning: loading,
|
|
29
60
|
tip: loadingTip,
|
|
30
61
|
wrapperClassName: 'spec-wrapper-content-spinning'
|
|
31
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
32
|
-
className:
|
|
33
|
-
style:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
},
|
|
62
|
+
}, " ", children))) : /*#__PURE__*/React.createElement("div", {
|
|
63
|
+
className: 'spec-wrapper-content-body',
|
|
64
|
+
style: {
|
|
65
|
+
height: proLayoutProps !== null && proLayoutProps !== void 0 && (_proLayoutProps$heade2 = proLayoutProps.header) !== null && _proLayoutProps$heade2 !== void 0 && _proLayoutProps$heade2.fixed || header !== null && header !== void 0 && header.fixed ? "calc(100% - ".concat(headerHeight ? headerHeight + 20 : 0, "px)") : ''
|
|
66
|
+
}
|
|
67
|
+
}, /*#__PURE__*/React.createElement(Spin, {
|
|
68
|
+
spinning: loading,
|
|
69
|
+
tip: loadingTip,
|
|
70
|
+
wrapperClassName: 'spec-wrapper-content-spinning'
|
|
71
|
+
}, " ", children, " "))));
|
|
37
72
|
};
|
|
38
73
|
export default WrapperContent;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
|
+
import { createStyleHook } from "../../theme/utils/genStyleHook";
|
|
6
|
+
var SubfieldContentStyleFunc = function SubfieldContentStyleFunc(prefix) {
|
|
7
|
+
var prepareComponentToken = function prepareComponentToken(token) {
|
|
8
|
+
return {
|
|
9
|
+
// fontWeight: 400,
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
return createStyleHook(prefix, function (token) {
|
|
13
|
+
var prefixCls = ".".concat(prefix);
|
|
14
|
+
// console.log(' new TinyColor(token.colorPrimary).setAlpha(0.1)' ,new TinyColor(token.colorPrimary).setAlpha(0.1).toRgbString(), )
|
|
15
|
+
return [_defineProperty({}, prefixCls, {
|
|
16
|
+
marginBottom: token.marginMD,
|
|
17
|
+
'.spec-content-header-breadcrumb': {
|
|
18
|
+
height: '24px',
|
|
19
|
+
'& +.spec-content-header-title': {
|
|
20
|
+
marginTop: token.marginXS
|
|
21
|
+
// marginTop: token.margin
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
'.spec-content-header-title': {
|
|
25
|
+
fontSize: token.fontSizeLG,
|
|
26
|
+
fontWeight: 'bold',
|
|
27
|
+
lineHeight: '20px'
|
|
28
|
+
}
|
|
29
|
+
})];
|
|
30
|
+
}, prepareComponentToken // 当前组件扩展的变量
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
export default SubfieldContentStyleFunc;
|
|
@@ -15,15 +15,33 @@ var SubfieldContentStyleFunc = function SubfieldContentStyleFunc(prefix) {
|
|
|
15
15
|
return createStyleHook(prefix, function (token) {
|
|
16
16
|
var prefixCls = ".".concat(prefix);
|
|
17
17
|
// console.log(' new TinyColor(token.colorPrimary).setAlpha(0.1)' ,new TinyColor(token.colorPrimary).setAlpha(0.1).toRgbString(), )
|
|
18
|
-
return [_defineProperty({}, prefixCls, {
|
|
18
|
+
return [_defineProperty({}, prefixCls, _objectSpread(_objectSpread({}, scrollBar(token)), {}, {
|
|
19
|
+
'.spec-grid-content-header + .spec-grid-content-body': {
|
|
20
|
+
// height: `calc(100% - 60px)`
|
|
21
|
+
},
|
|
22
|
+
'.spec-grid-content-body': {
|
|
23
|
+
display: 'flex',
|
|
24
|
+
position: 'relative',
|
|
25
|
+
height: '100%'
|
|
26
|
+
},
|
|
27
|
+
'.spec-grid-left-cont': _objectSpread({
|
|
28
|
+
width: '100%',
|
|
29
|
+
height: '100%',
|
|
30
|
+
overflow: 'auto'
|
|
31
|
+
}, scrollBar(token)),
|
|
19
32
|
'& .spec-grid-left': _objectSpread({
|
|
33
|
+
height: '100%',
|
|
34
|
+
// overflow: 'hidden',
|
|
35
|
+
overflow: 'auto',
|
|
20
36
|
padding: token.paddingMD,
|
|
21
|
-
background: token.colorBgBase
|
|
37
|
+
background: token.colorBgBase,
|
|
38
|
+
boxSizing: 'border-box'
|
|
22
39
|
}, scrollBar(token)),
|
|
23
40
|
'& .spec-grid-right': _objectSpread({
|
|
24
|
-
padding:
|
|
41
|
+
padding: 0,
|
|
42
|
+
marginLeft: token.marginMD
|
|
25
43
|
}, scrollBar(token))
|
|
26
|
-
})];
|
|
44
|
+
}))];
|
|
27
45
|
}, prepareComponentToken // 当前组件扩展的变量
|
|
28
46
|
);
|
|
29
47
|
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
7
|
import { createStyleHook } from "../../theme/utils/genStyleHook";
|
|
8
|
+
import { scrollBar } from "../../theme/index";
|
|
6
9
|
var WrapperContentStyleFunc = function WrapperContentStyleFunc(prefix) {
|
|
7
10
|
var prepareComponentToken = function prepareComponentToken(token) {
|
|
8
11
|
return {
|
|
@@ -11,17 +14,18 @@ var WrapperContentStyleFunc = function WrapperContentStyleFunc(prefix) {
|
|
|
11
14
|
};
|
|
12
15
|
return createStyleHook(prefix, function (token) {
|
|
13
16
|
var prefixCls = ".".concat(prefix);
|
|
14
|
-
return [_defineProperty({}, prefixCls, {
|
|
17
|
+
return [_defineProperty(_defineProperty(_defineProperty({}, prefixCls, _objectSpread(_objectSpread({
|
|
15
18
|
position: 'relative',
|
|
16
19
|
padding: token.paddingMD,
|
|
17
20
|
background: token.colorBgLayout,
|
|
18
21
|
height: '100%',
|
|
19
|
-
overflow: 'auto'
|
|
22
|
+
overflow: 'auto'
|
|
23
|
+
}, scrollBar(token)), {}, {
|
|
20
24
|
'& .light-block': {
|
|
21
25
|
padding: token.paddingMD,
|
|
22
26
|
background: token.colorBgBase
|
|
23
27
|
}
|
|
24
|
-
})];
|
|
28
|
+
})), '.spec-wrapper-content-header', {}), '.spec-wrapper-content-body', {})];
|
|
25
29
|
}, prepareComponentToken // 当前组件扩展的变量
|
|
26
30
|
);
|
|
27
31
|
};
|