feat: 添加控制台
This commit is contained in:
parent
341c3e1886
commit
534c08d6eb
@ -38,6 +38,10 @@ import 'quill/dist/quill.core.css'
|
|||||||
import 'quill/dist/quill.snow.css'
|
import 'quill/dist/quill.snow.css'
|
||||||
|
|
||||||
import 'quill/dist/quill.bubble.css'
|
import 'quill/dist/quill.bubble.css'
|
||||||
|
import VConsole from 'vconsole';
|
||||||
|
if (process.env.NODE_ENV == 'development'){
|
||||||
|
new VConsole();
|
||||||
|
}
|
||||||
const hls = require('videojs-contrib-hls')
|
const hls = require('videojs-contrib-hls')
|
||||||
Vue.use(hls)
|
Vue.use(hls)
|
||||||
Vue.use(VueQuillEditor) // 注册富文本编辑器
|
Vue.use(VueQuillEditor) // 注册富文本编辑器
|
||||||
@ -282,25 +286,24 @@ Vue.directive('permission', {
|
|||||||
inserted: (el, binding)=>{
|
inserted: (el, binding)=>{
|
||||||
const { value } = binding;
|
const { value } = binding;
|
||||||
// 判断当前用户是否拥有该按钮权限
|
// 判断当前用户是否拥有该按钮权限
|
||||||
if (!checkPermission(value)) {
|
if (!Vue.prototype.checkPermission(value)) {
|
||||||
el.parentNode.removeChild(el);
|
el.parentNode.removeChild(el);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 判断权限的函数
|
// 判断权限的函数
|
||||||
function checkPermission(permission) {
|
Vue.prototype.checkPermission = function(permission) {
|
||||||
var permissions = store.state.userInfo.menuAuthority.menuList;
|
var permissions = store.state.userInfo.menuAuthority.menuList;
|
||||||
permissions = permissions.filter(
|
permissions = permissions.filter(
|
||||||
(x) => x.path == permission.menuPath
|
(x) => x.path == permission.menuPath
|
||||||
)[0];
|
)[0];
|
||||||
console.log(permissions,'ddddd')
|
|
||||||
if(!permissions.actionList){
|
if(!permissions.actionList){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
let index = permissions.actionList.findIndex(
|
let index = permissions.actionList.findIndex(
|
||||||
(x) => x.actionCode == permission.key
|
(x) => x.actionCode == permission.key
|
||||||
)
|
)
|
||||||
console.log(index,'666777')
|
|
||||||
return index != -1?true:false;
|
return index != -1?true:false;
|
||||||
}
|
}
|
||||||
// 加载缩略图
|
// 加载缩略图
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user