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.
- package/README.md +4 -4
- package/dist/bw-pro-table.css +1 -1
- package/dist/bw-pro-table.js +1746 -1654
- package/dist/bw-pro-table.umd.cjs +4 -4
- package/dist/types/BwProTableCore.vue.d.ts +15 -6
- package/dist/types/BwProTableSearch.vue.d.ts +6 -0
- package/dist/types/renderers/text-renderer.d.ts +1 -1
- package/dist/types/types.d.ts +10 -1
- package/package.json +2 -2
|
@@ -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
|
|
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
|
-
},
|
|
35
|
+
}, __VLS_44: {
|
|
37
36
|
column: any;
|
|
38
37
|
};
|
|
39
38
|
type __VLS_Slots = {} & {
|
|
40
|
-
[K in NonNullable<typeof
|
|
39
|
+
[K in NonNullable<typeof __VLS_27>]?: (props: typeof __VLS_28) => any;
|
|
41
40
|
} & {
|
|
42
|
-
bodyCell?: (props: typeof
|
|
41
|
+
bodyCell?: (props: typeof __VLS_36) => any;
|
|
43
42
|
} & {
|
|
44
|
-
headerCell?: (props: typeof
|
|
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/'')。
|
package/dist/types/types.d.ts
CHANGED
|
@@ -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.
|
|
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.
|
|
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",
|