mirror of
https://github.com/jekip/naive-ui-admin.git
synced 2026-03-01 00:23:11 +08:00
更新0.1.1版本
This commit is contained in:
27
types/tableColumn.d.ts
vendored
Normal file
27
types/tableColumn.d.ts
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
import { ColumnProps, TableProps } from 'ant-design-vue/lib/table/interface'
|
||||
|
||||
declare global {
|
||||
interface ActionOptions {
|
||||
type: 'select' | 'button' | 'text' | 'popconfirm' // 控制类型,默认为a,可选: select | button | text
|
||||
text: string
|
||||
permission?: {
|
||||
// 权限
|
||||
action?: 'create' | 'delete' | 'update' | 'retrieve' // CRUD权限:创建(Create)、更新(Update)、读取(Retrieve)和删除(Delete)操作
|
||||
effect?: 'disabled'
|
||||
}
|
||||
props?: any // 组件属性,v-bind="props"
|
||||
func?: ({ text, record, index }, callback: (...rest) => any) => any // 动作事件触发回调
|
||||
}
|
||||
|
||||
interface TableColumn extends ColumnProps {
|
||||
title: string
|
||||
dataIndex: string
|
||||
width?: number
|
||||
slots?: {
|
||||
customRender: string
|
||||
}
|
||||
slotsType?: 'format' | 'link' | 'component'
|
||||
slotsFunc?: (...rest) => any
|
||||
actions?: ActionOptions[]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user