vue2-client 1.20.1 → 1.20.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -114,11 +114,6 @@ export default {
|
|
|
114
114
|
imageName: {
|
|
115
115
|
type: String,
|
|
116
116
|
default: 'preview_image'
|
|
117
|
-
},
|
|
118
|
-
// 是否挂载到 body,避免在 Drawer 等有 transform 的容器内出现闪烁(FileImageGroup 不启用以保留缩略图导航)
|
|
119
|
-
appendToBody: {
|
|
120
|
-
type: Boolean,
|
|
121
|
-
default: false
|
|
122
117
|
}
|
|
123
118
|
},
|
|
124
119
|
data() {
|
|
@@ -193,7 +188,7 @@ export default {
|
|
|
193
188
|
this.appendToBodyIfNeeded()
|
|
194
189
|
},
|
|
195
190
|
beforeDestroy() {
|
|
196
|
-
if (this
|
|
191
|
+
if (this.$el && this.$el.parentNode === document.body) {
|
|
197
192
|
document.body.removeChild(this.$el)
|
|
198
193
|
}
|
|
199
194
|
document.removeEventListener('keydown', this.handleGlobalKeydown)
|
|
@@ -398,9 +393,9 @@ export default {
|
|
|
398
393
|
this.$emit('close')
|
|
399
394
|
},
|
|
400
395
|
|
|
401
|
-
//
|
|
396
|
+
// 统一挂载到 body,避免在 Drawer 等有 transform/overflow 的容器内出现层级和闪烁问题
|
|
402
397
|
appendToBodyIfNeeded() {
|
|
403
|
-
if (this.
|
|
398
|
+
if (this.visible && this.$el && this.$el.parentNode !== document.body) {
|
|
404
399
|
document.body.appendChild(this.$el)
|
|
405
400
|
}
|
|
406
401
|
}
|