修改手机端缩放图片

This commit is contained in:
范强强
2023-07-20 10:32:14 +08:00
parent 238a8f5ef0
commit 15bfef302b
2 changed files with 11 additions and 3 deletions
@@ -24,7 +24,7 @@
</div>
</div>
<div class="content" v-html="queryForm.content">
<div class="content" id="contentId" v-html="queryForm.content">
</div>
@@ -139,7 +139,7 @@
import { mapGetters } from 'vuex'
import { kkFileView } from '@/utils/kkfileView'
import { deleteAction } from '../../api/manage'
import { Dialog, Toast } from 'vant'
import { Dialog, ImagePreview, Toast } from 'vant'
export default {
name: 'phoneProblemKnowledgeBase',
@@ -172,6 +172,14 @@
}
})
}
this.$nextTick(() => {
let contentId = document.getElementById('contentId')
contentId.onclick = function(e) {
if (e.target.localName == 'img') {
ImagePreview([e.target.currentSrc])
}
}
})
window.addEventListener('scroll', this.scrolling)
window.addEventListener('mousedown', this.handleonmousedown)
this.getQueryBy()