refactor(仪表板): 修复部分图片不显示问题

This commit is contained in:
wangjiahao 2023-11-01 18:27:24 +08:00
parent d38c872060
commit c4265f4622

View File

@ -3,7 +3,7 @@
<img <img
v-if="!showLink" v-if="!showLink"
:style="imageAdapter" :style="imageAdapter"
:src="imgUrl" :src="element.propValue"
> >
<a <a
v-if="showLink" v-if="showLink"
@ -13,15 +13,13 @@
> >
<img <img
:style="imageAdapter" :style="imageAdapter"
:src="imgUrl" :src="element.propValue"
> >
</a> </a>
</div> </div>
</template> </template>
<script> <script>
import { imgUrlTrans } from '@/components/canvas/utils/utils'
export default { export default {
props: { props: {
element: { element: {
@ -35,9 +33,6 @@ export default {
} }
}, },
computed: { computed: {
imgUrl() {
return imgUrlTrans(this.element.propValue)
},
showLink() { showLink() {
return this.editMode === 'preview' && this.element && this.element.hyperlinks && this.element.hyperlinks.enable return this.editMode === 'preview' && this.element && this.element.hyperlinks && this.element.hyperlinks.enable
}, },