Open jinglun2019 opened 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中运行结果正常(上面部分为非模态框中,下面部分在模态框中) 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中数据显示异常 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: 拒绝访问。 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
ie中能不能隐藏该组件,只滚动,我也遇到了这个问题
ie11环境中出现问题,firefox和chrome中正常
完整代码在https://gitee.com/corn2019/modal-scroll
在main.js中封装模态框
模态框组件中封装close函数
firefox中运行结果正常(上面部分为非模态框中,下面部分在模态框中) 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中数据显示异常 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: 拒绝访问。 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