YvesCoding / vuescroll

A customizable scrollbar plugin based on vue.js for PC , mobile phone, touch screen, laptop.
https://nifty-shannon-7eab38.netlify.app/
MIT License
1.27k stars 111 forks source link

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

Open jinglun2019 opened 3 years ago

jinglun2019 commented 3 years ago

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 commented 1 year ago

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