mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-10 20:57:10 +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 {
|
export default {
|
||||||
install(Vue: App) {
|
install(Vue: App) {
|
||||||
Vue.directive('hasPerm', hasPerm)
|
Vue.directive('permission', hasPerm)
|
||||||
Vue.directive('hasRole', hasRole)
|
Vue.directive('role', hasRole)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -2,8 +2,8 @@ import type { DirectiveBinding, Directive } from 'vue'
|
|||||||
import { useUserStore } from '@/stores'
|
import { useUserStore } from '@/stores'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @desc v-hasPerm 操作权限处理
|
* @desc v-permission 操作权限处理
|
||||||
* @desc 使用 v-hasPerm="['home:btn:add']"
|
* @desc 使用 v-permission="['system:user:add']"
|
||||||
*/
|
*/
|
||||||
function checkPermission(el: HTMLElement, binding: DirectiveBinding) {
|
function checkPermission(el: HTMLElement, binding: DirectiveBinding) {
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
Reference in New Issue
Block a user