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
de79ef54
Commit
de79ef54
authored
Feb 18, 2022
by
leon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:table image add preview
parent
e1ea753b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
NormalTable.vue
components/NormalTable/NormalTable.vue
+16
-1
No files found.
components/NormalTable/NormalTable.vue
View file @
de79ef54
...
...
@@ -22,10 +22,11 @@
<template
v-if=
"item.slots.customRender == 'rank'"
>
{{
index
+
1
}}
</
template
>
<
template
v-else-if=
"item.slots.customRender == 'picture'"
>
<u-image
:height=
"
2
00"
:height=
"
1
00"
mode=
"aspectFit"
:src=
"`$
{cell[item.dataIndex]}?${new Date().getTime()}`"
crossOrigin="anonymous"
@click="imageClick(cellIndex, item.dataIndex)"
>
</u-image>
</
template
>
<
template
v-else-if=
"item.slots.customRender == 'toThousands'"
>
{{
$u
.
common
.
toThousands
(
cell
[
item
.
dataIndex
])
}}
</
template
>
...
...
@@ -81,6 +82,20 @@
const paramName = this.elementInfo.table.primaryKey
const value = e[paramName]
uni.$emit('handleLinkParams', { index, paramName, value: value
}
)
}
,
imageClick(index, key) {
debugger
const images = []
for(var i = 0; i < this.chartTables.length; i++) {
const imageUrl = this.chartTables[i][key]
images.push(imageUrl)
}
uni.previewImage({
current: index,
urls: images,
indicator: 'number',
loop: true
}
)
}
}
}
...
...
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