修改图片预览

This commit is contained in:
高嵩
2023-07-21 17:35:51 +08:00
parent 7edc2b048e
commit c2628ad938
2 changed files with 14 additions and 10 deletions
@@ -577,7 +577,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
List<SysConfig> sysConfigs = iSysConfigService.queryList();
if(org.apache.commons.collections.CollectionUtils.isNotEmpty(sysConfigs)){
for (SysConfig sysConfig : sysConfigs) {
if(sysConfig.getConfigName().equals("domainWebImgURL")){
if(sysConfig.getConfigName().equals("domianWebImgURL")){
String pcUrl = sysConfig.getConfig();
String phoneUrl = sysConfig.getPhoneConfig();
if(ObjectUtils.isNotEmpty(problemKnowledgeBaseEO) && StringUtils.isNotBlank(problemKnowledgeBaseEO.getContent())){
@@ -24,7 +24,7 @@
</div>
</div>
<div class="content" id="contentId" v-html="queryForm.content">
<div class="content" id="contentId" @click="contentIdClick($event)" v-html="queryForm.content">
</div>
@@ -172,14 +172,13 @@
}
})
}
this.$nextTick(() => {
let contentId = document.getElementById('contentId')
contentId.onclick = function(e) {
if (e.target.localName == 'img') {
ImagePreview([e.target.currentSrc])
}
}
})
// this.$nextTick(() => {
// let contentId = document.getElementById('contentId')
// console.log(contentId)
// contentId.onclick = function(e) {
// console.log(e)
// }
// })
window.addEventListener('scroll', this.scrolling)
window.addEventListener('mousedown', this.handleonmousedown)
this.getQueryBy()
@@ -205,6 +204,11 @@
// scrolling() {
// this.isDisplay = false
// },
contentIdClick(e){
if (e.target.localName == 'img') {
ImagePreview([e.target.currentSrc])
}
},
handleonmousedown(e) {
if (e.srcElement.type == 'textarea' || e.target.type == 'textarea') {