@ccs-ui/rc-pro 1.1.23-beta-4 → 1.1.23-beta-5
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.
|
@@ -7,5 +7,5 @@ type PropsType = {
|
|
|
7
7
|
className?: string;
|
|
8
8
|
history: any;
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
export
|
|
10
|
+
export default function KeepAliveTabs({ maxLen, appName, history, menus, className, }: PropsType): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
4
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
2
5
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
3
6
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
7
|
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); }
|
|
@@ -30,7 +33,8 @@ var extraItems = [{
|
|
|
30
33
|
label: '关闭所有标签'
|
|
31
34
|
}];
|
|
32
35
|
var RouteHistorys = [];
|
|
33
|
-
export default
|
|
36
|
+
export default function KeepAliveTabs(_ref) {
|
|
37
|
+
var _classnames;
|
|
34
38
|
var _ref$maxLen = _ref.maxLen,
|
|
35
39
|
maxLen = _ref$maxLen === void 0 ? 10 : _ref$maxLen,
|
|
36
40
|
appName = _ref.appName,
|
|
@@ -47,6 +51,7 @@ export default (function (_ref) {
|
|
|
47
51
|
var _theme$useToken = theme.useToken(),
|
|
48
52
|
token = _theme$useToken.token;
|
|
49
53
|
var isDark = token._appTheme === 'dark';
|
|
54
|
+
var isColorful = token._appTheme === 'colorful';
|
|
50
55
|
|
|
51
56
|
// 超过缓存数量,删除第一个
|
|
52
57
|
if (components.current.length >= maxLen) {
|
|
@@ -222,13 +227,12 @@ export default (function (_ref) {
|
|
|
222
227
|
children: /*#__PURE__*/_jsx("div", {})
|
|
223
228
|
}), /*#__PURE__*/_jsx(Tabs, {
|
|
224
229
|
id: "keep-alive-tabs",
|
|
225
|
-
hideAdd: true
|
|
226
|
-
|
|
227
|
-
,
|
|
230
|
+
hideAdd: true,
|
|
231
|
+
size: "small",
|
|
228
232
|
onChange: function onChange(e) {
|
|
229
233
|
history.push(e);
|
|
230
234
|
},
|
|
231
|
-
className:
|
|
235
|
+
className: classnames((_classnames = {}, _defineProperty(_classnames, 'ccs-keep-alive-tabs', !isColorful), _defineProperty(_classnames, 'dark', isDark), _defineProperty(_classnames, 'ccs-keep-alive-tabs-colorful', isColorful), _classnames)),
|
|
232
236
|
activeKey: pathname,
|
|
233
237
|
type: "editable-card",
|
|
234
238
|
onEdit: function onEdit(e) {
|
|
@@ -251,4 +255,4 @@ export default (function (_ref) {
|
|
|
251
255
|
}, key);
|
|
252
256
|
})]
|
|
253
257
|
});
|
|
254
|
-
}
|
|
258
|
+
}
|
|
@@ -4,6 +4,32 @@
|
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-direction: column;
|
|
6
6
|
|
|
7
|
+
&-tabs-colorful {
|
|
8
|
+
& > .ant-tabs-nav {
|
|
9
|
+
margin: 0;
|
|
10
|
+
&::before {
|
|
11
|
+
background: #fff;
|
|
12
|
+
opacity: 0.1;
|
|
13
|
+
position: absolute;
|
|
14
|
+
inset: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.ant-tabs-tab-active {
|
|
18
|
+
background-color: #fff;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.ant-tabs-tab {
|
|
22
|
+
border: 0;
|
|
23
|
+
padding: 6px 16px !important;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ant-tabs-tab,
|
|
27
|
+
.ant-tabs-tab-remove,
|
|
28
|
+
.ant-tabs-extra-content > .ant-dropdown-trigger {
|
|
29
|
+
color: #03a9f4;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
7
33
|
&-tabs {
|
|
8
34
|
background-color: #fff;
|
|
9
35
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { PageContext } from "../es/context";
|
|
1
2
|
import { memo, useRef } from 'react';
|
|
2
3
|
import Scrollbars from 'react-custom-scrollbars';
|
|
3
|
-
import { PageContext } from "../context";
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
export default /*#__PURE__*/memo(function (props) {
|
|
6
6
|
var locationRef = useRef(props.location);
|
package/es/pro-table/table.js
CHANGED
|
@@ -500,7 +500,9 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
500
500
|
});
|
|
501
501
|
return watermark ? /*#__PURE__*/_jsx(CcsWaterMark, {
|
|
502
502
|
content: watermark,
|
|
503
|
-
|
|
503
|
+
gapX: 40,
|
|
504
|
+
gapY: 40,
|
|
505
|
+
offsetTop: 40,
|
|
504
506
|
zIndex: 105,
|
|
505
507
|
children: render
|
|
506
508
|
}) : render;
|