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
9aa37cee
Commit
9aa37cee
authored
Jan 20, 2021
by
何虹
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化表格健壮性
parent
9c98fbfb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
14 deletions
+20
-14
child.vue
src/packages/hs-table/src/child.vue
+20
-14
No files found.
src/packages/hs-table/src/child.vue
View file @
9aa37cee
...
...
@@ -101,12 +101,15 @@
:min-width=
"columnItem.width||80"
:sortable=
"columnItem.isSort?'custom':false"
>
<
template
v-slot:header
>
<span
v-if=
"columnItem.isRequired"
:class=
"
{'is-isRequired': columnItem.isRequired}">
*
</span>
<span>
{{
columnItem
.
label
}}
</span>
</
template
>
<
template
v-slot:header
>
<span
v-if=
"columnItem.isRequired"
:class=
"
{'is-isRequired': columnItem.isRequired}"
>
*
</span>
<span>
{{
columnItem
.
label
}}
</span>
</
template
>
<
template
slot-scope=
"scope"
>
<i
v-if=
"columnItem.type==='checkBox'"
...
...
@@ -236,12 +239,15 @@
:min-width=
"column.width||80"
:sortable=
"column.isSort"
>
<
template
v-slot:header
>
<span
v-if=
"column.isRequired"
:class=
"
{'is-isRequired': column.isRequired}">
*
</span>
<span>
{{
column
.
label
}}
</span>
</
template
>
<
template
v-slot:header
>
<span
v-if=
"column.isRequired"
:class=
"
{'is-isRequired': column.isRequired}"
>
*
</span>
<span>
{{
column
.
label
}}
</span>
</
template
>
<
template
slot-scope=
"scope"
>
<i
v-if=
"column.type==='checkBox'"
...
...
@@ -396,7 +402,7 @@ export default {
},
// 第一行数据
firstRow
()
{
return
(
this
.
data
.
length
&&
this
.
data
[
0
])
||
{}
return
(
this
.
data
&&
this
.
data
.
length
&&
this
.
data
[
0
])
||
{}
},
// 表格真实显示数据
tableData
()
{
...
...
@@ -1083,7 +1089,7 @@ export default {
td
{
height
:
35px
!important
;
}
.is-isRequired
{
.is-isRequired
{
color
:
red
;
}
</
style
>
...
...
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