123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201 |
- import type { TagProps, ButtonType, ElForm } from 'element-plus'
- import Table from '/@/components/table/index.vue'
- declare global {
-
- interface BaTable {
- ref?: typeof Table
- pk?: string
- data?: TableRow[]
- remark?: string | null
- loading?: boolean
- expandAll?: boolean
- selection?: TableRow[]
- dblClickNotEditColumn?: (string | undefined)[]
- column: TableColumn[]
- total?: number
- filter?: anyObj
- defaultOrder?: { prop: string; order: string }
- dragSortLimitField?: string
- acceptQuery?: boolean
- extend?: anyObj
- actionStruct?:actionStruct,
- tableName?:string,
- rowStyle?:string,
- headerRowStyle?:string
- }
-
- interface BaTableForm {
- ref?: InstanceType<typeof ElForm> | undefined
- labelWidth?: number
- operate?: string
- operateIds?: string[]
- items?: anyObj
- submitLoading?: boolean
- defaultItems?: anyObj
- loading?: boolean
- extend?: anyObj
- }
-
- interface BaTableBefore {
- getIndex?: Function
- postDel?: Function
- requestEdit?: Function
- onTableDblclick?: Function
- toggleForm?: Function
- onSubmit?: Function
- onTableAction?: Function
- onTableHeaderAction?: Function
- mount?: Function
- [key: string]: Function | undefined
- }
-
- interface BaTableAfter {
- getIndex?: Function
- postDel?: Function
- requestEdit?: Function
- onTableDblclick?: Function
- toggleForm?: Function
- onSubmit?: Function
- onTableAction?: Function
- onTableHeaderAction?: Function
- mount?: Function
- [key: string]: Function | undefined
- }
- interface ComSearch {
- form: anyObj
- fieldData: Map<string, any>
- }
-
- interface TableColumn extends ElTableColumn {
-
- show?: boolean
-
- render?: string
-
- buttons?: OptButton[]
-
- effect?: TagProps['effect']
-
- size?: TagProps['size']
-
- custom?: any
-
- target?: aTarget
-
- click?: Function
-
- timeFormat?: 'yyyy-mm-dd hh:MM:ss'
-
- default?: any
-
- replaceValue?: any
-
- renderFormatter?: Function
-
- operator?: boolean | OperatorStr
-
- operatorPlaceholder?: string
- }
-
- interface OptButton {
-
- render: string
- name: string
- title?: string
- text?: string
- class?: string
- type: ButtonType
- icon: string
- popconfirm?: any
- disabledTip?: boolean
- }
-
- interface TableRow extends anyObj {
- children?: TableRow[]
- }
-
- type HeaderOptButton = 'refresh' | 'add' | 'edit' | 'delete' | 'unfold' | 'recycle bin' | 'comSearch'
-
- type OperatorStr =
- | '='
- | '<>'
- | '>'
- | '>='
- | '<'
- | '<='
- | 'LIKE'
- | 'NOT LIKE'
- | 'IN'
- | 'NOT IN'
- | 'RANGE'
- | 'NOT RANGE'
- | 'NULL'
- | 'NOT NULL'
- | 'FIND_IN_SET'
-
- type aTarget = '_blank' | '_self'
-
- interface comSearchData {
- field: string
- val: string
- operator: string
- render: string
- }
- interface ElTreeData {
- label: string
- children?: ElTreeData[]
- }
- interface actionStruct{
- name:string
- data:any
- }
- }
- interface ElTableColumn {
- type?: 'selection' | 'index' | 'expand'
- index?: number | Function
- label?: string
- 'column-key'?: string
- prop?: string
- width?: string | number
- 'min-width'?: string | number
- fixed?: string | boolean
- 'render-header'?: Function
- sortable?: string | boolean
- 'sort-method'?: Function
- 'sort-by'?: Function
- 'sort-orders'?: string[] | null[]
- resizable?: boolean
- formatter?: Function
- 'show-overflow-tooltip'?: boolean
- align?: 'left' | 'center' | 'right'
- 'header-align'?: 'left' | 'center' | 'right'
- 'class-name'?: string
- 'label-class-name'?: string
- selectable?: Function
- 'reserve-selection'?: boolean
- filters?: { key: string; value: string }[]
- 'filter-placement'?: string
- 'filter-multiple'?: boolean
- 'filter-method'?: Function
- 'filtered-value'?: any[]
- }
|