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
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
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); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _antd = require("antd");
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
var _Header = _interopRequireDefault(require("./styles/Header"));
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
14
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
16
|
+
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."); }
|
|
17
|
+
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); }
|
|
18
|
+
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; }
|
|
19
|
+
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; } }
|
|
20
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
21
|
+
var Child = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
22
|
+
var _useState = (0, _react.useState)(0),
|
|
23
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
24
|
+
count = _useState2[0],
|
|
25
|
+
setCount = _useState2[1];
|
|
26
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
27
|
+
return {
|
|
28
|
+
getCurrentCount: function getCurrentCount() {
|
|
29
|
+
return count;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}, [count]);
|
|
33
|
+
return /*#__PURE__*/_react.default.createElement("div", null, "Count: ", count);
|
|
34
|
+
});
|
|
35
|
+
var ContentHeader = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
36
|
+
var breadcrumb = props.breadcrumb,
|
|
37
|
+
className = props.className,
|
|
38
|
+
title = props.title,
|
|
39
|
+
getClientHeight = props.getClientHeight;
|
|
40
|
+
var componentName = 'spec-content-header';
|
|
41
|
+
var _useStyle = (0, _Header.default)(componentName),
|
|
42
|
+
_useStyle2 = _slicedToArray(_useStyle, 2),
|
|
43
|
+
wrapSSR = _useStyle2[0],
|
|
44
|
+
hashId = _useStyle2[1];
|
|
45
|
+
var _useState3 = (0, _react.useState)(false),
|
|
46
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
47
|
+
visible = _useState4[0],
|
|
48
|
+
setVisible = _useState4[1];
|
|
49
|
+
var _useState5 = (0, _react.useState)(0),
|
|
50
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
51
|
+
clientHeight = _useState6[0],
|
|
52
|
+
setClientHeight = _useState6[1];
|
|
53
|
+
var headerRef = (0, _react.useRef)(null);
|
|
54
|
+
(0, _react.useEffect)(function () {
|
|
55
|
+
if (title || breadcrumb) {
|
|
56
|
+
setVisible(true);
|
|
57
|
+
}
|
|
58
|
+
}, [title, breadcrumb]);
|
|
59
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
60
|
+
return {
|
|
61
|
+
getClientHeight: function getClientHeight() {
|
|
62
|
+
return clientHeight;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
}, [clientHeight]);
|
|
66
|
+
(0, _react.useEffect)(function () {
|
|
67
|
+
if (visible && headerRef.current) {
|
|
68
|
+
setClientHeight(headerRef.current.clientHeight);
|
|
69
|
+
// 使用 clientHeight
|
|
70
|
+
}
|
|
71
|
+
}, [visible]);
|
|
72
|
+
(0, _react.useEffect)(function () {
|
|
73
|
+
getClientHeight && getClientHeight(clientHeight);
|
|
74
|
+
}, [clientHeight]);
|
|
75
|
+
// ref 的转发
|
|
76
|
+
// 将需要暴露给父组件的属性或方法定义在这个函数中
|
|
77
|
+
// useImperativeHandle(ref, () => headerRef.current, [headerRef, breadcrumb, title]);
|
|
78
|
+
|
|
79
|
+
// @ts-ignore
|
|
80
|
+
return wrapSSR( /*#__PURE__*/_react.default.createElement("div", {
|
|
81
|
+
className: (0, _classnames.default)(className, componentName, hashId),
|
|
82
|
+
ref: headerRef
|
|
83
|
+
}, breadcrumb ? /*#__PURE__*/_react.default.createElement("div", {
|
|
84
|
+
className: componentName + '-breadcrumb'
|
|
85
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Breadcrumb, breadcrumb || {})) : null, title ? /*#__PURE__*/_react.default.createElement("div", {
|
|
86
|
+
className: componentName + '-title'
|
|
87
|
+
}, title) : null));
|
|
88
|
+
});
|
|
89
|
+
var _default = exports.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;
|
|
@@ -4,45 +4,70 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _react =
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
9
|
var _antd = require("antd");
|
|
10
10
|
var _DragContent = _interopRequireDefault(require("../DragContent"));
|
|
11
|
+
var _ContentHeader = _interopRequireDefault(require("./ContentHeader"));
|
|
11
12
|
var _Subfield = _interopRequireDefault(require("./styles/Subfield"));
|
|
12
13
|
require("./styles/index.less");
|
|
14
|
+
var _ConfigContext = require("../ConfigContext");
|
|
13
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
|
+
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); }
|
|
19
|
+
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); }
|
|
14
20
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
15
21
|
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."); }
|
|
16
22
|
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); }
|
|
17
23
|
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; }
|
|
18
24
|
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; } }
|
|
19
25
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
26
|
+
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; }
|
|
27
|
+
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; }
|
|
28
|
+
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; }
|
|
29
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
30
|
+
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); }
|
|
20
31
|
var SubfieldContent = function SubfieldContent(props) {
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
var _proLayoutProps$heade;
|
|
33
|
+
var InitFanContext = (0, _react.useContext)(_ConfigContext.FanContext);
|
|
34
|
+
var providerConfig = InitFanContext['SubfieldContent'] || {}; // 使用上下文(全局配置)设置扩展的配置项
|
|
35
|
+
var proLayoutProps = InitFanContext['proLayoutProps'] || {};
|
|
36
|
+
var _providerConfig$props = _objectSpread(_objectSpread({}, providerConfig), props),
|
|
37
|
+
_providerConfig$props2 = _providerConfig$props.leftSiderWidth,
|
|
38
|
+
leftSiderWidth = _providerConfig$props2 === void 0 ? 180 : _providerConfig$props2,
|
|
39
|
+
leftSiderNode = _providerConfig$props.leftSiderNode,
|
|
40
|
+
children = _providerConfig$props.children,
|
|
41
|
+
className = _providerConfig$props.className,
|
|
42
|
+
style = _providerConfig$props.style,
|
|
43
|
+
leftSiderClassName = _providerConfig$props.leftSiderClassName,
|
|
44
|
+
_providerConfig$props3 = _providerConfig$props.loading,
|
|
45
|
+
loading = _providerConfig$props3 === void 0 ? false : _providerConfig$props3,
|
|
46
|
+
loadingTip = _providerConfig$props.loadingTip,
|
|
47
|
+
leftSiderDragDirection = _providerConfig$props.leftSiderDragDirection,
|
|
48
|
+
leftSiderMoveMaxWidth = _providerConfig$props.leftSiderMoveMaxWidth,
|
|
49
|
+
leftSiderMoveMaxHeight = _providerConfig$props.leftSiderMoveMaxHeight,
|
|
50
|
+
header = _providerConfig$props.header;
|
|
51
|
+
var _useState = (0, _react.useState)(0),
|
|
52
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
53
|
+
headerHeight = _useState2[0],
|
|
54
|
+
setHeaderHeight = _useState2[1];
|
|
34
55
|
var componentName = 'spec-grid-content';
|
|
35
56
|
var _useStyle = (0, _Subfield.default)(componentName),
|
|
36
57
|
_useStyle2 = _slicedToArray(_useStyle, 2),
|
|
37
58
|
wrapSSR = _useStyle2[0],
|
|
38
59
|
hashId = _useStyle2[1];
|
|
39
|
-
return wrapSSR( /*#__PURE__*/_react.default.createElement(
|
|
40
|
-
spinning: loading,
|
|
41
|
-
tip: loadingTip,
|
|
42
|
-
wrapperClassName: 'spec-grid-content-spinning'
|
|
43
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
60
|
+
return wrapSSR( /*#__PURE__*/_react.default.createElement("div", {
|
|
44
61
|
className: (0, _classnames.default)(componentName, className, hashId),
|
|
45
62
|
style: style
|
|
63
|
+
}, proLayoutProps !== null && proLayoutProps !== void 0 && proLayoutProps.header || header ? /*#__PURE__*/_react.default.createElement(_ContentHeader.default, _extends({
|
|
64
|
+
getClientHeight: setHeaderHeight,
|
|
65
|
+
className: (0, _classnames.default)('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' : '')
|
|
66
|
+
}, (proLayoutProps === null || proLayoutProps === void 0 ? void 0 : proLayoutProps.header) || {}, header || {})) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
67
|
+
className: 'spec-grid-content-body',
|
|
68
|
+
style: {
|
|
69
|
+
height: "calc(100% - ".concat(headerHeight ? headerHeight + 20 : 0, "px")
|
|
70
|
+
}
|
|
46
71
|
}, /*#__PURE__*/_react.default.createElement(_DragContent.default, {
|
|
47
72
|
direction: leftSiderDragDirection,
|
|
48
73
|
className: (0, _classnames.default)('spec-grid-left', leftSiderClassName),
|
|
@@ -53,6 +78,10 @@ var SubfieldContent = function SubfieldContent(props) {
|
|
|
53
78
|
moveMaxHeight: leftSiderMoveMaxHeight
|
|
54
79
|
}, leftSiderNode), /*#__PURE__*/_react.default.createElement("div", {
|
|
55
80
|
className: "spec-grid-right"
|
|
56
|
-
},
|
|
81
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Spin, {
|
|
82
|
+
spinning: loading,
|
|
83
|
+
tip: loadingTip,
|
|
84
|
+
wrapperClassName: 'spec-grid-content-spinning'
|
|
85
|
+
}, children)))));
|
|
57
86
|
};
|
|
58
87
|
var _default = exports.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;
|
|
@@ -4,42 +4,79 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _react =
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
9
|
var _antd = require("antd");
|
|
10
10
|
require("./styles/index.less");
|
|
11
11
|
var _Wrapper = _interopRequireDefault(require("./styles/Wrapper"));
|
|
12
|
+
var _ConfigContext = require("../ConfigContext");
|
|
13
|
+
var _ContentHeader = _interopRequireDefault(require("./ContentHeader"));
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
+
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); }
|
|
18
|
+
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); }
|
|
13
19
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
14
20
|
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."); }
|
|
15
21
|
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); }
|
|
16
22
|
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; }
|
|
17
23
|
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; } }
|
|
18
24
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
25
|
+
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; }
|
|
26
|
+
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; }
|
|
27
|
+
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; }
|
|
28
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
29
|
+
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); }
|
|
19
30
|
var WrapperContent = function WrapperContent(props) {
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
var _proLayoutProps$heade, _proLayoutProps$heade2;
|
|
32
|
+
var InitFanContext = (0, _react.useContext)(_ConfigContext.FanContext);
|
|
33
|
+
var providerConfig = InitFanContext['SubfieldContent'] || {}; // 使用上下文(全局配置)设置扩展的配置项
|
|
34
|
+
var proLayoutProps = InitFanContext['proLayoutProps'] || {};
|
|
35
|
+
var _providerConfig$props = _objectSpread(_objectSpread({}, providerConfig), props),
|
|
36
|
+
children = _providerConfig$props.children,
|
|
37
|
+
light = _providerConfig$props.light,
|
|
38
|
+
className = _providerConfig$props.className,
|
|
39
|
+
style = _providerConfig$props.style,
|
|
40
|
+
_providerConfig$props2 = _providerConfig$props.noMargin,
|
|
41
|
+
noMargin = _providerConfig$props2 === void 0 ? false : _providerConfig$props2,
|
|
42
|
+
_providerConfig$props3 = _providerConfig$props.loading,
|
|
43
|
+
loading = _providerConfig$props3 === void 0 ? false : _providerConfig$props3,
|
|
44
|
+
loadingTip = _providerConfig$props.loadingTip,
|
|
45
|
+
header = _providerConfig$props.header;
|
|
29
46
|
var componentName = 'spec-wrapper-content';
|
|
30
47
|
var _useStyle = (0, _Wrapper.default)(componentName),
|
|
31
48
|
_useStyle2 = _slicedToArray(_useStyle, 2),
|
|
32
49
|
wrapSSR = _useStyle2[0],
|
|
33
50
|
hashId = _useStyle2[1];
|
|
34
|
-
|
|
51
|
+
var _useState = (0, _react.useState)(0),
|
|
52
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
53
|
+
headerHeight = _useState2[0],
|
|
54
|
+
setHeaderHeight = _useState2[1];
|
|
55
|
+
var headerRef = (0, _react.useRef)();
|
|
56
|
+
return wrapSSR( /*#__PURE__*/_react.default.createElement("div", {
|
|
57
|
+
className: (0, _classnames.default)(componentName, className, noMargin ? 'has-margin' : '', hashId),
|
|
58
|
+
style: style
|
|
59
|
+
}, proLayoutProps !== null && proLayoutProps !== void 0 && proLayoutProps.header || header ? /*#__PURE__*/_react.default.createElement(_ContentHeader.default, _extends({
|
|
60
|
+
ref: headerRef,
|
|
61
|
+
getClientHeight: setHeaderHeight,
|
|
62
|
+
className: (0, _classnames.default)('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' : '')
|
|
63
|
+
}, (proLayoutProps === null || proLayoutProps === void 0 ? void 0 : proLayoutProps.header) || {}, header || {})) : null, light ? /*#__PURE__*/_react.default.createElement("div", {
|
|
64
|
+
className: "spec-wrapper-content-block light-block"
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
66
|
+
className: 'spec-wrapper-content-body'
|
|
67
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Spin, {
|
|
35
68
|
spinning: loading,
|
|
36
69
|
tip: loadingTip,
|
|
37
70
|
wrapperClassName: 'spec-wrapper-content-spinning'
|
|
38
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
39
|
-
className:
|
|
40
|
-
style:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
71
|
+
}, " ", children))) : /*#__PURE__*/_react.default.createElement("div", {
|
|
72
|
+
className: 'spec-wrapper-content-body',
|
|
73
|
+
style: {
|
|
74
|
+
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)") : ''
|
|
75
|
+
}
|
|
76
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Spin, {
|
|
77
|
+
spinning: loading,
|
|
78
|
+
tip: loadingTip,
|
|
79
|
+
wrapperClassName: 'spec-wrapper-content-spinning'
|
|
80
|
+
}, " ", children, " "))));
|
|
44
81
|
};
|
|
45
82
|
var _default = exports.default = WrapperContent;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _genStyleHook = require("../../theme/utils/genStyleHook");
|
|
8
|
+
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); }
|
|
9
|
+
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; }
|
|
10
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
11
|
+
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); }
|
|
12
|
+
var SubfieldContentStyleFunc = function SubfieldContentStyleFunc(prefix) {
|
|
13
|
+
var prepareComponentToken = function prepareComponentToken(token) {
|
|
14
|
+
return {
|
|
15
|
+
// fontWeight: 400,
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
return (0, _genStyleHook.createStyleHook)(prefix, function (token) {
|
|
19
|
+
var prefixCls = ".".concat(prefix);
|
|
20
|
+
// console.log(' new TinyColor(token.colorPrimary).setAlpha(0.1)' ,new TinyColor(token.colorPrimary).setAlpha(0.1).toRgbString(), )
|
|
21
|
+
return [_defineProperty({}, prefixCls, {
|
|
22
|
+
marginBottom: token.marginMD,
|
|
23
|
+
'.spec-content-header-breadcrumb': {
|
|
24
|
+
height: '24px',
|
|
25
|
+
'& +.spec-content-header-title': {
|
|
26
|
+
marginTop: token.marginXS
|
|
27
|
+
// marginTop: token.margin
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
'.spec-content-header-title': {
|
|
31
|
+
fontSize: token.fontSizeLG,
|
|
32
|
+
fontWeight: 'bold',
|
|
33
|
+
lineHeight: '20px'
|
|
34
|
+
}
|
|
35
|
+
})];
|
|
36
|
+
}, prepareComponentToken // 当前组件扩展的变量
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
var _default = exports.default = SubfieldContentStyleFunc;
|
|
@@ -21,15 +21,33 @@ var SubfieldContentStyleFunc = function SubfieldContentStyleFunc(prefix) {
|
|
|
21
21
|
return (0, _genStyleHook.createStyleHook)(prefix, function (token) {
|
|
22
22
|
var prefixCls = ".".concat(prefix);
|
|
23
23
|
// console.log(' new TinyColor(token.colorPrimary).setAlpha(0.1)' ,new TinyColor(token.colorPrimary).setAlpha(0.1).toRgbString(), )
|
|
24
|
-
return [_defineProperty({}, prefixCls, {
|
|
24
|
+
return [_defineProperty({}, prefixCls, _objectSpread(_objectSpread({}, (0, _index.scrollBar)(token)), {}, {
|
|
25
|
+
'.spec-grid-content-header + .spec-grid-content-body': {
|
|
26
|
+
// height: `calc(100% - 60px)`
|
|
27
|
+
},
|
|
28
|
+
'.spec-grid-content-body': {
|
|
29
|
+
display: 'flex',
|
|
30
|
+
position: 'relative',
|
|
31
|
+
height: '100%'
|
|
32
|
+
},
|
|
33
|
+
'.spec-grid-left-cont': _objectSpread({
|
|
34
|
+
width: '100%',
|
|
35
|
+
height: '100%',
|
|
36
|
+
overflow: 'auto'
|
|
37
|
+
}, (0, _index.scrollBar)(token)),
|
|
25
38
|
'& .spec-grid-left': _objectSpread({
|
|
39
|
+
height: '100%',
|
|
40
|
+
// overflow: 'hidden',
|
|
41
|
+
overflow: 'auto',
|
|
26
42
|
padding: token.paddingMD,
|
|
27
|
-
background: token.colorBgBase
|
|
43
|
+
background: token.colorBgBase,
|
|
44
|
+
boxSizing: 'border-box'
|
|
28
45
|
}, (0, _index.scrollBar)(token)),
|
|
29
46
|
'& .spec-grid-right': _objectSpread({
|
|
30
|
-
padding:
|
|
47
|
+
padding: 0,
|
|
48
|
+
marginLeft: token.marginMD
|
|
31
49
|
}, (0, _index.scrollBar)(token))
|
|
32
|
-
})];
|
|
50
|
+
}))];
|
|
33
51
|
}, prepareComponentToken // 当前组件扩展的变量
|
|
34
52
|
);
|
|
35
53
|
};
|
|
@@ -5,7 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _genStyleHook = require("../../theme/utils/genStyleHook");
|
|
8
|
+
var _index = require("../../theme/index");
|
|
8
9
|
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); }
|
|
10
|
+
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; }
|
|
11
|
+
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; }
|
|
9
12
|
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; }
|
|
10
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
11
14
|
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); }
|
|
@@ -17,17 +20,18 @@ var WrapperContentStyleFunc = function WrapperContentStyleFunc(prefix) {
|
|
|
17
20
|
};
|
|
18
21
|
return (0, _genStyleHook.createStyleHook)(prefix, function (token) {
|
|
19
22
|
var prefixCls = ".".concat(prefix);
|
|
20
|
-
return [_defineProperty({}, prefixCls, {
|
|
23
|
+
return [_defineProperty(_defineProperty(_defineProperty({}, prefixCls, _objectSpread(_objectSpread({
|
|
21
24
|
position: 'relative',
|
|
22
25
|
padding: token.paddingMD,
|
|
23
26
|
background: token.colorBgLayout,
|
|
24
27
|
height: '100%',
|
|
25
|
-
overflow: 'auto'
|
|
28
|
+
overflow: 'auto'
|
|
29
|
+
}, (0, _index.scrollBar)(token)), {}, {
|
|
26
30
|
'& .light-block': {
|
|
27
31
|
padding: token.paddingMD,
|
|
28
32
|
background: token.colorBgBase
|
|
29
33
|
}
|
|
30
|
-
})];
|
|
34
|
+
})), '.spec-wrapper-content-header', {}), '.spec-wrapper-content-body', {})];
|
|
31
35
|
}, prepareComponentToken // 当前组件扩展的变量
|
|
32
36
|
);
|
|
33
37
|
};
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
//background: @background-color-base;
|
|
20
20
|
height: 100%;
|
|
21
21
|
overflow: auto;
|
|
22
|
-
box-sizing: border-box;
|
|
22
|
+
//box-sizing: border-box;
|
|
23
23
|
|
|
24
24
|
& * {
|
|
25
|
-
box-sizing: border-box;
|
|
25
|
+
//box-sizing: border-box;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
& .light-block {
|
|
@@ -34,21 +34,21 @@
|
|
|
34
34
|
|
|
35
35
|
.spec-grid-content {
|
|
36
36
|
position: relative;
|
|
37
|
-
display: flex;
|
|
37
|
+
// display: flex;
|
|
38
38
|
//height: calc(100vh - @layout-header-height);
|
|
39
|
-
height: 100%;
|
|
39
|
+
//height: 100%;
|
|
40
40
|
background: transparent; // @background-color-base;
|
|
41
|
-
box-sizing: border-box;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
41
|
+
//box-sizing: border-box;
|
|
42
|
+
//
|
|
43
|
+
//& * {
|
|
44
|
+
// box-sizing: border-box;
|
|
45
|
+
//}
|
|
46
46
|
.spec-grid-left {
|
|
47
47
|
//height: calc(100vh - @layout-header-height);
|
|
48
|
-
height: 100%;
|
|
48
|
+
//height: 100%;
|
|
49
49
|
//padding: @padding-md @padding-sm;
|
|
50
50
|
//background: @layout-body-background;
|
|
51
|
-
overflow-y: auto;
|
|
51
|
+
//overflow-y: auto;
|
|
52
52
|
//.scroll-bar();
|
|
53
53
|
.ant-tree-list,
|
|
54
54
|
.ant-tree {
|
|
@@ -20,14 +20,14 @@ var StandardPanelStyleFunc = function StandardPanelStyleFunc(prefix) {
|
|
|
20
20
|
};
|
|
21
21
|
return (0, _genStyleHook.createStyleHook)(prefix, function (token) {
|
|
22
22
|
var prefixCls = ".".concat(prefix);
|
|
23
|
-
return [_defineProperty(_defineProperty(_defineProperty({}, prefixCls, {
|
|
23
|
+
return [_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, prefixCls, {
|
|
24
24
|
'.ant-modal-body ': _objectSpread(_objectSpread({}, (0, _index.scrollBar)(token)), {}, {
|
|
25
25
|
padding: "".concat(token.paddingXS, "px 0")
|
|
26
26
|
}),
|
|
27
27
|
'&.ant-modal .ant-modal-footer .ant-btn + .ant-btn': {
|
|
28
28
|
marginInlineStart: token.marginXS
|
|
29
29
|
},
|
|
30
|
-
'.
|
|
30
|
+
'.spec-standard-form': {
|
|
31
31
|
'&.ant-form-horizontal .ant-form-item-label': {
|
|
32
32
|
'> label': {
|
|
33
33
|
minHeight: token.controlHeight + 'px'
|
|
@@ -46,7 +46,9 @@ var StandardPanelStyleFunc = function StandardPanelStyleFunc(prefix) {
|
|
|
46
46
|
'&:before': {
|
|
47
47
|
borderLeft: " 4px solid ".concat(token.colorPrimary)
|
|
48
48
|
}
|
|
49
|
-
}), '.modalPanelTitle, .modal-grid-title', {
|
|
49
|
+
}), '.modalPanelTitle', {}), '.modalPanelTitle, .modal-grid-title', {
|
|
50
|
+
height: token.controlHeight + 'px',
|
|
51
|
+
lineHeight: token.controlHeight + 'px',
|
|
50
52
|
margin: "0 0 ".concat(token.margin, "px 0"),
|
|
51
53
|
paddingBottom: token.paddingXS,
|
|
52
54
|
borderBottom: "1px solid ".concat(token.colorBorder)
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
white-space: inherit;
|
|
21
21
|
> label {
|
|
22
22
|
//min-height: @input-height-base;
|
|
23
|
-
height: auto;
|
|
23
|
+
//height: auto;
|
|
24
24
|
&.ant-form-item-required::before {
|
|
25
25
|
margin-right: 2px;
|
|
26
26
|
}
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
.modalPanelTitle {
|
|
33
|
-
height: 32px;
|
|
33
|
+
//height: 32px;
|
|
34
34
|
//margin: 0 0 @padding-md 0;
|
|
35
35
|
//padding-bottom: @padding-xs;
|
|
36
36
|
//color: @text-color;
|
|
37
37
|
//font-size: @font-size-base + 1;
|
|
38
38
|
font-weight: bold;
|
|
39
|
-
line-height: 32px;
|
|
39
|
+
//line-height: 32px;
|
|
40
40
|
//border-bottom: 1px solid @border-color-base;
|
|
41
41
|
}
|
|
42
42
|
.ant-form-item.form-item-view-only {
|
|
@@ -50,14 +50,14 @@
|
|
|
50
50
|
}
|
|
51
51
|
.modalGridTitle,
|
|
52
52
|
.modal-grid-title{
|
|
53
|
-
height: 32px;
|
|
53
|
+
//height: 32px;
|
|
54
54
|
//margin: 0 0 @padding-md 0;
|
|
55
55
|
//padding-bottom: @padding-xs;
|
|
56
56
|
//padding-left: @padding-xs;
|
|
57
57
|
//color: @text-color;
|
|
58
58
|
//font-size: @font-size-base + 1;
|
|
59
59
|
//font-weight: bold;
|
|
60
|
-
line-height: 32px;
|
|
60
|
+
//line-height: 32px;
|
|
61
61
|
position: relative;
|
|
62
62
|
&.modalPanelTitle {
|
|
63
63
|
border-bottom: 0;
|
|
@@ -111,9 +111,9 @@ var StandardTable = function StandardTable(props) {
|
|
|
111
111
|
if (typeof buttonGroup === 'function') recombinationGroup = buttonGroup(text, record, rowIndex); // 方法返回数组结构
|
|
112
112
|
// 判断是否是数组且长度大于0时 ?{如下结构渲染} : {按buttonGroup返回的node渲染}
|
|
113
113
|
if (Array.isArray(buttonGroup) || typeof buttonGroup === 'function') {
|
|
114
|
-
var _colItem4, _colItem5;
|
|
114
|
+
var _colItem4, _colItem5, _colItem6;
|
|
115
115
|
if (recombinationGroup.length === 0) return '-';
|
|
116
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
116
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, _extends({
|
|
117
117
|
type: "text",
|
|
118
118
|
min: colItem.min || 2 // 配置按钮展示最少数量,其他的将会被折叠
|
|
119
119
|
,
|
|
@@ -124,11 +124,12 @@ var StandardTable = function StandardTable(props) {
|
|
|
124
124
|
text: text,
|
|
125
125
|
record: record,
|
|
126
126
|
rowIndex: rowIndex
|
|
127
|
-
}
|
|
128
|
-
dropdownConfig
|
|
127
|
+
}
|
|
128
|
+
// dropdownConfig={colItem.buttonGroupConfig || {}}
|
|
129
|
+
,
|
|
129
130
|
moreText: (_colItem4 = colItem) === null || _colItem4 === void 0 ? void 0 : _colItem4.moreText,
|
|
130
131
|
moreIcon: (_colItem5 = colItem) === null || _colItem5 === void 0 ? void 0 : _colItem5.moreIcon
|
|
131
|
-
});
|
|
132
|
+
}, ((_colItem6 = colItem) === null || _colItem6 === void 0 ? void 0 : _colItem6.buttonGroupConfig) || {}));
|
|
132
133
|
} else {
|
|
133
134
|
return buttonGroup;
|
|
134
135
|
}
|
|
@@ -157,13 +158,12 @@ var StandardTable = function StandardTable(props) {
|
|
|
157
158
|
batchButtonGroup = exProps.batchButtonGroup;
|
|
158
159
|
// 只有配置rowSelection才显示对应的批量按钮组
|
|
159
160
|
var list = _lodash.default.unionBy(rowSelection && (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.type) !== 'radio' && (batchButtonGroup || []), buttonGroup || []);
|
|
160
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
161
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, _extends({
|
|
161
162
|
options: list,
|
|
162
163
|
min: min,
|
|
163
164
|
codes: codes,
|
|
164
|
-
permissionCodes: permissionCodes
|
|
165
|
-
|
|
166
|
-
});
|
|
165
|
+
permissionCodes: permissionCodes
|
|
166
|
+
}, buttonGroupConfig));
|
|
167
167
|
};
|
|
168
168
|
return wrapSSR( /*#__PURE__*/_react.default.createElement(_antd.Card, {
|
|
169
169
|
className: (0, _classnames.default)(componentName, 'standard-table', className, hashId),
|
|
@@ -84,7 +84,7 @@ var StandardTableStyleFunc = function StandardTableStyleFunc(prefix) {
|
|
|
84
84
|
'table': {
|
|
85
85
|
fontSize: token.fontSize,
|
|
86
86
|
'> .ant-table-thead > tr > th': {
|
|
87
|
-
fontSize: token.
|
|
87
|
+
fontSize: token.fontSize
|
|
88
88
|
},
|
|
89
89
|
'.ant-table-thead > tr > th': {
|
|
90
90
|
padding: "12px ".concat(token.paddingMD, "px"),
|