提交 d629b29f 编写于 作者: Q qiang

fix: merge network request for image

上级 946378ec
......@@ -4,11 +4,6 @@
ref="content"
:style="style"
/>
<img
v-if="contentPath"
:src="contentPath"
:draggable="draggable"
>
<v-uni-resize-sensor
v-if="mode === 'widthFix' || mode === 'heightFix'"
ref="sensor"
......@@ -128,6 +123,12 @@ export default {
if (newValue === 'widthFix' || newValue === 'heightFix') {
this._fixSize()
}
},
contentPath (val) {
if (!val && this.__img) {
this.__img.remove()
delete this.__img
}
}
},
mounted () {
......@@ -177,6 +178,12 @@ export default {
this._fixSize()
this.contentPath = realImagePath
img.draggable = this.draggable
if (this.__img) {
this.__img.remove()
}
this.__img = img
this.$el.appendChild(img)
this.$trigger('load', $event, {
width: img.width,
......@@ -224,12 +231,12 @@ uni-image[hidden] {
display: none;
}
uni-image > div {
uni-image>div {
width: 100%;
height: 100%;
}
uni-image > img {
uni-image>img {
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
......@@ -242,7 +249,7 @@ uni-image > img {
opacity: 0;
}
uni-image > .uni-image-will-change {
uni-image>.uni-image-will-change {
will-change: transform;
}
</style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册