File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -738,7 +738,13 @@ export default class Lov extends Select<LovProps> {
738
738
handleLovViewSelect ( records : Record | Record [ ] ) {
739
739
const { viewMode, textField = '' } = this ;
740
740
if ( isArrayLike ( records ) ) {
741
- this . setValue ( getRecords ( records , textField ) . map ( record => this . processRecordToObject ( record ) ) ) ;
741
+ // 全选的情况下,所有记录 selectedTimestamp 都相同
742
+ const isSameSelectedTimestamp = new Set ( records . map ( record => ( record . selectedTimestamp || - 1 ) ) ) . size === 1 ;
743
+ if ( isSameSelectedTimestamp ) {
744
+ this . setValue ( records . map ( record => this . processRecordToObject ( record ) ) ) ;
745
+ } else {
746
+ this . setValue ( getRecords ( records , textField ) . map ( record => this . processRecordToObject ( record ) ) ) ;
747
+ }
742
748
} else {
743
749
this . setValue ( records && this . processRecordToObject ( records ) || this . emptyValue ) ;
744
750
}
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ const prefixCls = getConfig('prefixCls');
44
44
| lovQueryCachedSelected | lov 查询缓存已勾选记录 | (code: string, cachedSelected: Map<string, Record>) => Promise<object[ ] > | |
45
45
| lookupBatchAxiosConfig | hook for batch lookup query, more info:[ AxiosRequestConfig] ( #AxiosRequestConfig ) 。 | (codes: string[ ] ) => AxiosRequestConfig | - |
46
46
| useLookupBatch | 是否使用批量查询快码 | (code: string, field: Field) => boolean | noop |
47
+ | batchParaKey | lookup 批量查询参数的键,如果查询参数的键全部在 batchParaKey 数组中,那么依然执行批量查询 | string\[\] | - |
47
48
| selectReverse | Whether to enable the pull-down multi-select reverse function. | boolean | true |
48
49
| selectOptionsFilter | 选项过滤。 | (record: Record) => boolean | |
49
50
| selectSearchable | 是否开启下拉搜索功能。 | boolean | false |
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ const prefixCls = getConfig('prefixCls');
47
47
| lovQueryCachedSelected | lov 查询缓存已勾选记录 | (code: string, cachedSelected: Map<string, Record>) => Promise<object[ ] > | |
48
48
| lookupBatchAxiosConfig | 返回 lookup 批量查询配置的钩子,详见[ AxiosRequestConfig] ( #AxiosRequestConfig ) 。 | (codes: string[ ] ) => AxiosRequestConfig | - |
49
49
| useLookupBatch | 是否使用批量查询快码 | (code: string, field: Field) => boolean | noop |
50
+ | batchParaKey | lookup 批量查询参数的键,如果查询参数的键全部在 batchParaKey 数组中,那么依然执行批量查询 | string\[\] | - |
50
51
| selectReverse | 是否开启下拉多选反向功能。 | boolean | true |
51
52
| selectOptionsFilter | 选项过滤。 | (record: Record) => boolean | |
52
53
| selectSearchable | 是否开启下拉搜索功能。 | boolean | false |
You can’t perform that action at this time.
0 commit comments