zs
2025-05-06 55bf797dcc730b37bc691ebab2b51ff9db8ed245
HIAWms/web/src/components/Table/index.d.ts
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,108 @@
export interface ParamsItem {
  Sorting?: string
  SkipCount?: string | number
  MaxResultCount?: number
  [key: string]: any
}
export interface ColumnType {
  title?: string
  field?: string
  width?: string | number
  sortable?: boolean
  required?: boolean
  cellStyle?: CSSProperties
  [key: string]: any
}
export interface TablePropsItemType {
  cellStyle?: () => CSSProperties | any
  rowStyle?: () => any
  rowClassName?: string | Function
  headBorder?: boolean
  emptyText?: string
  selections?: string[]
  autoFirstClickRow?: boolean
  // å‚æ•°
  params?: ParamsItem
  // æ•°æ®æº
  dataSource: any[]
  // åˆ—
  columns: ColumnType[]
  // å½“前页大小
  pageSize?: number
  // æ€»æ•°
  total?: number
  // æ˜¯å¦éšè—åˆ†é¡µ
  isHidePagination?: boolean
  // æ˜¯å¦å¤šé€‰
  isChecked?: boolean | Function
  // æ˜¯å¦æ˜¾ç¤ºåºå·
  isSeq?: boolean
  // æ˜¯å¦æŽ’序
  isSort?: boolean
  // id..
  id?: string
  // æ˜¯å¦å‡ºçŽ°æ‹–æ‹½ï¼ŒåºŸå¼ƒ
  showDarg?: boolean | string
  // æ˜¯å¦æ‹–拽
  isDrag?: boolean | string
  // æ˜¯å¦ç¦ç”¨æ‹–拽 ï¼ˆç­›é€‰çš„æ—¶å€™ä¸€èˆ¬ç¦ç”¨æ‹–拽)
  disabledDrag?: boolean
  // æ˜¯å¦è‡ªåŠ¨é«˜åº¦
  height?: string
  maxHeight?: string
  // æ˜¯å¦å¼€å¯è™šæ‹Ÿæ»šåЍ
  isVScroll?: boolean
  // è¾¹æ¡†
  border?: string | any
  // è¯·æ±‚地址
  url?: string
  // æŽ’序地址模版
  sortUrlTpl?: string
  //显示底部
  isFooter?: boolean
  gt?: number
  // å³é”®èœå•
  contextMenu?: Array<{
    label: string
    fn: (item: any) => void
    [key: string]: any
  }>
  rowConfig?: any
  size?: SizeType | undefined
  // é˜»æ­¢å†’泡
  isStop?: boolean
  LanguageScopeKey?: string
  /**
   * é˜»æ­¢é»˜è®¤æ¿€æ´»check选项
   */
  cancelEmitCheck?: boolean
  /**
   * å–消行点击选中
   */
  cancelRowCheck?: boolean
  // [key: string]: any
  /**
   * æ˜¯å¦å•选
   */
  radio?: boolean
  /**
   * æ•°æ®è½¬æ¢
   * å½“请求数据完后,用来数据转换
   */
  dataTransformer?: (row: any) => any
}
export interface MenuOptionType {
  zIndex?: number
  minWidth?: number
  x?: number
  y?: number
}
export interface contextMenuItemType {
  show: boolean
  current: Record<string, any> | null
  options: any
}