Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ie11中,模态框中滚动组件不能正常显示 #252

Open
jinglun2019 opened this issue May 12, 2021 · 1 comment
Open

ie11中,模态框中滚动组件不能正常显示 #252

jinglun2019 opened this issue May 12, 2021 · 1 comment

Comments

@jinglun2019
Copy link

jinglun2019 commented May 12, 2021

ie11环境中出现问题,firefox和chrome中正常

完整代码在https://gitee.com/corn2019/modal-scroll

在main.js中封装模态框

const openModal = (modal, options = {}) => {
  const ModalConstructor = Vue.extend({ ...modal })
  const ModalInstance = new ModalConstructor({ ...options })
  ModalInstance.$mount()
  document.body.appendChild(ModalInstance.$el)
}
Vue.prototype.$openModal = openModal

模态框组件中封装close函数

close() {
      this.$destroy()
      if (this.$el) document.body.removeChild(this.$el)
    },

firefox中运行结果正常(上面部分为非模态框中,下面部分在模态框中)
avatar
https://gitee.com/corn2019/modal-scroll/blob/master/%E8%BF%90%E8%A1%8C%E7%BB%93%E6%9E%9C%E5%9B%BE%E7%89%87/firefox%E6%AD%A3%E5%B8%B8.png


ie中数据显示异常
avatar
https://gitee.com/corn2019/modal-scroll/blob/master/%E8%BF%90%E8%A1%8C%E7%BB%93%E6%9E%9C%E5%9B%BE%E7%89%87/ie%E4%B8%AD%E6%A8%A1%E6%80%81%E6%A1%86%E9%87%8C%E6%95%B0%E6%8D%AE%E6%9C%AA%E6%AD%A3%E5%B8%B8%E6%98%BE%E7%A4%BA.png


ie中关闭模态框中报错
Error in beforeDestroy hook: "Error: 拒绝访问。
avatar
https://gitee.com/corn2019/modal-scroll/blob/master/%E8%BF%90%E8%A1%8C%E7%BB%93%E6%9E%9C%E5%9B%BE%E7%89%87/ie%E5%85%B3%E9%97%AD%E6%A8%A1%E6%80%81%E6%A1%86%E6%97%B6%E6%8A%A5%E9%94%99.png

@Rayangmoon
Copy link

ie中能不能隐藏该组件,只滚动,我也遇到了这个问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants