22
schangxiang@126.com
2025-04-29 3fdd40af6a7c4ca1b9c833fd7fbe17a9bcc9258f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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
}