fix: 在文件页面编辑文本时选择已传图片缩列图不显示的情况

This commit is contained in:
Pang 2023-08-10 01:11:33 +08:00
parent 84e3b22357
commit 1be70fd8f2
2 changed files with 11 additions and 1 deletions

View File

@ -50,7 +50,7 @@
<div v-if="browseList.length <= 0">{{$L('无内容')}}</div> <div v-if="browseList.length <= 0">{{$L('无内容')}}</div>
<div v-else class="browse-item" v-for="item in browseList" @click="browseItem(item)"> <div v-else class="browse-item" v-for="item in browseList" @click="browseItem(item)">
<Icon v-if="item.active" class="browse-icon" type="ios-checkmark-circle"></Icon> <Icon v-if="item.active" class="browse-icon" type="ios-checkmark-circle"></Icon>
<div class="browse-img" v-bind:style="{ 'background-image': 'url(' + item.thumb + ')' }"></div> <div class="browse-img" v-bind:style="browseStyle(item.thumb)"></div>
<div class="browse-title">{{item.title}}</div> <div class="browse-title">{{item.title}}</div>
</div> </div>
</div> </div>
@ -366,6 +366,15 @@
} }
}, },
browseStyle(thumb) {
if (!/https*:\/\//.test(thumb) && !/^\//.test(thumb)) {
thumb = $A.apiUrl(`../${thumb}`);
}
return {
'background-image': `url("${thumb}")`
}
},
__thumb(url) { __thumb(url) {
if ($A.strExists(url, "?", false)) { if ($A.strExists(url, "?", false)) {
return url + "&__thumb=true"; return url + "&__thumb=true";

View File

@ -237,6 +237,7 @@
padding-top: 15px; padding-top: 15px;
color: #ffffff; color: #ffffff;
background-color: rgba(0, 0, 0, 0.5); background-color: rgba(0, 0, 0, 0.5);
z-index: 1;
} }
} }
} }