Commit df2f01a4 authored by 李晓兵's avatar 李晓兵

修改返回物理键隐藏大图

parent d9a06ab2
...@@ -173,10 +173,14 @@ export default { ...@@ -173,10 +173,14 @@ export default {
mounted () { mounted () {
this.$el.setAttribute('vum-show-picture', '') this.$el.setAttribute('vum-show-picture', '')
if (window.history && window.history.pushState) {
window.addEventListener('popstate', this.hide, false);//false阻止默认事件
}
}, },
destroyed () { destroyed () {
document.body.removeChild(this.$el) document.body.removeChild(this.$el)
window.removeEventListener('popstate', this.hide, false);//false阻止默认事件
}, },
methods: { methods: {
......
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 to comment