@qin-ui/antd-vue-pro 2.2.4 → 2.3.1
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/AI-CONTEXT.md +22 -11
- package/api.json +7 -1
- package/es/antd-vue-pro.css +13 -13
- package/es/components/component-provider/components/index.vue.d.ts +8 -0
- package/es/components/component-provider/components/index.vue.d.ts.map +1 -1
- package/es/components/component-provider/constants/index.d.ts.map +1 -1
- package/es/components/form/components/BaseField/index.vue.d.ts.map +1 -1
- package/es/components/form/components/BaseField/utils/index.d.ts +3 -1
- package/es/components/form/components/BaseField/utils/index.d.ts.map +1 -1
- package/es/components/table/components/ColumnControl.vue.d.ts +2 -1
- package/es/components/table/components/ColumnControl.vue.d.ts.map +1 -1
- package/es/components/table/components/ProTable.vue.d.ts +3 -2
- package/es/components/table/components/ProTable.vue.d.ts.map +1 -1
- package/es/components/table/components/SearchForm.vue.d.ts.map +1 -1
- package/es/components/table/components/SizeControl.vue.d.ts.map +1 -1
- package/es/components/table/types/index.d.ts +25 -0
- package/es/components/table/types/index.d.ts.map +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.d.ts.map +1 -1
- package/es/index.js +201 -103
- package/es/index.js.map +1 -1
- package/es/locale/index.d.ts +28 -0
- package/es/locale/index.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/components/component-provider/components/index.vue +16 -1
- package/src/components/component-provider/constants/index.ts +4 -7
- package/src/components/form/components/BaseField/index.vue +10 -4
- package/src/components/form/components/BaseField/utils/index.ts +33 -3
- package/src/components/table/components/ColumnControl.vue +95 -38
- package/src/components/table/components/ProTable.vue +47 -13
- package/src/components/table/components/SearchForm.vue +6 -3
- package/src/components/table/components/SizeControl.vue +9 -5
- package/src/components/table/types/index.ts +26 -0
- package/src/index.ts +1 -0
- package/src/locale/index.ts +71 -0
package/AI-CONTEXT.md
CHANGED
|
@@ -45,21 +45,30 @@ import { ProForm, ProTable, useForm, useTable } from '@qin-ui/antd-vue-pro';
|
|
|
45
45
|
|
|
46
46
|
由 `ProComponentProvider` 注入,优先级低于 Field 配置。**不写也有这些默认值,需知晓以免行为与预期不符:**
|
|
47
47
|
|
|
48
|
-
| component | 默认预设
|
|
49
|
-
| :--------------------------------------------- |
|
|
50
|
-
| `switch` | `{ modelProp: 'checked' }` -> v-model 绑 `checked` 而非 `value`
|
|
51
|
-
| `input` / `input-password` | `{ maxlength: 100, allowClear: true
|
|
52
|
-
| `textarea` | `{ maxlength: 200, autoSize: {minRows:3,maxRows:6}, showCount: true, allowClear: true
|
|
53
|
-
| `input-number` | `{ max: 1e15-1, min: -(1e15+1), controls: false,
|
|
54
|
-
| `select` / `cascader` | `{ allowClear: true,
|
|
55
|
-
| `date-picker` / `range-picker` / `time-picker` | `{ allowClear: true, getPopupContainer, style:{width:'100%'} }`
|
|
56
|
-
| `pro-form` | `{ grid: { gutter: {xs:8, sm:16, md:16, lg:24} } }`
|
|
57
|
-
| `pro-form-item` | `{ validateFirst: true, span: 8 }`
|
|
58
|
-
| `pro-table` | `{ pagination:{
|
|
48
|
+
| component | 默认预设 |
|
|
49
|
+
| :--------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
50
|
+
| `switch` | `{ modelProp: 'checked' }` -> v-model 绑 `checked` 而非 `value` |
|
|
51
|
+
| `input` / `input-password` | `{ maxlength: 100, allowClear: true }` |
|
|
52
|
+
| `textarea` | `{ maxlength: 200, autoSize: {minRows:3,maxRows:6}, showCount: true, allowClear: true }` |
|
|
53
|
+
| `input-number` | `{ max: 1e15-1, min: -(1e15+1), controls: false, style:{width:'100%'} }` |
|
|
54
|
+
| `select` / `cascader` | `{ allowClear: true, getPopupContainer }` |
|
|
55
|
+
| `date-picker` / `range-picker` / `time-picker` | `{ allowClear: true, getPopupContainer, style:{width:'100%'} }` |
|
|
56
|
+
| `pro-form` | `{ grid: { gutter: {xs:8, sm:16, md:16, lg:24} } }` |
|
|
57
|
+
| `pro-form-item` | `{ validateFirst: true, span: 8 }` |
|
|
58
|
+
| `pro-table` | `{ pagination:{showSizeChanger, pageSizeOptions:['10','20','30','40','50','100'], showQuickJumper:true}, searchFormConfig:{layout:'grid', expand:{minExpandRows:2, expandStatus:false}}, control:true, addIndexColumn:true }` |
|
|
59
59
|
|
|
60
60
|
> `modelProp` 控制 v-model 绑定名,默认 `'value'`->`v-model:value`。
|
|
61
61
|
> `date-picker` 支持按 picker 子类型分别预设:`date-picker.date` / `.week` / `.month` / `.year` / `.quarter`,默认值同上。
|
|
62
62
|
> `input-search` / `checkbox-group` / `radio-group` / `slider` / `tree-select` / `transfer` 无预设(`{}`)。
|
|
63
|
+
> **占位符由 locale 兜底**:未显式设置 `placeholder` 时按组件类型自动生成(input 类 -> `input.placeholder`,select/cascader 类 -> `select.placeholder`),语言随宿主组件库自动切换。
|
|
64
|
+
|
|
65
|
+
### 内置文案(locale)
|
|
66
|
+
|
|
67
|
+
内置文案(查询/重置/收起/展开/序号/分页总数/占位符等)走 locale 体系,默认跟随宿主 ant-design-vue 语言自动切换:
|
|
68
|
+
|
|
69
|
+
- `useLocale()` 返回 `{ t, lang }`:`t(key, params?)` 翻译函数(支持 `{placeholder}` 参数)、`lang` 当前语言(`'zh-CN'` / `'zh-TW'` / `'en-US'`)
|
|
70
|
+
- 包导出 `zhCN` / `zhTW` / `enUS` 三套语言包(类型 `ProLocale`)
|
|
71
|
+
- `ProComponentProvider` 的 `locale` prop 可覆盖任意内置文案(如 `{ 'table.query': '搜索' }`),未覆盖的默认跟随宿主语言
|
|
63
72
|
|
|
64
73
|
### 不支持响应式的属性(不能包 ref/computed)
|
|
65
74
|
|
|
@@ -139,6 +148,8 @@ useTable({ columns, dataSource, pageParam, searchParam, searchFields });
|
|
|
139
148
|
|
|
140
149
|
关键 prop:`table`(useTable 实例)、`search`(数据查询方法 `() => Promise`,ProTable 内部调用,非自动触发)、`addIndexColumn`、`immediateSearch`、`control`、`searchFormConfig`(含 `hidden`/`container`/`layout`/`expand`)、`tableContainer`。
|
|
141
150
|
|
|
151
|
+
**列控制(control)**:`control` 支持布尔值或 `{ sizeControl, columnControl }` 对象;`columnControl` 可为布尔值或 `ColumnControlConfig`:`labels`(列在下拉中的显示名映射,title 为 vnode 时必用)、`excludedKeys`(不在下拉出现、始终展示)、`disabledKeys`(显示但不可取消勾选)、`disableCheckAll`(禁用全选/取消全选)。列 key 取 `dataIndex` 路径或自定义 `key`。
|
|
152
|
+
|
|
142
153
|
**数据流**:搜索->重置分页到第 1 页->调 `search()`;分页/排序变化->更新 `pageParam`->调 `search()`;重置->`resetQueryParams()`->调 `search()`。
|
|
143
154
|
|
|
144
155
|
### Column -- 列配置
|
package/api.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-08-
|
|
2
|
+
"generatedAt": "2026-08-13T11:21:23.164Z",
|
|
3
3
|
"name": "@qin-ui/antd-vue-pro",
|
|
4
4
|
"api": [
|
|
5
5
|
{
|
|
@@ -20,6 +20,12 @@
|
|
|
20
20
|
"type": "Record<ComponentName, any>",
|
|
21
21
|
"optional": true,
|
|
22
22
|
"description": "自定义组件映射,用于替换或扩展内置组件"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "locale",
|
|
26
|
+
"type": "Partial<ProLocale>",
|
|
27
|
+
"optional": true,
|
|
28
|
+
"description": "内置文案覆盖,可覆盖任意 locale 文案(如查询/重置/序号/占位符等)"
|
|
23
29
|
}
|
|
24
30
|
],
|
|
25
31
|
"examples": [
|
package/es/antd-vue-pro.css
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
.pro-table_search-form[data-v-
|
|
1
|
+
.pro-table_search-form[data-v-5b71a5b1] [class*='-form-item'] {
|
|
2
2
|
margin: 0;
|
|
3
3
|
}
|
|
4
|
-
.pro-table_search-form_expand-toggle-button[data-v-
|
|
4
|
+
.pro-table_search-form_expand-toggle-button[data-v-5b71a5b1] {
|
|
5
5
|
display: flex;
|
|
6
6
|
align-items: center;
|
|
7
7
|
padding: 0;
|
|
8
8
|
padding-left: 4px;
|
|
9
9
|
}
|
|
10
|
-
.pro-table_search-form .transition[data-v-
|
|
10
|
+
.pro-table_search-form .transition[data-v-5b71a5b1] {
|
|
11
11
|
transition: all 0.25s;
|
|
12
12
|
}
|
|
13
13
|
.pro-table_search-form-container[data-v-c385cd54] {
|
|
@@ -18,41 +18,41 @@
|
|
|
18
18
|
flex: 1;
|
|
19
19
|
padding: 24px 24px 0;
|
|
20
20
|
}
|
|
21
|
-
.pro-table_size-control_button[data-v-
|
|
21
|
+
.pro-table_size-control_button[data-v-a718ce24] {
|
|
22
22
|
display: flex;
|
|
23
23
|
align-items: center;
|
|
24
24
|
padding-right: 12px;
|
|
25
25
|
padding-left: 12px;
|
|
26
26
|
}
|
|
27
|
-
.pro-table_size-control_button[data-v-
|
|
27
|
+
.pro-table_size-control_button[data-v-a718ce24] svg {
|
|
28
28
|
transform: scale(1.3);
|
|
29
29
|
}
|
|
30
|
-
.pro-table_column-control_button[data-v-
|
|
30
|
+
.pro-table_column-control_button[data-v-71f76389] {
|
|
31
31
|
display: flex;
|
|
32
32
|
align-items: center;
|
|
33
33
|
padding-right: 12px;
|
|
34
34
|
padding-left: 12px;
|
|
35
35
|
}
|
|
36
|
-
.pro-table_column-control_button[data-v-
|
|
36
|
+
.pro-table_column-control_button[data-v-71f76389] svg {
|
|
37
37
|
transform: scale(1.2, 1.4);
|
|
38
38
|
}
|
|
39
|
-
.pro-table_header[data-v-
|
|
39
|
+
.pro-table_header[data-v-58aab322] {
|
|
40
40
|
display: flex;
|
|
41
41
|
align-items: center;
|
|
42
42
|
justify-content: flex-end;
|
|
43
43
|
}
|
|
44
|
-
.pro-table_header[data-v-
|
|
44
|
+
.pro-table_header[data-v-58aab322]:empty {
|
|
45
45
|
display: none;
|
|
46
46
|
}
|
|
47
|
-
.pro-table_header + .pro-table_header_content[data-v-
|
|
47
|
+
.pro-table_header + .pro-table_header_content[data-v-58aab322] {
|
|
48
48
|
margin-top: 16px;
|
|
49
49
|
}
|
|
50
|
-
.pro-table_header_button-bar[data-v-
|
|
50
|
+
.pro-table_header_button-bar[data-v-58aab322] {
|
|
51
51
|
flex: 1;
|
|
52
52
|
}
|
|
53
|
-
.pro-table_header_toolbar[data-v-
|
|
53
|
+
.pro-table_header_toolbar[data-v-58aab322] {
|
|
54
54
|
margin-left: 12px;
|
|
55
55
|
}
|
|
56
|
-
.pro-table[data-v-
|
|
56
|
+
.pro-table[data-v-58aab322] [class*='-pagination'] [class*='-pagination-total-text'] {
|
|
57
57
|
flex: 1;
|
|
58
58
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentVars } from '../types';
|
|
2
2
|
import { ComponentName } from '../../form/constants';
|
|
3
|
+
import { ProLocale } from '../../../locale';
|
|
3
4
|
type ComponentMap = Partial<Record<ComponentName, any>>;
|
|
4
5
|
type Props = {
|
|
5
6
|
/**
|
|
@@ -14,6 +15,13 @@ type Props = {
|
|
|
14
15
|
* @example { 'input': MyCustomInput, 'select': MyCustomSelect }
|
|
15
16
|
*/
|
|
16
17
|
componentMap?: ComponentMap;
|
|
18
|
+
/**
|
|
19
|
+
* @description 内置文案覆盖
|
|
20
|
+
* 可覆盖任意 locale 文案(如查询/重置/序号/占位符等),
|
|
21
|
+
* 未覆盖的文案默认跟随宿主组件库语言自动切换
|
|
22
|
+
* @example { 'table.query': '搜索' }
|
|
23
|
+
*/
|
|
24
|
+
locale?: Partial<ProLocale>;
|
|
17
25
|
};
|
|
18
26
|
declare function __VLS_template(): {
|
|
19
27
|
attrs: Partial<{}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/component-provider/components/index.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/component-provider/components/index.vue"],"names":[],"mappings":"AAkGA;;;;;;;;;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AC,CAAC,GAAG,GAAG,IAAI;IACvC,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAC9B,OAAO,EAAE,CAAC,CAAC;CACZ,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE;KACzB,GAAG,IAAI,MAAM,qBAAqB,GAAG;QACpC,YAAY,EAAE,YAAY,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC;QACvD,OAAO,EAAE,qBAAqB,CAAC,GAAG,CAAC,CAAC;KACrC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/component-provider/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAK9C,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAC1C,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CACL,CAAC;AAEhC,MAAM,MAAM,iBAAiB,CAAC,CAAC,GAAG,GAAG,IAAI;IACvC,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAC9B,OAAO,EAAE,CAAC,CAAC;CACZ,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE;KACzB,GAAG,IAAI,MAAM,qBAAqB,GAAG;QACpC,YAAY,EAAE,YAAY,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC;QACvD,OAAO,EAAE,qBAAqB,CAAC,GAAG,CAAC,CAAC;KACrC;CAyHF,CAAC;AAKF,eAAO,MAAM,eAAe,GAAI,KAAK,MAAM,KAAG,iBAAiB,GAAG,SAKjE,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,KAAK,MAAM,KAAG,iBAShD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/BaseField/index.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/BaseField/index.vue"],"names":[],"mappings":"AAoMA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,KAAK,CAAC;AAgBb,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;;;qCAqH6D,GAAG;;;;AAsGlE,wBAQG"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { Field } from '../../../types';
|
|
2
|
-
|
|
2
|
+
type LocaleT = (key: string, params?: Record<string, string | number>) => string;
|
|
3
|
+
export declare const getInitProps: (field: Field, t: LocaleT) => Record<string, any>;
|
|
4
|
+
export {};
|
|
3
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/components/BaseField/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAIvC,eAAO,MAAM,YAAY,GAAI,OAAO,KAAK,KAAG,MAAM,CAAC,MAAM,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/components/BaseField/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAIvC,KAAK,OAAO,GAAG,CACb,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KACrC,MAAM,CAAC;AA2BZ,eAAO,MAAM,YAAY,GAAI,OAAO,KAAK,EAAE,GAAG,OAAO,KAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAWzE,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Columns } from '../types';
|
|
1
|
+
import { Columns, ColumnControlConfig } from '../types';
|
|
2
2
|
import { Table } from '../hooks/useTable';
|
|
3
3
|
type Props = {
|
|
4
4
|
columns: Columns;
|
|
5
5
|
table?: Table;
|
|
6
|
+
columnControl?: ColumnControlConfig;
|
|
6
7
|
};
|
|
7
8
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
8
9
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColumnControl.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/ColumnControl.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ColumnControl.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/ColumnControl.vue"],"names":[],"mappings":"AAwMA,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAI/C,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,aAAa,CAAC,EAAE,mBAAmB,CAAC;CACrC,CAAC;;AAgTF,wBAOG"}
|
|
@@ -3,7 +3,8 @@ import { Slot } from 'vue';
|
|
|
3
3
|
import { ContainerComponent } from '../../form/types';
|
|
4
4
|
import { SearchFormProps } from './SearchForm.vue';
|
|
5
5
|
import { Table } from '../hooks/useTable';
|
|
6
|
-
import {
|
|
6
|
+
import { Path } from '../../../shared/core';
|
|
7
|
+
import { Column, ColumnControlConfig } from '../types';
|
|
7
8
|
declare const _default: <T extends Table<any> = Table>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
8
9
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
9
10
|
readonly "onUpdate:size"?: ((value: import('ant-design-vue/es/button').ButtonSize) => any) | undefined;
|
|
@@ -18,7 +19,7 @@ declare const _default: <T extends Table<any> = Table>(__VLS_props: NonNullable<
|
|
|
18
19
|
immediateSearch?: boolean;
|
|
19
20
|
control?: boolean | Partial<{
|
|
20
21
|
sizeControl: boolean;
|
|
21
|
-
columnControl: boolean
|
|
22
|
+
columnControl: boolean | ColumnControlConfig<Path<T extends Table<any, infer R extends import('@qin-ui/pro-components-core').Data> ? R : never>>;
|
|
22
23
|
}>;
|
|
23
24
|
searchFormConfig?: Omit<SearchFormProps, "form"> & {
|
|
24
25
|
hidden?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/ProTable.vue"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"ProTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/ProTable.vue"],"names":[],"mappings":"AAAA,OAmbO,EAGL,UAAU,EACV,UAAU,EAEX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAML,KAAK,IAAI,EACV,MAAM,KAAK,CAAC;AAGb,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAIL,IAAI,EACL,MAAM,sBAAsB,CAAC;AAQ9B,OAAO,EAAE,MAAM,EAAW,mBAAmB,EAAE,MAAM,UAAU,CAAC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AM,EAAE,MAAM,4BAmC6C,CAAC,iEAnClC,CAAC;SAC5B,KAAK,IAAI;;;EAwWV,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAtdzE,wBAsd4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchForm.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/SearchForm.vue"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"SearchForm.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/SearchForm.vue"],"names":[],"mappings":"AAAA,OA8TO,EAAiB,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EACL,qBAAqB,EAKrB,KAAK,SAAS,EACd,KAAK,eAAe,EACrB,MAAM,KAAK,CAAC;AAEb,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAKvC,KAAK,MAAM,GAAG;IAEZ,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,KAAK,UAAU,GAAG,IAAI,CACpB,OAAO,CAAC,SAAS,CAAC,EAChB,OAAO,GACP,UAAU,GACV,kBAAkB,GAClB,YAAY,GACZ,UAAU,GACV,WAAW,GACX,MAAM,GACN,YAAY,CACf,CAAC;AAEF,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC;AAC3C,KAAK,iBAAiB,GAAG,WAAW,GAAG;IAAE,YAAY,EAAE,OAAO,CAAA;CAAE,CAAC;AAEjE,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,GAAG,eAAe,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;IAC7E,WAAW,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,GAAG,eAAe,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;IAC5E,YAAY,CAAC,EACT,SAAS,CAAC,iBAAiB,CAAC,GAC5B,eAAe,CAAC,iBAAiB,CAAC,GAClC,KAAK,CAAC;IACV,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,iBAAiB,CAAC,UAAU,GAC9B,qBAAqB,CAAC;;;;;;;;;;QA2Va,GAAG;;;QACF,GAAG;;;QACH,GAAG;;AA3VzC,wBAyYK;AAQL,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SizeControl.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/SizeControl.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SizeControl.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/SizeControl.vue"],"names":[],"mappings":"AAiEA,OAAO,EAIL,KAAK,UAAU,EAGhB,MAAM,oBAAoB,CAAC;AAK5B,KAAK,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAuB/B,KAAK,iBAAiB,GAAG;IACzB,MAAM,CAAC,EAAE,IAAI,CAAC;CACb,CAAC;;;;;;AA2GF,wBAQG"}
|
|
@@ -67,4 +67,29 @@ export type Column<D extends Data = Data> = Omit<ColumnType, 'dataIndex' | 'key'
|
|
|
67
67
|
* ```
|
|
68
68
|
*/
|
|
69
69
|
export type Columns<D extends Data = Data> = Array<Column<D>>;
|
|
70
|
+
/**
|
|
71
|
+
* 列控制配置(用于 control.columnControl)
|
|
72
|
+
*
|
|
73
|
+
* @template K - 列 key 类型,ProTable 中传入 Path<RecordType> 获得自动补全
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```ts
|
|
77
|
+
* const config: ColumnControlConfig<'name' | 'age'> = {
|
|
78
|
+
* labels: { name: '姓名', age: '年龄' },
|
|
79
|
+
* excludedKeys: [],
|
|
80
|
+
* disabledKeys: ['name'],
|
|
81
|
+
* disableCheckAll: false,
|
|
82
|
+
* }
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
export type ColumnControlConfig<K extends string | number = string | number> = {
|
|
86
|
+
/** 列在下拉中的显示名称映射,key 为列 key/dataIndex,用于 title 为 vnode 时无法正常渲染 */
|
|
87
|
+
labels?: Partial<Record<K, string>>;
|
|
88
|
+
/** 不在下拉中出现的列 keys(始终展示,不参与勾选) */
|
|
89
|
+
excludedKeys?: K[];
|
|
90
|
+
/** 在下拉中显示但不可取消勾选的列 keys(始终展示,始终勾选) */
|
|
91
|
+
disabledKeys?: K[];
|
|
92
|
+
/** 禁用全选/取消全选 */
|
|
93
|
+
disableCheckAll?: boolean;
|
|
94
|
+
};
|
|
70
95
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,IAAI,IAAI,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AC,CAAC,CAAC,CAAC;AAE9D;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,IAAI;IAC7E,iEAAiE;IACjE,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;IACpC,iCAAiC;IACjC,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC;IACnB,sCAAsC;IACtC,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC;IACnB,gBAAgB;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC"}
|
package/es/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { default as ProComponentProvider } from './components/component-provider
|
|
|
5
5
|
export * from './components/form';
|
|
6
6
|
export * from './components/table';
|
|
7
7
|
export * from './components/component-provider';
|
|
8
|
+
export * from './locale';
|
|
8
9
|
/**
|
|
9
10
|
* Schema 驱动的表单组件,基于 antd-vue Form 封装
|
|
10
11
|
*
|
package/es/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,QAAQ,MAAM,oBAAoB,CAAC;AAC1C,OAAO,oBAAoB,MAAM,iCAAiC,CAAC;AAEnE,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,QAAQ,MAAM,oBAAoB,CAAC;AAC1C,OAAO,oBAAoB,MAAM,iCAAiC,CAAC;AAEnE,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,UAAU,CAAC;AAEzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,CAAC;;IAEjD;;;;;;;;;;;;;OAaG;iBACU,GAAG;;AAflB,wBAoBE"}
|