@ccs-ui/rc-pro 2.3.6-alpha-16 → 2.3.6-alpha-17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/config.js
CHANGED
|
@@ -68,6 +68,7 @@ function AppConfig(_ref) {
|
|
|
68
68
|
cssVar = _ref2.cssVar,
|
|
69
69
|
components = _ref2.components,
|
|
70
70
|
otherConfig = _objectWithoutProperties(_ref2, _excluded);
|
|
71
|
+
console.log('themeConfig', themeConfig);
|
|
71
72
|
var algorithm = function algorithm() {
|
|
72
73
|
var algorithms = theme === 'dark' ? [antTheme.darkAlgorithm] : [antTheme.defaultAlgorithm];
|
|
73
74
|
if (isCompact) {
|
|
@@ -77,7 +78,8 @@ function AppConfig(_ref) {
|
|
|
77
78
|
};
|
|
78
79
|
useEffect(function () {
|
|
79
80
|
var prefix = _typeof(cssVar) === 'object' ? cssVar.prefix : 'ant';
|
|
80
|
-
|
|
81
|
+
console.log('prefix', prefix);
|
|
82
|
+
var csss = [".ccs-tabs-auto-height > .ant-tabs-content-holder,\n .ccs-tabs-auto-height > .ant-tabs-content-holder > .ant-tabs-content,\n .ccs-tabs-auto-height > .ant-tabs-content-holder > .ant-tabs-content > div,\n .ccs-tabs-auto-height> .ant-tabs-content-holder> .ant-tabs-content> div> .ccs-pl { height: 100%;}", ".ccs-keep-alive-nav .".concat(prefix, "-tabs-tab {border: 0 !important;border-radius: 0 !important;}"), ".ccs-keep-alive-nav .".concat(prefix, "-tabs-tab-active {background-color: #f0f2f5 !important;}"), ".ccs-keep-alive .dark .ccs-keep-alive-nav .".concat(prefix, "-tabs-tab-active {background-color: #2b2c2c !important;} "), ".ccs-pl .".concat(prefix, "-table-title {padding:0} ")];
|
|
81
83
|
insertCss(csss.join(''));
|
|
82
84
|
}, []);
|
|
83
85
|
useEffect(function () {}, []);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TagProps } from 'antd';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { CSSProperties } from 'react';
|
|
3
3
|
interface PropsType {
|
|
4
4
|
data: any[];
|
|
5
5
|
color?: TagProps['color'];
|
|
@@ -8,11 +8,13 @@ interface PropsType {
|
|
|
8
8
|
label: string;
|
|
9
9
|
};
|
|
10
10
|
onClear: (key?: React.Key) => void;
|
|
11
|
+
style?: CSSProperties;
|
|
12
|
+
className?: string;
|
|
11
13
|
}
|
|
12
14
|
/**
|
|
13
15
|
* 显示table行选中项
|
|
14
16
|
* @param PropsType
|
|
15
17
|
* @returns
|
|
16
18
|
*/
|
|
17
|
-
export default function SelectionAlert({ data, color, fieldNames, onClear, }: PropsType): import("react/jsx-runtime").JSX.Element | undefined;
|
|
19
|
+
export default function SelectionAlert({ data, color, style, className, fieldNames, onClear, }: PropsType): import("react/jsx-runtime").JSX.Element | undefined;
|
|
18
20
|
export {};
|
|
@@ -1,5 +1,11 @@
|
|
|
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; }
|
|
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; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
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); }
|
|
1
7
|
import { DeleteOutlined } from '@ant-design/icons';
|
|
2
|
-
import { Button, Space, Tag } from 'antd';
|
|
8
|
+
import { Button, Space, Tag, theme } from 'antd';
|
|
3
9
|
import React from 'react';
|
|
4
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
11
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -11,18 +17,27 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
11
17
|
export default function SelectionAlert(_ref) {
|
|
12
18
|
var data = _ref.data,
|
|
13
19
|
color = _ref.color,
|
|
20
|
+
style = _ref.style,
|
|
21
|
+
className = _ref.className,
|
|
14
22
|
_ref$fieldNames = _ref.fieldNames,
|
|
15
23
|
fieldNames = _ref$fieldNames === void 0 ? {
|
|
16
24
|
key: 'key',
|
|
17
25
|
label: 'label'
|
|
18
26
|
} : _ref$fieldNames,
|
|
19
27
|
onClear = _ref.onClear;
|
|
28
|
+
var _theme$useToken = theme.useToken(),
|
|
29
|
+
token = _theme$useToken.token;
|
|
20
30
|
if (!data || data.length === 0) {
|
|
21
31
|
return undefined;
|
|
22
32
|
}
|
|
33
|
+
var px = "".concat(token.paddingSM, "px");
|
|
23
34
|
return /*#__PURE__*/_jsxs(Space, {
|
|
24
35
|
size: 4,
|
|
25
36
|
wrap: true,
|
|
37
|
+
style: _objectSpread({
|
|
38
|
+
padding: "0 ".concat(px, " ").concat(px, " ").concat(px)
|
|
39
|
+
}, style),
|
|
40
|
+
className: className,
|
|
26
41
|
children: [data.map(function () {
|
|
27
42
|
var row = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
28
43
|
return /*#__PURE__*/_jsx(Tag, {
|
package/es/pro-table/table.js
CHANGED
|
@@ -154,6 +154,8 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
154
154
|
theme = _useAppConfig.theme;
|
|
155
155
|
// 接口字段指定全局配置
|
|
156
156
|
var globalFieldNames = useProTableFields();
|
|
157
|
+
var _antTheme$useToken = antTheme.useToken(),
|
|
158
|
+
token = _antTheme$useToken.token;
|
|
157
159
|
|
|
158
160
|
// 暗黑模式
|
|
159
161
|
var isDark = theme === 'dark';
|
|
@@ -583,8 +585,6 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
583
585
|
onEvent: onEvent
|
|
584
586
|
}));
|
|
585
587
|
};
|
|
586
|
-
var _antTheme$useToken = antTheme.useToken(),
|
|
587
|
-
token = _antTheme$useToken.token;
|
|
588
588
|
var rootStyle = styles.root || {};
|
|
589
589
|
if (bordered) {
|
|
590
590
|
rootStyle = _objectSpread({
|
|
@@ -632,7 +632,7 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
632
632
|
// 有查询条件
|
|
633
633
|
var hasFormItem = formItems.length > 0;
|
|
634
634
|
// 头部间距
|
|
635
|
-
var tokenPadding =
|
|
635
|
+
var tokenPadding = tableRowSize === 'small' ? token.paddingSM : token.padding;
|
|
636
636
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
637
637
|
children: [/*#__PURE__*/_jsx(CcsResizeObserver.Target, {
|
|
638
638
|
targetRef: tableContentRef,
|