'兼容IE10下不进入quill组件'

pull/78/head
lin-xin 2018-04-13 09:33:23 +08:00
parent 69484a9da6
commit 34a4fd4b4f
2 changed files with 11 additions and 2 deletions

View File

@ -128,6 +128,8 @@ vue.js封装sChart.js的图表组件。访问地址[vue-schart](https://githu
### Vue-Quill-Editor ###
基于Quill、适用于Vue2的富文本编辑器。访问地址[vue-quill-editor](https://github.com/surmon-china/vue-quill-editor)
IE10及以下不支持
### mavonEditor ###
基于Vue的markdown编辑器。访问地址[mavonEditor](https://github.com/hinesboy/mavonEditor)

View File

@ -17,10 +17,17 @@ router.beforeEach((to, from, next) => {
// 如果是管理员权限则可进入,这里只是简单的模拟管理员权限而已
role === 'admin' ? next() : next('/login');
}else{
next();
// 简单的判断IE10及以下不进入富文本编辑器该组件不兼容
if(navigator.userAgent.indexOf('MSIE') && to.path === '/editor'){
Vue.prototype.$alert('vue-quill-editor组件不兼容IE10及以下浏览器请使用更高版本的浏览器查看', '浏览器不兼容通知', {
confirmButtonText: '确定'
});
}else{
next();
}
}
})
console.log(navigator.userAgent);
new Vue({
router,
render: h => h(App)