arthub-table 0.2.77 → 0.2.78

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.
@@ -13,6 +13,12 @@ interface RowData {
13
13
  interface CellOptions {
14
14
  [key: string]: any;
15
15
  }
16
+ /**
17
+ * 单元格 readonly 统一计算:列级禁编(canEdit === false 严格语义)与行级 _permissions 的合成。
18
+ * 与 calculatePermissions 的 header.canEdit 折叠同款语义:只有显式 false 才禁编,undefined/true 不影响。
19
+ * 三处赋值点(Cell 构造、Body 行更新、Body 列刷新)统一调用本函数,避免逻辑漂移。
20
+ */
21
+ export declare function calcColumnReadonly(column: Pick<ColumnConfig, "canEdit" | "key">, permissions?: Record<string, boolean>): boolean;
16
22
  declare class Cell extends Context {
17
23
  colIndex: number;
18
24
  rowIndex: number;
@@ -21,6 +27,7 @@ declare class Cell extends Context {
21
27
  key: string;
22
28
  labelKey?: string;
23
29
  readonly?: boolean;
30
+ column: Column;
24
31
  textAlign: string;
25
32
  textBaseline: string;
26
33
  dataType: string;
@@ -106,6 +106,7 @@ export interface ColumnConfig {
106
106
  fixedLeft?: boolean;
107
107
  fixedRight?: boolean;
108
108
  readonly?: boolean;
109
+ canEdit?: boolean;
109
110
  align?: 'left' | 'center' | 'right';
110
111
  baseline?: 'top' | 'middle' | 'bottom';
111
112
  type?: ColumnType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arthub-table",
3
- "version": "0.2.77",
3
+ "version": "0.2.78",
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",