refactor(仪表板): 优化预览模块自定义组件Picture的图片src
This commit is contained in:
parent
54488bd163
commit
5f5c5c339a
@ -3,7 +3,7 @@
|
||||
<img
|
||||
v-if="!showLink"
|
||||
:style="imageAdapter"
|
||||
:src="element.propValue"
|
||||
:src="imgUrl"
|
||||
>
|
||||
<a
|
||||
v-if="showLink"
|
||||
@ -13,13 +13,15 @@
|
||||
>
|
||||
<img
|
||||
:style="imageAdapter"
|
||||
:src="element.propValue"
|
||||
:src="imgUrl"
|
||||
>
|
||||
</a>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { imgUrlTrans } from '@/components/canvas/utils/utils'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
element: {
|
||||
@ -33,6 +35,9 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
imgUrl() {
|
||||
return imgUrlTrans(this.element.propValue)
|
||||
},
|
||||
showLink() {
|
||||
return this.editMode === 'preview' && this.element && this.element.hyperlinks && this.element.hyperlinks.enable
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user