bw-pro-table 0.0.6 → 0.0.7

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.
@@ -10,13 +10,12 @@ interface Props {
10
10
  };
11
11
  errorMessage?: string;
12
12
  pagination?: false | Record<string, any>;
13
- onRetry?: () => void | Promise<void>;
14
13
  /** 全局空单元格占位符,优先级低于列级 emptyText */
15
14
  defaultEmptyText?: string;
16
15
  /** antd 原生 customRow:自定义行属性(含 onClick 等事件) */
17
16
  customRow?: (record: any, index: number) => Record<string, any>;
18
17
  }
19
- declare var __VLS_24: string, __VLS_25: any, __VLS_33: {
18
+ declare var __VLS_27: string, __VLS_28: any, __VLS_36: {
20
19
  /** BwProTable 预渲染的默认内容(VNode),包含编辑组件/值类型渲染/空值处理 */
21
20
  defaultContent: any;
22
21
  /** 编辑态上下文 */
@@ -33,22 +32,32 @@ declare var __VLS_24: string, __VLS_25: any, __VLS_33: {
33
32
  index: number;
34
33
  text: any;
35
34
  value: any;
36
- }, __VLS_41: {
35
+ }, __VLS_44: {
37
36
  column: any;
38
37
  };
39
38
  type __VLS_Slots = {} & {
40
- [K in NonNullable<typeof __VLS_24>]?: (props: typeof __VLS_25) => any;
39
+ [K in NonNullable<typeof __VLS_27>]?: (props: typeof __VLS_28) => any;
41
40
  } & {
42
- bodyCell?: (props: typeof __VLS_33) => any;
41
+ bodyCell?: (props: typeof __VLS_36) => any;
43
42
  } & {
44
- headerCell?: (props: typeof __VLS_41) => any;
43
+ headerCell?: (props: typeof __VLS_44) => any;
45
44
  };
46
45
  declare const __VLS_base: import('vue').DefineComponent<Props, {
47
46
  retry: () => void;
48
47
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
48
+ change: (pagination: any, filters: any, sorter: any, extra?: {
49
+ action: "paginate" | "sort" | "filter";
50
+ currentDataSource: any[];
51
+ } | undefined) => any;
49
52
  retry: () => any;
53
+ resizeColumn: (w: number, col: ProColumnType<any>) => any;
50
54
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
55
+ onChange?: ((pagination: any, filters: any, sorter: any, extra?: {
56
+ action: "paginate" | "sort" | "filter";
57
+ currentDataSource: any[];
58
+ } | undefined) => any) | undefined;
51
59
  onRetry?: (() => any) | undefined;
60
+ onResizeColumn?: ((w: number, col: ProColumnType<any>) => any) | undefined;
52
61
  }>, {
53
62
  columns: ProColumnsType;
54
63
  rowKey: string;
@@ -15,6 +15,12 @@ interface Props {
15
15
  * 注意:当值为 boolean 时,内部通过 ?? 安全回退所有字段到默认值。
16
16
  */
17
17
  searchConfig?: boolean | SearchConfig;
18
+ /**
19
+ * 搜索表单初始值(用于持久化恢复场景)。
20
+ * 父组件 BwProTable 在 onMounted 阶段恢复持久化的 searchFormParams 后传入,
21
+ * 子组件将其同步到 formValues,使搜索栏 UI 能正确显示已恢复的筛选条件。
22
+ */
23
+ initialValues?: Record<string, any>;
18
24
  }
19
25
  /**
20
26
  * 收集非空表单值(过滤掉 undefined/null/'')。
@@ -1,6 +1,6 @@
1
1
  import { RendererFn } from './registry';
2
2
  /**
3
3
  * 文本渲染器 — valueType: 'text'
4
- * 默认类型,自动应用 ellipsis + Tooltip
4
+ * 返回纯文本(ellipsis Tooltip 浮层由 BwProTableCore.renderBodyCell 统一处理)。
5
5
  */
6
6
  export declare const textRenderer: RendererFn;
@@ -151,7 +151,16 @@ export interface ProColumnType<RecordType = any> extends Omit<TableColumnType<Re
151
151
  currencySuffix?: string;
152
152
  /** 空单元格占位符,覆盖全局配置 */
153
153
  emptyText?: string;
154
- /** 溢出策略 */
154
+ /**
155
+ * @deprecated 自 v0.0.5 起废弃,请使用 ant-design-vue 原生 `ellipsis` 属性替代。
156
+ *
157
+ * **迁移指南**:
158
+ * - `overflow: 'ellipsis'` → `ellipsis: true`
159
+ * - `overflow: 'clip'` → `ellipsis: false`
160
+ * - `overflow: 'wrap'` → 通过 `customCell` 注入自定义 CSS(如 `-webkit-line-clamp`)
161
+ *
162
+ * 旧属性仍可传入但不再生效,控制台将输出迁移警告。
163
+ */
155
164
  overflow?: 'ellipsis' | 'wrap' | 'clip';
156
165
  /** 表头说明文字 */
157
166
  description?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bw-pro-table",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "author": {
5
5
  "name": "ZM"
6
6
  },
@@ -74,7 +74,7 @@
74
74
  "less": "^4.6.7",
75
75
  "screenfull": "^6.0.2",
76
76
  "typescript": "^6.0.3",
77
- "vite": "^8.1.2",
77
+ "vite": "^8.1.3",
78
78
  "vite-plugin-dts": "^5.0.3",
79
79
  "vue": "^3.5.39",
80
80
  "vue-i18n": "^11.4.6",