'兼容IE10下不进入quill组件'
parent
69484a9da6
commit
34a4fd4b4f
|
@ -128,6 +128,8 @@ vue.js封装sChart.js的图表组件。访问地址:[vue-schart](https://githu
|
||||||
### Vue-Quill-Editor ###
|
### Vue-Quill-Editor ###
|
||||||
基于Quill、适用于Vue2的富文本编辑器。访问地址:[vue-quill-editor](https://github.com/surmon-china/vue-quill-editor)
|
基于Quill、适用于Vue2的富文本编辑器。访问地址:[vue-quill-editor](https://github.com/surmon-china/vue-quill-editor)
|
||||||
|
|
||||||
|
(IE10及以下不支持)
|
||||||
|
|
||||||
### mavonEditor ###
|
### mavonEditor ###
|
||||||
基于Vue的markdown编辑器。访问地址:[mavonEditor](https://github.com/hinesboy/mavonEditor)
|
基于Vue的markdown编辑器。访问地址:[mavonEditor](https://github.com/hinesboy/mavonEditor)
|
||||||
|
|
||||||
|
|
|
@ -16,11 +16,18 @@ router.beforeEach((to, from, next) => {
|
||||||
const role = localStorage.getItem('ms_username');
|
const role = localStorage.getItem('ms_username');
|
||||||
// 如果是管理员权限则可进入,这里只是简单的模拟管理员权限而已
|
// 如果是管理员权限则可进入,这里只是简单的模拟管理员权限而已
|
||||||
role === 'admin' ? next() : next('/login');
|
role === 'admin' ? next() : next('/login');
|
||||||
|
}else{
|
||||||
|
// 简单的判断IE10及以下不进入富文本编辑器,该组件不兼容
|
||||||
|
if(navigator.userAgent.indexOf('MSIE') && to.path === '/editor'){
|
||||||
|
Vue.prototype.$alert('vue-quill-editor组件不兼容IE10及以下浏览器,请使用更高版本的浏览器查看', '浏览器不兼容通知', {
|
||||||
|
confirmButtonText: '确定'
|
||||||
|
});
|
||||||
}else{
|
}else{
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
console.log(navigator.userAgent);
|
||||||
new Vue({
|
new Vue({
|
||||||
router,
|
router,
|
||||||
render: h => h(App)
|
render: h => h(App)
|
||||||
|
|
Loading…
Reference in New Issue