Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
najiu-admin-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
najiu-frontend
najiu-admin-template
Commits
c3096e26
Commit
c3096e26
authored
Mar 20, 2021
by
Vben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(table): fix table check column configuration failure close #391
parent
1d7608ee
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+1
-0
ColumnSetting.vue
...omponents/Table/src/components/settings/ColumnSetting.vue
+2
-1
useRowSelection.ts
src/components/Table/src/hooks/useRowSelection.ts
+3
-2
No files found.
CHANGELOG.zh_CN.md
View file @
c3096e26
...
...
@@ -17,6 +17,7 @@
-
修复 Modal 组件 loadingTip 配置不生效
-
修复后台权限指令不生效
-
确保 progress 进度条正确关闭
-
修复表格勾选列配置失效问题
## 2.1.0 (2021-03-15)
...
...
src/components/Table/src/components/settings/ColumnSetting.vue
View file @
c3096e26
...
...
@@ -113,6 +113,7 @@
import
{
isNullAndUnDef
}
from
'
/@/utils/is
'
;
import
{
getPopupContainer
}
from
'
/@/utils
'
;
import
{
omit
}
from
'
lodash-es
'
;
import
type
{
BasicColumn
}
from
'
../../types/table
'
;
...
...
@@ -147,7 +148,7 @@
const
{
t
}
=
useI18n
();
const
table
=
useTableContext
();
const
defaultRowSelection
=
table
.
getRowSelection
(
);
const
defaultRowSelection
=
omit
(
table
.
getRowSelection
(),
'
selectedRowKeys
'
);
let
inited
=
false
;
const
cachePlainOptions
=
ref
<
Options
[]
>
([]);
...
...
src/components/Table/src/hooks/useRowSelection.ts
View file @
c3096e26
...
...
@@ -16,10 +16,11 @@ export function useRowSelection(
if
(
!
rowSelection
)
{
return
null
;
}
return
{
selectedRowKeys
:
unref
(
selectedRowKeysRef
),
hideDefaultSelections
:
false
,
onChange
:
(
selectedRowKeys
:
string
[],
selectedRows
:
any
[])
=>
{
onChange
:
(
selectedRowKeys
:
string
[],
selectedRows
:
Recordable
[])
=>
{
selectedRowKeysRef
.
value
=
selectedRowKeys
;
selectedRowRef
.
value
=
selectedRows
;
emit
(
'
selection-change
'
,
{
...
...
@@ -27,7 +28,7 @@ export function useRowSelection(
rows
:
selectedRows
,
});
},
...
rowSelection
,
...
(
rowSelection
===
undefined
?
{}
:
rowSelection
)
,
};
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment