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
d46ddb17
Commit
d46ddb17
authored
Feb 17, 2022
by
Jenny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: table 格式
parent
f66522b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
NormalTable.vue
components/NormalTable/NormalTable.vue
+14
-1
No files found.
components/NormalTable/NormalTable.vue
View file @
d46ddb17
...
...
@@ -18,7 +18,20 @@
</u-tr>
<u-tr
v-for=
"(cell, cellIndex) in chartTables"
:key=
"cellIndex"
@
tap=
"cellClick(cell)"
>
<u-td
style=
"width: 300rpx;"
v-for=
"(item, index) in columns"
:key=
"index"
>
{{
cell
[
item
.
dataIndex
]
}}
<template
v-if=
"item.slots.customRender == 'rank'"
>
{{
index
+
1
}}
</
template
>
<
template
v-else-if=
"item.slots.customRender == 'picture'"
>
<u-image
:height=
"200"
mode=
"aspectFit"
:src=
"`$
{cell[item.dataIndex]}?${new Date().getTime()}`"
crossOrigin="anonymous"
>
</u-image>
</
template
>
<
template
v-else-if=
"item.slots.customRender == 'toThousands'"
>
{{
$u
.
common
.
toThousands
(
cell
[
item
.
dataIndex
])
}}
</
template
>
<
template
v-else-if=
"item.slots.customRender == 'percentage'"
>
{{
Number
(
cell
[
item
.
dataIndex
]
*
100
).
toFixed
(
0
)
}}
%
</
template
>
<
template
v-else-if=
"item.slots.customRender == 'Integer'"
>
{{
parseInt
(
cell
[
item
.
dataIndex
])
}}
</
template
>
<
template
v-else-if=
"item.slots.customRender == 'price'"
>
{{
`¥${Number(cell[item.dataIndex]).toFixed(2)
}
`
}}
<
/template
>
<
template
v
-
else
>
{{
cell
[
item
.
dataIndex
]
}}
<
/template
>
<
/u-td
>
<
/u-tr>
<
/u-table
>
...
...
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