Browse Source

fix issue

tags/v1.22.10.1^2
zhoupzh 3 years ago
parent
commit
d5731506d2
1 changed files with 37 additions and 0 deletions
  1. +37
    -0
      web_src/vuepages/pages/model/tuomin/index.vue

+ 37
- 0
web_src/vuepages/pages/model/tuomin/index.vue View File

@@ -77,6 +77,17 @@
></i>
<span style="font-size: 12px">output</span>
</div>
<div
v-if="resultImgSrc"
class="tuomin-icon-download"
@click="downImg"
>
<i
class="ri-download-2-line"
style="font-size: 16px; margin-right: 2px"
></i>
<span style="font-size: 14px">下载</span>
</div>
<div style="height: 358px">
<el-image
style="height: 100%; width: 100%"
@@ -190,6 +201,15 @@ export default {
this.file = "";
this.fileList = [];
},
downImg() {
const a = document.createElement("a");
a.download = "result.png";
a.style.display = "none";
a.href = this.resultImgSrc;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
},
startTranform() {
if (!this.file) return;
let fd = new FormData();
@@ -273,6 +293,23 @@ export default {
border-radius: 5px 0px 10px 0px;
border: 1px solid rgba(0, 0, 0, 0.1);
}
.tuomin-icon-download {
z-index: 99;
display: flex;
align-items: center;
position: absolute;
right: 10px;
bottom: 10px;
width: 66px;
height: 30px;
justify-content: center;
color: rgba(255, 255, 255, 1);
background-color: rgba(0, 0, 0, 0);
background: transparent;
border: 1px solid rgba(136, 136, 136, 0.5);
border-radius: 4px;
cursor: pointer;
}
.el-upload__text {
height: 100%;
display: flex;


Loading…
Cancel
Save