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
7bbbee95
Commit
7bbbee95
authored
May 11, 2022
by
root
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update table first column & cell to fixed
parent
3172503a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
16 deletions
+29
-16
Table.vue
components/Table/Table.vue
+29
-16
No files found.
components/Table/Table.vue
View file @
7bbbee95
...
...
@@ -25,7 +25,7 @@
<view
class=
"cell"
>
{{
cell
.
shopName
}}
</view>
</view>
<view
class=
"content-cell
"
v-for=
"(item, index) in elementInfo.table.column"
:key=
"index"
>
<view
:class=
"[cellIndex %2 == 1 ? 'content-cell-bg' :'content-cell']
"
v-for=
"(item, index) in elementInfo.table.column"
:key=
"index"
>
<view
v-if=
"item.dataIndex != 'shopName'"
>
<template
class=
"cell"
v-if=
"item.slots.customRender == 'rank'"
>
{{
index
+
1
}}
</
template
>
<
template
class=
"cell"
v-else-if=
"item.slots.customRender == 'picture'"
>
...
...
@@ -125,7 +125,7 @@
tableStyle
()
{
const
{
frameStyle
,
frameWidth
,
frameColor
,
bordered
}
=
this
.
elementInfo
.
table
const
{
backgroundColor
}
=
this
.
elementInfo
.
table
.
tableCell
const
width
=
200
+
this
.
elementInfo
.
table
.
column
.
length
*
2
50
;
const
width
=
150
+
this
.
elementInfo
.
table
.
column
.
length
*
1
50
;
console
.
log
(
'width'
,
width
)
return
`width: ${width
}
rpx`
;
}
...
...
@@ -211,15 +211,15 @@
<
style
lang
=
"scss"
scoped
>
.
analysis
-
group
{
margin
-
top
:
20
px
;
width
:
100
%
;
;
width
:
100
vw
;
height
:
100
%
;
scroll
-
view
{
width
:
100
vw
;
height
:
40
vh
;
height
:
100
%
;
}
}
$title
-
width
:
20
0
rpx
;
$content
-
width
:
2
50
rpx
;
$title
-
width
:
15
0
rpx
;
$content
-
width
:
1
50
rpx
;
$border
-
color
:
#
f6f6f6
;
$border
:
1
rpx
solid
$border
-
color
;
$white
:
#
FFFFFF
;
...
...
@@ -227,8 +227,6 @@ $title-color: #f6f6f6;
.
table
{
display
:
table
;
.
table
-
header
{
// display: table-row;
// font-weight: bold;
background
-
color
:
$title
-
color
;
position
:
sticky
;
top
:
0
;
...
...
@@ -247,8 +245,9 @@ $title-color: #f6f6f6;
}
.
column
{
position
:
absolute
;
left
:
10
rpx
;
bottom
:
10
rpx
;
left
:
60
rpx
;
bottom
:
15
rpx
;
font
-
size
:
25
rpx
;
}
}
.
content
-
cell
{
...
...
@@ -261,18 +260,21 @@ $title-color: #f6f6f6;
&
__item
{
display
:
table
-
row
;
.
title
-
cell
{
border
-
left
:
$border
;
border
-
right
:
$border
;
//
border-left: $border;
//
border-right: $border;
border
-
bottom
:
$border
;
position
:
sticky
;
left
:
0
;
z
-
index
:
1
;
align
-
items
:
center
;
text
-
align
:
center
;
justify
-
content
:
center
;
}
.
content
-
cell
{
border
-
bottom
:
$border
;
border
-
right
:
$border
;
// border-right: $border;
text
-
align
:
center
;
font
-
size
:
20
rpx
;
}
}
}
...
...
@@ -282,17 +284,28 @@ $title-color: #f6f6f6;
background
-
color
:
$title
-
color
;
align
-
items
:
center
;
justify
-
content
:
center
;
text
-
align
:
center
;
}
.
content
-
cell
-
bg
{
display
:
table
-
cell
;
width
:
$content
-
width
;
text
-
align
:
center
;
font
-
size
:
20
rpx
;
background
-
color
:
$title
-
color
;
}
.
content
-
cell
{
display
:
table
-
cell
;
width
:
$content
-
width
;
text
-
align
:
center
;
font
-
size
:
20
rpx
;
}
.
cell
{
padding
:
5
px
0
px
;
// line-height: 1.6;
font
-
size
:
28
rpx
;
padding
:
10
px
0
px
;
font
-
size
:
20
rpx
;
align
-
items
:
center
;
justify
-
content
:
center
;
text
-
align
:
center
;
}
}
...
...
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