From ec2091875f7c472617e45851bcf22fa583ad4037 Mon Sep 17 00:00:00 2001 From: shenyanpei Date: Thu, 2 Dec 2021 10:36:01 +0800 Subject: [PATCH] =?UTF-8?q?=E9=93=BE=E6=8E=A5=E5=9B=BE=E7=89=87=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/linkManage/linkType/firstLink.vue | 42 +++++---- .../pages/linkManage/linkType/secondLink.vue | 45 ++++++---- .../home2/components/empennage/index.vue | 88 ++++++++----------- 3 files changed, 86 insertions(+), 89 deletions(-) diff --git a/src/pages/config/pages/linkManage/linkType/firstLink.vue b/src/pages/config/pages/linkManage/linkType/firstLink.vue index 33888fac8..025c33e0d 100644 --- a/src/pages/config/pages/linkManage/linkType/firstLink.vue +++ b/src/pages/config/pages/linkManage/linkType/firstLink.vue @@ -57,7 +57,7 @@ label="链接图标"> import Sortable from 'sortablejs' -import { getImg } from '@/api/linkApi.js' +import {getImg} from '@/api/linkApi.js' export default { name: "firstLink", @@ -415,11 +415,12 @@ export default { this.sarStandardsInfoEO.url = row.url this.sarStandardsInfoEO.sortId = row.sortId this.sarStandardsInfoEO.icon = row.icon - if (row.id !== '') { + if (row.icon !== '') { let imgId = { id: row.id } - getImg(imgId).then(res=>{ + // 图片转base64 + getImg(imgId).then(res => { if (res.ok) { const src = "data:image/png;base64," + @@ -445,26 +446,25 @@ export default { loading: 'Loading' }, res => { this.linkList = res.data - res.data.forEach(item=>{ + res.data.forEach(item => { if (item.type === 1) { this.linkListFirst.push(item) } }) - this.linkListFirst.forEach(item=>{ - if (item.id !== '') { + this.linkListFirst.forEach(item => { + if (item.icon !== '') { let imgId = { id: item.id } - getImg(imgId).then(res=>{ - if (res.ok) { - const src = - "data:image/png;base64," + - btoa( - new Uint8Array(res).reduce( - (data, byte) => data + String.fromCharCode(byte), "") - ) - item.icon = src - } + // 图片转base64 + getImg(imgId).then(res => { + const src = + "data:image/png;base64," + + btoa( + new Uint8Array(res).reduce( + (data, byte) => data + String.fromCharCode(byte), "") + ) + item.icon = src }) } }) @@ -526,13 +526,16 @@ export default { position: relative; overflow: hidden; } + .avatar-uploader .el-upload:hover { margin-top: 10px; border-color: #409EFF; } + .avatar-uploader { margin-top: 10px; } + .avatar-uploader-icon { font-size: 28px; color: #8c939d; @@ -541,15 +544,18 @@ export default { line-height: 100px; text-align: center; } + .avatar { width: 100px; height: 100px; display: block; } + .filter-tree { height: calc(~'100% - 50px') } - /deep/.el-input.is-disabled .el-input__inner { + + /deep/ .el-input.is-disabled .el-input__inner { background-color: #fff; } } diff --git a/src/pages/config/pages/linkManage/linkType/secondLink.vue b/src/pages/config/pages/linkManage/linkType/secondLink.vue index 3d6f40b46..b785a6b94 100644 --- a/src/pages/config/pages/linkManage/linkType/secondLink.vue +++ b/src/pages/config/pages/linkManage/linkType/secondLink.vue @@ -56,7 +56,8 @@ prop="icon" label="链接图标"> - @@ -153,8 +153,9 @@