ztxkui 4.2.23-624 → 4.2.23-626
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/components/CanvasTable/components/BadgePopover.d.ts +12 -0
- package/dist/components/CanvasTable/components/BadgePopover.js +24 -0
- package/dist/components/CanvasTable/components/CellOverlay.d.ts +6 -0
- package/dist/components/CanvasTable/components/CellOverlay.js +26 -0
- package/dist/components/CanvasTable/components/FilterPopover.d.ts +32 -0
- package/dist/components/CanvasTable/components/FilterPopover.js +109 -0
- package/dist/components/CanvasTable/components/SubtotalTip.d.ts +11 -0
- package/dist/components/CanvasTable/components/SubtotalTip.js +23 -0
- package/dist/components/CanvasTable/components/TableMenu.d.ts +12 -0
- package/dist/components/CanvasTable/components/TableMenu.js +23 -0
- package/dist/components/CanvasTable/components/Tooltip.d.ts +10 -0
- package/dist/components/CanvasTable/components/Tooltip.js +21 -0
- package/dist/components/CanvasTable/constants.d.ts +41 -0
- package/dist/components/CanvasTable/constants.js +41 -0
- package/dist/components/CanvasTable/draw/canvas.d.ts +5 -0
- package/dist/components/CanvasTable/draw/canvas.js +415 -0
- package/dist/components/CanvasTable/draw/index.d.ts +3 -0
- package/dist/components/CanvasTable/draw/index.js +3 -0
- package/dist/components/CanvasTable/draw/primitives.d.ts +10 -0
- package/dist/components/CanvasTable/draw/primitives.js +135 -0
- package/dist/components/CanvasTable/draw/scene.d.ts +169 -0
- package/dist/components/CanvasTable/draw/scene.js +412 -0
- package/dist/components/CanvasTable/hooks/index.d.ts +8 -0
- package/dist/components/CanvasTable/hooks/index.js +8 -0
- package/dist/components/CanvasTable/hooks/useAutoHeight.d.ts +21 -0
- package/dist/components/CanvasTable/hooks/useAutoHeight.js +54 -0
- package/dist/components/CanvasTable/hooks/useCanvasDraw.d.ts +13 -0
- package/dist/components/CanvasTable/hooks/useCanvasDraw.js +33 -0
- package/dist/components/CanvasTable/hooks/useColumnWidths.d.ts +11 -0
- package/dist/components/CanvasTable/hooks/useColumnWidths.js +50 -0
- package/dist/components/CanvasTable/hooks/useContainerSize.d.ts +10 -0
- package/dist/components/CanvasTable/hooks/useContainerSize.js +28 -0
- package/dist/components/CanvasTable/hooks/useCopy.d.ts +14 -0
- package/dist/components/CanvasTable/hooks/useCopy.js +91 -0
- package/dist/components/CanvasTable/hooks/useExpandable.d.ts +22 -0
- package/dist/components/CanvasTable/hooks/useExpandable.js +81 -0
- package/dist/components/CanvasTable/hooks/useInteractions.d.ts +87 -0
- package/dist/components/CanvasTable/hooks/useInteractions.js +742 -0
- package/dist/components/CanvasTable/hooks/useScrollState.d.ts +31 -0
- package/dist/components/CanvasTable/hooks/useScrollState.js +105 -0
- package/dist/components/CanvasTable/index.d.ts +12 -0
- package/dist/components/CanvasTable/index.js +876 -0
- package/dist/components/CanvasTable/interface.d.ts +215 -0
- package/dist/components/CanvasTable/interface.js +1 -0
- package/dist/components/CanvasTable/utils/data.d.ts +7 -0
- package/dist/components/CanvasTable/utils/data.js +120 -0
- package/dist/components/CanvasTable/utils/format.d.ts +6 -0
- package/dist/components/CanvasTable/utils/format.js +40 -0
- package/dist/components/CanvasTable/utils/hitTest.d.ts +107 -0
- package/dist/components/CanvasTable/utils/hitTest.js +264 -0
- package/dist/components/CanvasTable/utils/index.d.ts +9 -0
- package/dist/components/CanvasTable/utils/index.js +9 -0
- package/dist/components/CanvasTable/utils/layout.d.ts +70 -0
- package/dist/components/CanvasTable/utils/layout.js +112 -0
- package/dist/components/CanvasTable/utils/merge.d.ts +17 -0
- package/dist/components/CanvasTable/utils/merge.js +57 -0
- package/dist/components/CanvasTable/utils/multiHeader.d.ts +26 -0
- package/dist/components/CanvasTable/utils/multiHeader.js +74 -0
- package/dist/components/CanvasTable/utils/rowHeights.d.ts +34 -0
- package/dist/components/CanvasTable/utils/rowHeights.js +96 -0
- package/dist/components/CanvasTable/utils/subtotal.d.ts +25 -0
- package/dist/components/CanvasTable/utils/subtotal.js +76 -0
- package/dist/components/CanvasTable/utils/summary.d.ts +9 -0
- package/dist/components/CanvasTable/utils/summary.js +38 -0
- package/dist/components/CanvasTable/utils/text.d.ts +7 -0
- package/dist/components/CanvasTable/utils/text.js +91 -0
- package/dist/index.build.d.ts +2 -0
- package/dist/index.build.js +1 -0
- package/dist/index.css +30 -0
- package/dist/index.css.map +1 -1
- package/package.json +115 -115
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface BadgePopoverState {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
content: string;
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
}
|
|
8
|
+
/** 角标点击弹窗(视口坐标定位) */
|
|
9
|
+
export declare function BadgePopover({ state, onClose, }: {
|
|
10
|
+
state: BadgePopoverState;
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** 角标点击弹窗(视口坐标定位) */
|
|
3
|
+
export function BadgePopover(_a) {
|
|
4
|
+
var state = _a.state, onClose = _a.onClose;
|
|
5
|
+
if (!state.visible)
|
|
6
|
+
return null;
|
|
7
|
+
return (React.createElement(React.Fragment, null,
|
|
8
|
+
React.createElement("div", { style: { position: 'fixed', inset: 0, zIndex: 98 }, onMouseDown: onClose }),
|
|
9
|
+
React.createElement("div", { className: "zt-canvas-table__badge-popover", style: {
|
|
10
|
+
position: 'fixed',
|
|
11
|
+
left: state.x + 10,
|
|
12
|
+
top: state.y + 12,
|
|
13
|
+
maxWidth: 280,
|
|
14
|
+
padding: '6px 10px',
|
|
15
|
+
background: '#fff',
|
|
16
|
+
boxShadow: '0 2px 8px rgba(0, 0, 0, 0.15)',
|
|
17
|
+
borderRadius: 2,
|
|
18
|
+
fontSize: 12,
|
|
19
|
+
lineHeight: '18px',
|
|
20
|
+
color: '#333',
|
|
21
|
+
zIndex: 99,
|
|
22
|
+
wordBreak: 'break-all',
|
|
23
|
+
} }, state.content || '无提示信息')));
|
|
24
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** 单元格覆盖层:render 返回 ReactNode 的单元格、ReactNode 表头 */
|
|
3
|
+
export function CellOverlay(_a) {
|
|
4
|
+
var overlays = _a.overlays;
|
|
5
|
+
if (overlays.length === 0)
|
|
6
|
+
return null;
|
|
7
|
+
return (React.createElement(React.Fragment, null, overlays.map(function (cell) { return (React.createElement("div", { key: "overlay-" + cell.row + "-" + cell.col, className: "zt-canvas-table__cell-overlay", style: {
|
|
8
|
+
position: 'absolute',
|
|
9
|
+
left: cell.x,
|
|
10
|
+
top: cell.y,
|
|
11
|
+
width: cell.width,
|
|
12
|
+
height: cell.height,
|
|
13
|
+
display: 'flex',
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
justifyContent: (cell.row < 0 ? cell.headerAlign : cell.align) === 'center'
|
|
16
|
+
? 'center'
|
|
17
|
+
: (cell.row < 0 ? cell.headerAlign : cell.align) === 'right'
|
|
18
|
+
? 'flex-end'
|
|
19
|
+
: 'flex-start',
|
|
20
|
+
overflow: 'hidden',
|
|
21
|
+
padding: '0 8px',
|
|
22
|
+
pointerEvents: 'auto',
|
|
23
|
+
boxSizing: 'border-box',
|
|
24
|
+
clipPath: cell.clipPath,
|
|
25
|
+
} }, cell.node)); })));
|
|
26
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IColumnType, IFilterItem } from '../interface';
|
|
3
|
+
export interface FilterPopoverState {
|
|
4
|
+
visible: boolean;
|
|
5
|
+
columnKey: string | null;
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
}
|
|
9
|
+
/** 带模糊标记的搜索词(applyFilters 识别后走 contains 匹配) */
|
|
10
|
+
export interface IFuzzyFilterValue {
|
|
11
|
+
__fuzzy__: boolean;
|
|
12
|
+
text: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function isFuzzyFilterValue(value: any): value is IFuzzyFilterValue;
|
|
15
|
+
/** 把搜索词拆成模糊条件数组(逗号/空格分隔,对齐 Table FilterDropdown) */
|
|
16
|
+
export declare function splitSearchTerms(input: string): IFuzzyFilterValue[];
|
|
17
|
+
export declare const NULL_SIGN = "__null__";
|
|
18
|
+
interface FilterPopoverProps<T = any> {
|
|
19
|
+
state: FilterPopoverState;
|
|
20
|
+
/** 当前列的候选值(自定义 filters 优先,否则自动生成) */
|
|
21
|
+
options: IFilterItem[];
|
|
22
|
+
column: IColumnType<T> | null;
|
|
23
|
+
activeValues: any[];
|
|
24
|
+
onChange: (columnKey: string, values: any[]) => void;
|
|
25
|
+
onClose: () => void;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* 列筛选弹窗:搜索框(多条件模糊,逗号/空格分隔)+ 候选值多选,
|
|
29
|
+
* 交互与样式对齐 Table 组件的 FilterDropdown
|
|
30
|
+
*/
|
|
31
|
+
export declare function FilterPopover<T = any>(props: FilterPopoverProps<T>): JSX.Element;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
2
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
3
|
+
to[j] = from[i];
|
|
4
|
+
return to;
|
|
5
|
+
};
|
|
6
|
+
import React, { useEffect, useState } from 'react';
|
|
7
|
+
import { Checkbox, Empty, Button, Input, Tooltip } from 'antd';
|
|
8
|
+
import { QuestionCircleOutlined } from '@ant-design/icons';
|
|
9
|
+
export function isFuzzyFilterValue(value) {
|
|
10
|
+
return !!value && typeof value === 'object' && '__fuzzy__' in value;
|
|
11
|
+
}
|
|
12
|
+
/** 把搜索词拆成模糊条件数组(逗号/空格分隔,对齐 Table FilterDropdown) */
|
|
13
|
+
export function splitSearchTerms(input) {
|
|
14
|
+
if (!input)
|
|
15
|
+
return [];
|
|
16
|
+
return input
|
|
17
|
+
.split(/,|\s+/)
|
|
18
|
+
.filter(function (s) { return s.length > 0; })
|
|
19
|
+
.map(function (s) { return ({ __fuzzy__: true, text: s }); });
|
|
20
|
+
}
|
|
21
|
+
export var NULL_SIGN = '__null__';
|
|
22
|
+
/**
|
|
23
|
+
* 列筛选弹窗:搜索框(多条件模糊,逗号/空格分隔)+ 候选值多选,
|
|
24
|
+
* 交互与样式对齐 Table 组件的 FilterDropdown
|
|
25
|
+
*/
|
|
26
|
+
export function FilterPopover(props) {
|
|
27
|
+
var state = props.state, options = props.options, activeValues = props.activeValues, onChange = props.onChange, onClose = props.onClose;
|
|
28
|
+
// 搜索词(表单值)与勾选值分开维护(对齐 FilterDropdown)
|
|
29
|
+
var _a = useState(''), searchText = _a[0], setSearchText = _a[1];
|
|
30
|
+
var _b = useState([]), checked = _b[0], setChecked = _b[1];
|
|
31
|
+
useEffect(function () {
|
|
32
|
+
if (state.visible) {
|
|
33
|
+
// 回显:已生效的筛选值拆回 勾选值 + 搜索词
|
|
34
|
+
var keptChecked = [];
|
|
35
|
+
var keptSearch = [];
|
|
36
|
+
for (var _i = 0, activeValues_1 = activeValues; _i < activeValues_1.length; _i++) {
|
|
37
|
+
var v = activeValues_1[_i];
|
|
38
|
+
if (isFuzzyFilterValue(v))
|
|
39
|
+
keptSearch.push(v.text);
|
|
40
|
+
else
|
|
41
|
+
keptChecked.push(v);
|
|
42
|
+
}
|
|
43
|
+
setChecked(keptChecked);
|
|
44
|
+
setSearchText(keptSearch.join(' '));
|
|
45
|
+
}
|
|
46
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
47
|
+
}, [state.visible, state.columnKey]);
|
|
48
|
+
var columnKey = state.columnKey;
|
|
49
|
+
if (!state.visible || !columnKey || !props.column)
|
|
50
|
+
return null;
|
|
51
|
+
/** 搜索词 + 勾选值合并为筛选值(对齐 FilterDropdown 的语义) */
|
|
52
|
+
var commit = function (nextChecked, nextSearch) {
|
|
53
|
+
onChange(columnKey, __spreadArray(__spreadArray([], splitSearchTerms(nextSearch)), nextChecked));
|
|
54
|
+
};
|
|
55
|
+
var handleSearchInput = function (e) {
|
|
56
|
+
var value = e.target.value;
|
|
57
|
+
setSearchText(value);
|
|
58
|
+
commit(checked, value);
|
|
59
|
+
};
|
|
60
|
+
var handleCheckToggle = function (value, isChecked) {
|
|
61
|
+
var next = isChecked
|
|
62
|
+
? __spreadArray(__spreadArray([], checked), [value]) : checked.filter(function (v) { return v !== value; });
|
|
63
|
+
setChecked(next);
|
|
64
|
+
commit(next, searchText);
|
|
65
|
+
};
|
|
66
|
+
var handleReset = function () {
|
|
67
|
+
setSearchText('');
|
|
68
|
+
setChecked([]);
|
|
69
|
+
onChange(columnKey, []);
|
|
70
|
+
};
|
|
71
|
+
var handleSearch = function () {
|
|
72
|
+
// 搜索值已在输入时即时应用,这里仅关闭弹窗
|
|
73
|
+
onClose();
|
|
74
|
+
};
|
|
75
|
+
return (React.createElement(React.Fragment, null,
|
|
76
|
+
React.createElement("div", { style: { position: 'fixed', inset: 0, zIndex: 98 }, onMouseDown: onClose }),
|
|
77
|
+
React.createElement("div", { className: "zt-canvas-table__popover", style: {
|
|
78
|
+
position: 'absolute',
|
|
79
|
+
left: state.x,
|
|
80
|
+
top: state.y,
|
|
81
|
+
width: 200,
|
|
82
|
+
maxHeight: 320,
|
|
83
|
+
display: 'flex',
|
|
84
|
+
flexDirection: 'column',
|
|
85
|
+
overflow: 'hidden',
|
|
86
|
+
background: '#fff',
|
|
87
|
+
boxShadow: '0 2px 8px rgba(0, 0, 0, 0.15)',
|
|
88
|
+
borderRadius: 2,
|
|
89
|
+
zIndex: 99,
|
|
90
|
+
padding: 6,
|
|
91
|
+
}, onMouseDown: function (e) { return e.stopPropagation(); }, onWheel: function (e) { return e.stopPropagation(); } },
|
|
92
|
+
React.createElement(Input, { value: searchText, onChange: handleSearchInput, placeholder: "\u652F\u6301\u8F93\u5165\u591A\u4E2A\u6761\u4EF6\uFF0C\u9017\u53F7\u6216\u7A7A\u683C\u9694\u5F00", size: "small", style: { marginBottom: 8 }, onPressEnter: handleSearch, suffix: React.createElement(Tooltip, { title: "\u641C\u7D22\u6309\u5305\u542B\u5339\u914D\uFF1B\u6570\u5B57\u5217\u6682\u4E0D\u652F\u6301\u8868\u8FBE\u5F0F" },
|
|
93
|
+
React.createElement(QuestionCircleOutlined, { style: { color: '#bbb' } })) }),
|
|
94
|
+
React.createElement("div", { className: "zt-canvas-table__popover-list", style: { overflow: 'auto', flex: 1, minHeight: 0 } }, options.length === 0 ? (React.createElement("div", { style: { padding: 16 } },
|
|
95
|
+
React.createElement(Empty, { image: Empty.PRESENTED_IMAGE_SIMPLE, description: "\u6682\u65E0\u6570\u636E" }))) : (options.map(function (item, index) { return (React.createElement("div", { key: index, style: { padding: '2px 8px' } },
|
|
96
|
+
React.createElement(Checkbox, { checked: checked.includes(item.value), onChange: function (e) {
|
|
97
|
+
return handleCheckToggle(item.value, e.target.checked);
|
|
98
|
+
} },
|
|
99
|
+
React.createElement("span", { title: item.text === NULL_SIGN ? '空值' : item.text }, item.text === NULL_SIGN ? '空值' : item.text)))); }))),
|
|
100
|
+
React.createElement("div", { style: {
|
|
101
|
+
borderTop: '1px solid #f0f0f0',
|
|
102
|
+
marginTop: 4,
|
|
103
|
+
paddingTop: 6,
|
|
104
|
+
display: 'flex',
|
|
105
|
+
gap: 10,
|
|
106
|
+
} },
|
|
107
|
+
React.createElement(Button, { type: "primary", size: "small", onClick: handleSearch }, "\u641C\u7D22"),
|
|
108
|
+
React.createElement(Button, { size: "small", onClick: handleReset }, "\u91CD\u7F6E")))));
|
|
109
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface SubtotalTipState {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
content: string;
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
}
|
|
8
|
+
/** 框选小计浮层(对齐 Table 的框选小计提示样式) */
|
|
9
|
+
export declare function SubtotalTip({ tip }: {
|
|
10
|
+
tip: SubtotalTipState;
|
|
11
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** 框选小计浮层(对齐 Table 的框选小计提示样式) */
|
|
3
|
+
export function SubtotalTip(_a) {
|
|
4
|
+
var tip = _a.tip;
|
|
5
|
+
if (!tip.visible || !tip.content)
|
|
6
|
+
return null;
|
|
7
|
+
return (React.createElement("div", { className: "zt-canvas-table__subtotal-tip", style: {
|
|
8
|
+
position: 'absolute',
|
|
9
|
+
left: tip.x,
|
|
10
|
+
top: tip.y,
|
|
11
|
+
padding: '4px 8px',
|
|
12
|
+
background: '#fff',
|
|
13
|
+
border: '1px solid #e8e8e8',
|
|
14
|
+
boxShadow: '0 2px 8px rgba(0, 0, 0, 0.15)',
|
|
15
|
+
borderRadius: 2,
|
|
16
|
+
fontSize: 12,
|
|
17
|
+
lineHeight: '18px',
|
|
18
|
+
color: '#333',
|
|
19
|
+
whiteSpace: 'nowrap',
|
|
20
|
+
pointerEvents: 'none',
|
|
21
|
+
zIndex: 90,
|
|
22
|
+
} }, tip.content));
|
|
23
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import 'react-contexify/dist/ReactContexify.min.css';
|
|
3
|
+
export interface TableMenuProps {
|
|
4
|
+
menuId: string;
|
|
5
|
+
onCopy: () => void;
|
|
6
|
+
onToggleFullscreen: () => void;
|
|
7
|
+
isFullscreen: boolean;
|
|
8
|
+
hasExport?: boolean;
|
|
9
|
+
onExport?: () => void;
|
|
10
|
+
}
|
|
11
|
+
/** 右键菜单:复制 / 全屏(导出预留) */
|
|
12
|
+
export declare function TableMenu(props: TableMenuProps): JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Menu, Item, Separator } from 'react-contexify';
|
|
3
|
+
import 'react-contexify/dist/ReactContexify.min.css';
|
|
4
|
+
/** 右键菜单:复制 / 全屏(导出预留) */
|
|
5
|
+
export function TableMenu(props) {
|
|
6
|
+
var menuId = props.menuId, onCopy = props.onCopy, onToggleFullscreen = props.onToggleFullscreen, isFullscreen = props.isFullscreen, hasExport = props.hasExport, onExport = props.onExport;
|
|
7
|
+
var handleCopy = function () {
|
|
8
|
+
onCopy();
|
|
9
|
+
};
|
|
10
|
+
var handleFullscreen = function () {
|
|
11
|
+
onToggleFullscreen();
|
|
12
|
+
};
|
|
13
|
+
var handleExport = function () {
|
|
14
|
+
onExport === null || onExport === void 0 ? void 0 : onExport();
|
|
15
|
+
};
|
|
16
|
+
return (React.createElement(Menu, { id: menuId, className: "zt-canvas-table__menu" },
|
|
17
|
+
React.createElement(Item, { onClick: handleCopy }, "\u590D\u5236\u9009\u4E2D\u5185\u5BB9"),
|
|
18
|
+
hasExport ? (React.createElement(React.Fragment, null,
|
|
19
|
+
React.createElement(Separator, null),
|
|
20
|
+
React.createElement(Item, { onClick: handleExport }, "\u5BFC\u51FA Excel"))) : null,
|
|
21
|
+
React.createElement(Separator, null),
|
|
22
|
+
React.createElement(Item, { onClick: handleFullscreen }, isFullscreen ? '退出全屏' : '全屏显示')));
|
|
23
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export function Tooltip(_a) {
|
|
3
|
+
var tip = _a.tip;
|
|
4
|
+
if (!tip.visible || !tip.content)
|
|
5
|
+
return null;
|
|
6
|
+
return (React.createElement("div", { className: "zt-canvas-table__tooltip", style: {
|
|
7
|
+
position: 'absolute',
|
|
8
|
+
left: tip.x + 12,
|
|
9
|
+
top: tip.y + 14,
|
|
10
|
+
maxWidth: 320,
|
|
11
|
+
padding: '6px 8px',
|
|
12
|
+
background: 'rgba(0, 0, 0, 0.75)',
|
|
13
|
+
color: '#fff',
|
|
14
|
+
fontSize: 12,
|
|
15
|
+
lineHeight: '18px',
|
|
16
|
+
borderRadius: 2,
|
|
17
|
+
pointerEvents: 'none',
|
|
18
|
+
zIndex: 100,
|
|
19
|
+
wordBreak: 'break-all',
|
|
20
|
+
} }, tip.content));
|
|
21
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare const SCROLLBAR_SIZE = 12;
|
|
2
|
+
export declare const MIN_THUMB_SIZE = 30;
|
|
3
|
+
export declare const DEFAULT_ROW_HEIGHT = 36;
|
|
4
|
+
export declare const DEFAULT_HEADER_HEIGHT = 36;
|
|
5
|
+
export declare const DEFAULT_COLUMN_WIDTH = 120;
|
|
6
|
+
export declare const DEFAULT_SELECTION_WIDTH = 48;
|
|
7
|
+
export declare const DEFAULT_INDEX_WIDTH = 56;
|
|
8
|
+
export declare const MIN_COLUMN_WIDTH = 50;
|
|
9
|
+
export declare const RESIZE_HANDLE_WIDTH = 8;
|
|
10
|
+
/**
|
|
11
|
+
* 调色板对齐 Table 组件主题变量(src/styles/_variables.scss):
|
|
12
|
+
* 表头背景 $title-heade-bg、分割线 antd4 默认 #f0f0f0、
|
|
13
|
+
* 行 hover $_color_table_row_hover、行选中 $_color_table_row_selected
|
|
14
|
+
*/
|
|
15
|
+
export declare const COLORS: {
|
|
16
|
+
white: string;
|
|
17
|
+
headerBg: string;
|
|
18
|
+
stripedBg: string;
|
|
19
|
+
hoverBg: string;
|
|
20
|
+
selectedBg: string;
|
|
21
|
+
selectionBg: string;
|
|
22
|
+
text: string;
|
|
23
|
+
secondaryText: string;
|
|
24
|
+
border: string;
|
|
25
|
+
primary: string;
|
|
26
|
+
scrollbarTrack: string;
|
|
27
|
+
scrollbarThumb: string;
|
|
28
|
+
scrollbarThumbActive: string;
|
|
29
|
+
checkboxBorder: string;
|
|
30
|
+
checkboxDisabled: string;
|
|
31
|
+
shadow: string;
|
|
32
|
+
fixedEdge: string;
|
|
33
|
+
};
|
|
34
|
+
export declare const FONT_FAMILY = "\"Microsoft YaHei\", \u5FAE\u8F6F\u96C5\u9ED1, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif";
|
|
35
|
+
export declare const FONT_SIZE = 12;
|
|
36
|
+
export declare const FONT_WEIGHT = "400";
|
|
37
|
+
export declare const CHECKBOX_SIZE = 14;
|
|
38
|
+
export declare const SORT_ICON_SIZE = 5;
|
|
39
|
+
export declare const ICON_AREA_WIDTH = 15;
|
|
40
|
+
export declare const ICON_SPACING = 4;
|
|
41
|
+
export declare const TEXT_PADDING = 8;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export var SCROLLBAR_SIZE = 12;
|
|
2
|
+
export var MIN_THUMB_SIZE = 30;
|
|
3
|
+
export var DEFAULT_ROW_HEIGHT = 36;
|
|
4
|
+
export var DEFAULT_HEADER_HEIGHT = 36;
|
|
5
|
+
export var DEFAULT_COLUMN_WIDTH = 120;
|
|
6
|
+
export var DEFAULT_SELECTION_WIDTH = 48;
|
|
7
|
+
export var DEFAULT_INDEX_WIDTH = 56;
|
|
8
|
+
export var MIN_COLUMN_WIDTH = 50;
|
|
9
|
+
export var RESIZE_HANDLE_WIDTH = 8;
|
|
10
|
+
/**
|
|
11
|
+
* 调色板对齐 Table 组件主题变量(src/styles/_variables.scss):
|
|
12
|
+
* 表头背景 $title-heade-bg、分割线 antd4 默认 #f0f0f0、
|
|
13
|
+
* 行 hover $_color_table_row_hover、行选中 $_color_table_row_selected
|
|
14
|
+
*/
|
|
15
|
+
export var COLORS = {
|
|
16
|
+
white: '#ffffff',
|
|
17
|
+
headerBg: '#fafafa',
|
|
18
|
+
stripedBg: '#fafafa',
|
|
19
|
+
hoverBg: '#edf4ff',
|
|
20
|
+
selectedBg: '#f0faf0',
|
|
21
|
+
selectionBg: 'rgba(24, 144, 255, 0.1)',
|
|
22
|
+
text: '#333333',
|
|
23
|
+
secondaryText: '#999999',
|
|
24
|
+
border: '#f0f0f0',
|
|
25
|
+
primary: '#1890ff',
|
|
26
|
+
scrollbarTrack: '#f0f0f0',
|
|
27
|
+
scrollbarThumb: '#bfbfbf',
|
|
28
|
+
scrollbarThumbActive: '#999999',
|
|
29
|
+
checkboxBorder: '#d9d9d9',
|
|
30
|
+
checkboxDisabled: '#f5f5f5',
|
|
31
|
+
shadow: 'rgba(0, 0, 0, 0.12)',
|
|
32
|
+
fixedEdge: '#e8e8e8',
|
|
33
|
+
};
|
|
34
|
+
export var FONT_FAMILY = '"Microsoft YaHei", 微软雅黑, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';
|
|
35
|
+
export var FONT_SIZE = 12;
|
|
36
|
+
export var FONT_WEIGHT = '400';
|
|
37
|
+
export var CHECKBOX_SIZE = 14;
|
|
38
|
+
export var SORT_ICON_SIZE = 5;
|
|
39
|
+
export var ICON_AREA_WIDTH = 15;
|
|
40
|
+
export var ICON_SPACING = 4;
|
|
41
|
+
export var TEXT_PADDING = 8;
|