arthub-table 0.2.29-next.2 → 0.2.29
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/arthub-table.common.js +1 -1
- package/dist/arthub-table.common.js.map +1 -1
- package/dist/arthub-table.umd.js +1 -1
- package/dist/arthub-table.umd.js.map +1 -1
- package/dist/arthub-table.umd.min.js +1 -1
- package/dist/arthub-table.umd.min.js.map +1 -1
- package/dist/types/core/viewers/index.d.ts +0 -3
- package/package.json +1 -1
- package/dist/types/core/viewers/DeliveryExpectationsViewer.d.ts +0 -64
|
@@ -42,7 +42,6 @@ export { default as OnlyShowErrorViewer } from './OnlyShowErrorViewer';
|
|
|
42
42
|
export { default as PerspectiveViewer } from './PerspectiveViewer';
|
|
43
43
|
export { default as RelatedTaskViewer } from './RelatedTaskViewer';
|
|
44
44
|
export { default as CpPersonViewer } from './CpPersonViewer';
|
|
45
|
-
export { default as DeliveryExpectationsViewer } from './DeliveryExpectationsViewer';
|
|
46
45
|
import TextViewer from './TextViewer';
|
|
47
46
|
import DropdownViewer from './DropdownViewer';
|
|
48
47
|
import ImageViewer from './ImageViewer';
|
|
@@ -81,7 +80,6 @@ import OnlyShowErrorViewer from './OnlyShowErrorViewer';
|
|
|
81
80
|
import PerspectiveViewer from './PerspectiveViewer';
|
|
82
81
|
import RelatedTaskViewer from './RelatedTaskViewer';
|
|
83
82
|
import CpPersonViewer from './CpPersonViewer';
|
|
84
|
-
import DeliveryExpectationsViewer from './DeliveryExpectationsViewer';
|
|
85
83
|
/**
|
|
86
84
|
* Register all default viewers
|
|
87
85
|
* Call this function once during application initialization
|
|
@@ -134,5 +132,4 @@ export declare const defaultViewers: {
|
|
|
134
132
|
perspective: typeof PerspectiveViewer;
|
|
135
133
|
'related-task': typeof RelatedTaskViewer;
|
|
136
134
|
'cp-person': typeof CpPersonViewer;
|
|
137
|
-
'delivery-expectations': typeof DeliveryExpectationsViewer;
|
|
138
135
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arthub-table",
|
|
3
|
-
"version": "0.2.29
|
|
3
|
+
"version": "0.2.29",
|
|
4
4
|
"description": "High-performance canvas-based table/grid component for Vue 3 with TypeScript support, featuring virtual scrolling, cell viewers, grouped rows, and nested grids.",
|
|
5
5
|
"main": "dist/arthub-table.common.js",
|
|
6
6
|
"module": "dist/arthub-table.umd.min.js",
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DeliveryExpectationsViewer - 交付预期单元格渲染器(Canvas 实现)
|
|
3
|
-
*
|
|
4
|
-
* 功能:
|
|
5
|
-
* 1. 多行文本渲染:每个 module 一行,用逗号分隔时换行展示
|
|
6
|
-
* 2. 逾期标红:当 item.color === 'red' 时,该行文字渲染为红色
|
|
7
|
-
* 3. 点击交互:点击单元格弹出下拉浮窗展示完整内容
|
|
8
|
-
*
|
|
9
|
-
* 数据格式:
|
|
10
|
-
* delivery_expectations: [
|
|
11
|
-
* { color: "red", estimate_end_date: 1758815999000, module: "【默认模块 2】09月25日" }
|
|
12
|
-
* ]
|
|
13
|
-
*/
|
|
14
|
-
import type { CellViewer, ViewerRenderContext, CellViewerData } from './types';
|
|
15
|
-
/**
|
|
16
|
-
* 交付预期项
|
|
17
|
-
*/
|
|
18
|
-
export interface DeliveryExpectationItem {
|
|
19
|
-
/** 颜色标记,'red' 表示逾期 */
|
|
20
|
-
color?: string;
|
|
21
|
-
/** 预计结束时间戳 */
|
|
22
|
-
estimate_end_date?: number;
|
|
23
|
-
/** 模块显示文本,如 "【品牌】可验收,【配置】可验收" */
|
|
24
|
-
module: string;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* 交付预期 viewer 数据
|
|
28
|
-
*/
|
|
29
|
-
export interface DeliveryExpectationsViewerData extends CellViewerData {
|
|
30
|
-
/** 交付预期列表 */
|
|
31
|
-
value: DeliveryExpectationItem[] | string | null;
|
|
32
|
-
/** 占位符文本,默认 '-' */
|
|
33
|
-
placeholder?: string;
|
|
34
|
-
}
|
|
35
|
-
declare class DeliveryExpectationsViewer implements CellViewer<DeliveryExpectationsViewerData> {
|
|
36
|
-
readonly type = "delivery-expectations";
|
|
37
|
-
/**
|
|
38
|
-
* 绘制交付预期单元格内容
|
|
39
|
-
*/
|
|
40
|
-
draw(context: ViewerRenderContext, data: DeliveryExpectationsViewerData): void;
|
|
41
|
-
/**
|
|
42
|
-
* 点击事件处理:返回 false 不阻止默认选中行为,
|
|
43
|
-
* 由外部 afterSelectCell 回调检测 viewerType 后弹出浮窗
|
|
44
|
-
*/
|
|
45
|
-
onClick(_context: ViewerRenderContext, _data: DeliveryExpectationsViewerData, _localX: number, _localY: number): boolean;
|
|
46
|
-
/**
|
|
47
|
-
* 鼠标悬停时显示手型光标
|
|
48
|
-
*/
|
|
49
|
-
getInteractiveCursor(_context: ViewerRenderContext, data: DeliveryExpectationsViewerData, _localX: number, _localY: number): string | null;
|
|
50
|
-
/**
|
|
51
|
-
* 解析数据为 DeliveryExpectationItem 数组
|
|
52
|
-
*/
|
|
53
|
-
private parseItems;
|
|
54
|
-
/**
|
|
55
|
-
* 将 items 拆分为多行显示
|
|
56
|
-
* 每个 item 的 module 文本按逗号拆分为多行
|
|
57
|
-
*/
|
|
58
|
-
private splitToLines;
|
|
59
|
-
/**
|
|
60
|
-
* 截断文本并添加省略号
|
|
61
|
-
*/
|
|
62
|
-
private truncateWithEllipsis;
|
|
63
|
-
}
|
|
64
|
-
export default DeliveryExpectationsViewer;
|