Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
d2-table-demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit bbbc711d
authored
Sep 24, 2021
by
李长胜
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
允许border有无,增加表头样式,增加表格无数据的情况
1 parent
a8727f10
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
1 deletions
src/components/d2-table/index.vue
src/components/d2-table/index.vue
View file @
bbbc711
...
@@ -6,12 +6,13 @@
...
@@ -6,12 +6,13 @@
:data=
"getListApi ? data : tableData"
:data=
"getListApi ? data : tableData"
:row-key=
"tableParams.mutiSelectUniqueKey || ''"
:row-key=
"tableParams.mutiSelectUniqueKey || ''"
v-loading=
"loading"
v-loading=
"loading"
border
:border=
"border"
:highlight-current-row=
"true"
:highlight-current-row=
"true"
:stripe=
"true"
:stripe=
"true"
@
sort-change=
"sortChange"
@
sort-change=
"sortChange"
@
selection-change=
"handleSelect"
@
selection-change=
"handleSelect"
:size=
"size"
:size=
"size"
:header-cell-style=
"headerStyle"
>
>
<el-table-column
<el-table-column
v-if=
"tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
v-if=
"tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
...
@@ -90,6 +91,11 @@
...
@@ -90,6 +91,11 @@
></slot>
></slot>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<div
slot=
"empty"
class=
"emptyBg"
>
<img
class=
"noDataImg"
:src=
"noDataImg"
v-if=
noDataImg
alt=
""
/>
<p>
{{noDataText}}
</p>
<slot
name=
"additionalContent"
></slot>
</div>
</el-table>
</el-table>
<el-pagination
<el-pagination
v-if=
"hasPage"
v-if=
"hasPage"
...
@@ -127,6 +133,22 @@ export default {
...
@@ -127,6 +133,22 @@ export default {
type
:
String
,
type
:
String
,
default
:
'medium'
default
:
'medium'
},
},
noDataImg
:{
type
:
String
,
default
:
''
},
noDataText
:{
type
:
String
,
default
:
'暂无数据'
},
border
:
{
type
:
Boolean
,
default
:
false
},
headerStyle
:
{
type
:
Object
,
default
:
()
=>
{}
},
// 搜索条件
// 搜索条件
searchForm
:
{
searchForm
:
{
type
:
Object
,
type
:
Object
,
...
@@ -342,4 +364,13 @@ export default {
...
@@ -342,4 +364,13 @@ export default {
padding-left
:
14px
!important
;
padding-left
:
14px
!important
;
padding-right
:
14px
!important
;
padding-right
:
14px
!important
;
}
}
.glsx-table
.emptyBg
.noDataImg
{
display
:
inline-block
;
margin-top
:
150px
;
height
:
100%
;
}
.glsx-table
.emptyBg
p
{
margin-top
:
-20px
;
height
:
100%
;
}
</
style
>
</
style
>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment