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
76e208f5
Commit
76e208f5
authored
May 12, 2022
by
leon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: remove first content cell
parent
7bbbee95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
Table.vue
components/Table/Table.vue
+15
-15
No files found.
components/Table/Table.vue
View file @
76e208f5
...
...
@@ -7,26 +7,20 @@
<view
class=
"table"
:style=
"tableStyle"
>
<view
class=
"table-header"
>
<view
class=
"title-cell"
>
<view
v-for=
"(item, index) in elementInfo.table.column"
:key=
"index"
>
<view
class=
"column"
v-if =
"item.title == 'Store' "
>
{{
item
.
title
}}
</view>
</view>
</view>
<view
class=
"content-cell"
v-for=
"(item, index) in elementInfo.table.column"
:key=
"index"
>
<view
class=
"cell"
v-if =
"item.title != 'Store' "
>
{{
item
.
title
}}
</view>
</view>
<view
:class=
"[index === 0 ? 'title-cell' : 'content-cell']"
v-for=
"(item, index) in elementInfo.table.column"
:key=
"index"
>
<view
:class=
"[index === 0 ? 'column' : 'cell']"
>
{{
item
.
title
}}
</view>
</view>
</view>
<view
class=
"table-content"
:style=
"tableStyle"
>
<view
class=
"table-content__item"
v-for=
"(cell, cellIndex) in chartTables"
:key=
"cellIndex"
@
tap=
"cellClick(cell)"
>
<!--
<view
class=
""
>
-->
<view
class=
"title-cell"
>
<view
class=
"cell"
>
{{
cell
.
shopName
}}
</view>
</view>
<view
:class=
"[cellIndex %2 == 1 ? 'content-cell-bg' :'content-cell']"
v-for=
"(item, index) in elementInfo.table.column"
:key=
"index"
>
<view
v-if=
"i
tem.dataIndex != 'shopName'
"
>
<view
:class=
"[
index === 0 ? 'empty-cell' :
cellIndex %2 == 1 ? 'content-cell-bg' :'content-cell']"
v-for=
"(item, index) in elementInfo.table.column"
:key=
"index"
>
<view
v-if=
"i
ndex != 0
"
>
<template
class=
"cell"
v-if=
"item.slots.customRender == 'rank'"
>
{{
index
+
1
}}
</
template
>
<
template
class=
"cell"
v-else-if=
"item.slots.customRender == 'picture'"
>
<u-image
...
...
@@ -48,6 +42,9 @@
<
/view
>
<
/view>
<!--
<
/view> --
>
<
/view
>
<
/view
>
...
...
@@ -125,8 +122,7 @@
tableStyle
()
{
const
{
frameStyle
,
frameWidth
,
frameColor
,
bordered
}
=
this
.
elementInfo
.
table
const
{
backgroundColor
}
=
this
.
elementInfo
.
table
.
tableCell
const
width
=
150
+
this
.
elementInfo
.
table
.
column
.
length
*
150
;
console
.
log
(
'width'
,
width
)
const
width
=
this
.
elementInfo
.
table
.
column
.
length
*
150
;
return
`width: ${width
}
rpx`
;
}
}
,
...
...
@@ -141,6 +137,8 @@
// that.cacheImages(item.dataIndex)
}
}
)
console
.
log
(
that
.
chartTables
)
console
.
log
(
that
.
elementInfo
.
table
.
column
)
}
)
}
,
cellClick
(
e
)
{
...
...
@@ -293,7 +291,9 @@ $title-color: #f6f6f6;
font
-
size
:
20
rpx
;
background
-
color
:
$title
-
color
;
}
.
empty
-
cell
{
width
:
0
px
;
}
.
content
-
cell
{
display
:
table
-
cell
;
width
:
$content
-
width
;
...
...
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