Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
ec-report-refactor
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
lihuizhen
ec-report-refactor
Commits
2654d928
Commit
2654d928
authored
May 12, 2022
by
Jenny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: table width
parent
be068e02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
NormalTable.vue
components/NormalTable/NormalTable.vue
+5
-11
No files found.
components/NormalTable/NormalTable.vue
View file @
2654d928
...
@@ -71,8 +71,10 @@
...
@@ -71,8 +71,10 @@
const
{
frameStyle
,
frameWidth
,
frameColor
,
bordered
}
=
this
.
elementInfo
.
table
const
{
frameStyle
,
frameWidth
,
frameColor
,
bordered
}
=
this
.
elementInfo
.
table
const
{
evenColor
,
oddColor
,
backgroundColor
:
cellBackgroundColor
,
titlePostion
:
cellTitlePostion
,
titleFontSize
:
cellTitleFontSize
,
cellRowHeight
,
titleColor
:
cellTitleColor
}
=
this
.
elementInfo
.
table
.
tableCell
const
{
evenColor
,
oddColor
,
backgroundColor
:
cellBackgroundColor
,
titlePostion
:
cellTitlePostion
,
titleFontSize
:
cellTitleFontSize
,
cellRowHeight
,
titleColor
:
cellTitleColor
}
=
this
.
elementInfo
.
table
.
tableCell
const
{
headerRowHeight
,
titleColor
:
headerTitleColor
,
backgroundColor
:
headerBackgroundColor
,
titlePostion
:
headerTitlePostion
,
titleFontSize
:
headerTitleFontSize
}
=
this
.
elementInfo
.
table
.
tableHeader
const
{
headerRowHeight
,
titleColor
:
headerTitleColor
,
backgroundColor
:
headerBackgroundColor
,
titlePostion
:
headerTitlePostion
,
titleFontSize
:
headerTitleFontSize
}
=
this
.
elementInfo
.
table
.
tableHeader
const
cellWidth
=
this
.
elementInfo
.
table
.
column
.
length
>
10
?
130
:
240
return
{
return
{
'--table-width'
:
`${130 * this.elementInfo.table.column.length
}
rpx`
,
'--table-width'
:
`${cellWidth * this.elementInfo.table.column.length
}
rpx`
,
'--cell-width'
:
`0 0 ${cellWidth
}
rpx`
,
'--cell--background-color'
:
cellBackgroundColor
,
'--cell--background-color'
:
cellBackgroundColor
,
'--even-color'
:
evenColor
,
'--even-color'
:
evenColor
,
'--odd-color'
:
oddColor
,
'--odd-color'
:
oddColor
,
...
@@ -194,19 +196,15 @@
...
@@ -194,19 +196,15 @@
flex
-
direction
:
row
;
flex
-
direction
:
row
;
}
}
.
th
{
.
th
{
flex
:
0
0
130
rpx
;
flex
:
var
(
--
cell
-
width
)
;
font
-
size
:
28
rpx
;
font
-
size
:
28
rpx
;
color
:
$u
-
main
-
color
;
color
:
$u
-
main
-
color
;
padding
:
10
px
0
px
;
padding
:
10
px
0
px
;
background
-
color
:
rgb
(
245
,
246
,
248
);
background
-
color
:
rgb
(
245
,
246
,
248
);
}
}
.
th
-
large
{
flex
:
0
0
220
rpx
;
font
-
weight
:
bold
;
}
.
td
{
.
td
{
flex
:
0
0
130
rpx
;
flex
:
var
(
--
cell
-
width
)
;
align
-
self
:
stretch
;
align
-
self
:
stretch
;
padding
:
10
px
0
px
;
padding
:
10
px
0
px
;
font
-
size
:
28
rpx
;
font
-
size
:
28
rpx
;
...
@@ -216,10 +214,6 @@
...
@@ -216,10 +214,6 @@
justify
-
content
:
center
;
justify
-
content
:
center
;
}
}
.
td
-
large
{
flex
:
0
0
220
rpx
;
}
.
th_style
{
.
th_style
{
line
-
height
:
var
(
--
header
-
row
-
height
);
line
-
height
:
var
(
--
header
-
row
-
height
);
font
-
size
:
var
(
--
header
-
font
-
size
);
font
-
size
:
var
(
--
header
-
font
-
size
);
...
...
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