Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
hs-sky-ui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
何虹
hs-sky-ui
Commits
b012123a
Commit
b012123a
authored
Jan 18, 2021
by
何虹
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化升级表格
parent
ea0c7db5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
964 additions
and
23 deletions
+964
-23
child copy 2.vue
src/packages/hs-table/src/child copy 2.vue
+938
-0
child.vue
src/packages/hs-table/src/child.vue
+24
-22
rowTable.vue
src/packages/hs-table/src/rowTable.vue
+2
-1
No files found.
src/packages/hs-table/src/child copy 2.vue
0 → 100644
View file @
b012123a
This diff is collapsed.
Click to expand it.
src/packages/hs-table/src/child.vue
View file @
b012123a
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
@
clickLabel=
'clickToolLabel'
@
clickLabel=
'clickToolLabel'
></tool-column>
></tool-column>
</span>
</span>
<u
-table
<u
x-grid
:data-changes-scroll-top=
'false'
:data-changes-scroll-top=
'false'
:big-data-checkbox=
"true"
:big-data-checkbox=
"true"
ref=
"plTable"
ref=
"plTable"
...
@@ -50,29 +50,31 @@
...
@@ -50,29 +50,31 @@
<template
v-for=
'(column,index) in tableColumns'
>
<template
v-for=
'(column,index) in tableColumns'
>
<template
v-if=
"!column.childs"
>
<template
v-if=
"!column.childs"
>
<u-table-column
<u
x
-table-column
v-if=
'
tableConfig.expandChild
'
v-if=
'
column.showType==="expandChild"
'
:key=
"index"
:key=
"index"
type=
"expand"
type=
"expand"
width=
'50px'
title=
'展开'
>
>
<template
slot-scope=
"props
"
>
<template
v-slot:content=
"
{ row }
">
<rowTable
:rowTable=
'props.
row._childTable'
></rowTable>
<rowTable
:rowTable=
'
row._childTable'
></rowTable>
</
template
>
</
template
>
</u-table-column>
</u
x
-table-column>
<u-table-column
<u
x
-table-column
v-else-if=
"column.showType==='index'"
v-else-if=
"column.showType==='index'"
:key=
"index"
:key=
"index"
type=
"index"
type=
"index"
width=
"55"
width=
"55"
/>
/>
<u-table-column
<u
x
-table-column
v-else-if=
"column.showType==='selection'"
v-else-if=
"column.showType==='selection'"
:key=
"index"
:key=
"index"
type=
"
selection
"
type=
"
checkbox
"
width=
"55"
width=
"55"
:selectable=
"selectable"
:selectable=
"selectable"
/>
/>
<u-table-column
<u
x
-table-column
v-else-if=
'column.showType==="handleColumn"'
v-else-if=
'column.showType==="handleColumn"'
:key=
"index"
:key=
"index"
fixed=
"right"
fixed=
"right"
...
@@ -88,14 +90,14 @@
...
@@ -88,14 +90,14 @@
@
itemClickHandle=
'itemClickHandle'
@
itemClickHandle=
'itemClickHandle'
/>
/>
</
template
>
</
template
>
</u-table-column>
</u
x
-table-column>
<u-table-column
<u
x
-table-column
v-else
v-else
:key=
"index"
:key=
"index"
:resizable=
"column.resizable"
:resizable=
"column.resizable"
:show-overflow-tooltip=
"column.showOverflow"
:show-overflow-tooltip=
"column.showOverflow"
:
prop
=
"column.prop"
:
field
=
"column.prop"
:
label
=
"column.label"
:
title
=
"column.label"
:fixed=
"column.fixed"
:fixed=
"column.fixed"
:min-width=
"column.width||80"
:min-width=
"column.width||80"
:sortable=
"column.isSort?'custom':false"
:sortable=
"column.isSort?'custom':false"
...
@@ -116,17 +118,17 @@
...
@@ -116,17 +118,17 @@
>
>
</childItem>
</childItem>
</
template
>
</
template
>
</u-table-column>
</u
x
-table-column>
</template>
</template>
<
template
v-else-if=
'column.childs'
>
<
template
v-else-if=
'column.childs'
>
<u-table-column
<u
x
-table-column
:label=
"column.label"
:label=
"column.label"
:key=
"index"
:key=
"index"
>
>
<template
v-for=
"item in column.childs"
>
<template
v-for=
"item in column.childs"
>
<u-table-column
<u
x
-table-column
:
prop
=
"item.prop"
:
field
=
"item.prop"
:
label
=
"item.label"
:
title
=
"item.label"
:key=
"item.label"
:key=
"item.label"
:min-width=
"column.width||80"
:min-width=
"column.width||80"
>
>
...
@@ -140,13 +142,13 @@
...
@@ -140,13 +142,13 @@
>
>
</childItem>
</childItem>
</
template
>
</
template
>
</u-table-column>
</u
x
-table-column>
</template>
</template>
</u-table-column>
</u
x
-table-column>
</template>
</template>
</template>
</template>
</u
-table
>
</u
x-grid
>
<tbaleColumsSet
<tbaleColumsSet
v-model=
"dialogVisibleTbaleColums"
v-model=
"dialogVisibleTbaleColums"
:tableDataColums=
'tableDataColums'
:tableDataColums=
'tableDataColums'
...
...
src/packages/hs-table/src/rowTable.vue
View file @
b012123a
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<el-table
<el-table
class=
"innerTable"
class=
"innerTable"
:data=
"tableData"
:data=
"tableData"
border
>
>
<el-table-column
v-for=
"item in tableColumn"
:key=
"item"
<el-table-column
v-for=
"item in tableColumn"
:key=
"item"
:prop=
"item"
:prop=
"item"
...
@@ -34,7 +35,7 @@ export default {
...
@@ -34,7 +35,7 @@ export default {
const
row
=
Object
.
keys
(
this
.
tableData
[
0
])
const
row
=
Object
.
keys
(
this
.
tableData
[
0
])
return
row
return
row
}
else
{
}
else
{
return
[]
return
{}
}
}
}
}
},
},
...
...
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