mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-08 22:57:11 +08:00
refactor: 优化存储管理typescript提示
This commit is contained in:
5
src/components/GiTable/type.ts
Normal file
5
src/components/GiTable/type.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import type { TableColumnData } from '@arco-design/web-vue'
|
||||
|
||||
export interface TableInstanceColumns extends TableColumnData {
|
||||
show?: boolean
|
||||
}
|
@@ -4,7 +4,7 @@ import hasRole from './permission/hasRole'
|
||||
|
||||
export default {
|
||||
install(Vue: App) {
|
||||
Vue.directive('hasPerm', hasPerm)
|
||||
Vue.directive('hasRole', hasRole)
|
||||
Vue.directive('permission', hasPerm)
|
||||
Vue.directive('role', hasRole)
|
||||
}
|
||||
}
|
||||
|
@@ -2,8 +2,8 @@ import type { DirectiveBinding, Directive } from 'vue'
|
||||
import { useUserStore } from '@/stores'
|
||||
|
||||
/**
|
||||
* @desc v-hasPerm 操作权限处理
|
||||
* @desc 使用 v-hasPerm="['home:btn:add']"
|
||||
* @desc v-permission 操作权限处理
|
||||
* @desc 使用 v-permission="['system:user:add']"
|
||||
*/
|
||||
function checkPermission(el: HTMLElement, binding: DirectiveBinding) {
|
||||
const userStore = useUserStore()
|
||||
|
Reference in New Issue
Block a user