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
e78af6f2
Commit
e78af6f2
authored
Jun 25, 2021
by
无木
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(table): getDataSource not worked on empty data
修复getDataSource获取的数据源在表格为空时返回值错误的问题。 fixed: #752
parent
4ae39c53
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+2
-0
useDataSource.ts
src/components/Table/src/hooks/useDataSource.ts
+1
-1
No files found.
CHANGELOG.zh_CN.md
View file @
e78af6f2
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
-
**Table**
修复分页抖动问题
-
**Table**
修复分页抖动问题
-
**Upload**
确保携带自定义参数
-
**Upload**
确保携带自定义参数
-
**Dropdown**
修复 popConfirm 的图标显示问题
-
**Dropdown**
修复 popConfirm 的图标显示问题
-
**Table**
修复树形表格的编辑事件不正常的问题
-
**Table**
修复当表格数据为空时,getDataSource 返回的值不是表格所使用的数据源的问题
## 2.5.0(2021-06-20)
## 2.5.0(2021-06-20)
...
...
src/components/Table/src/hooks/useDataSource.ts
View file @
e78af6f2
...
@@ -113,7 +113,7 @@ export function useDataSource(
...
@@ -113,7 +113,7 @@ export function useDataSource(
const
getDataSourceRef
=
computed
(()
=>
{
const
getDataSourceRef
=
computed
(()
=>
{
const
dataSource
=
unref
(
dataSourceRef
);
const
dataSource
=
unref
(
dataSourceRef
);
if
(
!
dataSource
||
dataSource
.
length
===
0
)
{
if
(
!
dataSource
||
dataSource
.
length
===
0
)
{
return
[]
;
return
unref
(
dataSourceRef
)
;
}
}
if
(
unref
(
getAutoCreateKey
))
{
if
(
unref
(
getAutoCreateKey
))
{
const
firstItem
=
dataSource
[
0
];
const
firstItem
=
dataSource
[
0
];
...
...
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