Commit 088f0207 by MichaelJier

fix

1. 修复在服务端渲染富文本photoswipe过长的问题
parent 648da4f0
<template> <template>
<div class="imageText ql-container ql-snow"> <div class="imageText ql-container ql-snow">
<div class="ql-editor" v-html="menuInfo" @click="getpreview($event)"></div> <div class="ql-editor" v-html="menuInfo" @click="getpreview($event)"></div>
<div v-for="(item, index) in imageArr" :key="index" :data-index="item" v-show="false" ref="showImg"> <span v-if="showImg">
<img v-photoswipe="{ group: 'imageText' }" :src="item"/> <div v-for="(item, index) in imageArr" :key="index" :data-index="item" v-show="false" ref="showImg">
</div> <img v-photoswipe="{ group: 'imageText' }" :src="item"/>
</div>
</span>
</div> </div>
</template> </template>
...@@ -16,6 +18,14 @@ export default { ...@@ -16,6 +18,14 @@ export default {
props: { props: {
menuInfo: {} menuInfo: {}
}, },
data() {
return {
showImg: false
}
},
mounted() {
this.showImg = true
},
computed: { computed: {
imageArr() { imageArr() {
if (!this.menuInfo) return if (!this.menuInfo) return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment