@keyblade/pro-components 1.13.8-alpha.32 → 1.13.8-alpha.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,14 +2,14 @@ var A = Object.defineProperty, I = Object.defineProperties;
2
2
  var L = Object.getOwnPropertyDescriptors;
3
3
  var B = Object.getOwnPropertySymbols;
4
4
  var j = Object.prototype.hasOwnProperty, H = Object.prototype.propertyIsEnumerable;
5
- var x = (a, e, o) => e in a ? A(a, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : a[e] = o, _ = (a, e) => {
5
+ var v = (a, e, o) => e in a ? A(a, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : a[e] = o, x = (a, e) => {
6
6
  for (var o in e || (e = {}))
7
- j.call(e, o) && x(a, o, e[o]);
7
+ j.call(e, o) && v(a, o, e[o]);
8
8
  if (B)
9
9
  for (var o of B(e))
10
- H.call(e, o) && x(a, o, e[o]);
10
+ H.call(e, o) && v(a, o, e[o]);
11
11
  return a;
12
- }, v = (a, e) => I(a, L(e));
12
+ }, _ = (a, e) => I(a, L(e));
13
13
  var k = (a, e, o) => new Promise((u, p) => {
14
14
  var f = (s) => {
15
15
  try {
@@ -38,7 +38,7 @@ const oe = ["onClick"], r = "keyblade-pro-table", de = /* @__PURE__ */ P({
38
38
  scrollbar: { type: Boolean, default: !0 },
39
39
  data: { default: () => [] },
40
40
  loading: { type: [Boolean, Object], default: !1 },
41
- bordered: { type: [Boolean, Object], default: () => ({ cell: !1 }) },
41
+ bordered: { type: [Boolean, Object], default: void 0 },
42
42
  columns: { default: () => [] },
43
43
  hoverable: { type: Boolean, default: !0 },
44
44
  pagination: { type: [Boolean, Object], default: !0 },
@@ -77,8 +77,6 @@ const oe = ["onClick"], r = "keyblade-pro-table", de = /* @__PURE__ */ P({
77
77
  onPageChange: {},
78
78
  onPageSizeChange: {},
79
79
  onExpand: {},
80
- "onUpdate:selectedKeys": {},
81
- "onUpdate:expandedKeys": {},
82
80
  onExpandedChange: {},
83
81
  onSelectAll: {},
84
82
  onSelectionChange: {},
@@ -93,7 +91,9 @@ const oe = ["onClick"], r = "keyblade-pro-table", de = /* @__PURE__ */ P({
93
91
  onRowDblclick: {},
94
92
  onCellDblclick: {},
95
93
  onRowContextmenu: {},
96
- onCellContextmenu: {}
94
+ onCellContextmenu: {},
95
+ "onUpdate:selectedKeys": {},
96
+ "onUpdate:expandedKeys": {}
97
97
  },
98
98
  setup(a) {
99
99
  const e = a, o = D(), { copy: u } = Z(), p = F(), f = m(() => X([e, Y.table || {}]) || {}), y = m(() => {
@@ -101,7 +101,7 @@ const oe = ["onClick"], r = "keyblade-pro-table", de = /* @__PURE__ */ P({
101
101
  return typeof e.pagination != "boolean" && !((t = e.pagination) != null && t.total) && !((n = e.data) != null && n.length) && o["pagination-left"];
102
102
  }), d = m(() => {
103
103
  var t;
104
- return (t = e.columns) == null ? void 0 : t.map((n) => n.clipboard ? v(_({}, n), {
104
+ return (t = e.columns) == null ? void 0 : t.map((n) => n.clipboard ? _(x({}, n), {
105
105
  hover: n.hover === void 0 ? !0 : n.hover,
106
106
  slotName: `${r}-clipboard`
107
107
  }) : n);
@@ -10,73 +10,73 @@ export interface IProTableColumn extends TableColumnData {
10
10
  /**
11
11
  * table 组件属性接口
12
12
  */
13
- export interface IProTable {
13
+ export type IProTable = {
14
14
  /** 表格尺寸 */
15
- 'size'?: 'mini' | 'medium' | 'large' | 'small';
15
+ size?: 'mini' | 'medium' | 'large' | 'small';
16
16
  /** 滚动条配置 */
17
- 'scrollbar'?: boolean | any;
17
+ scrollbar?: boolean | any;
18
18
  /** 表格数据 */
19
- 'data'?: any[];
19
+ data?: any[];
20
20
  /** 加载状态 */
21
- 'loading'?: boolean | Record<string, any>;
21
+ loading?: boolean | Record<string, any>;
22
22
  /** 边框配置 */
23
- 'bordered'?: boolean | TableBorder;
23
+ bordered?: boolean | TableBorder;
24
24
  /** 表格列配置 */
25
- 'columns'?: Partial<IProTableColumn>[];
25
+ columns?: Partial<IProTableColumn>[];
26
26
  /** 是否开启悬停效果 */
27
- 'hoverable'?: boolean;
27
+ hoverable?: boolean;
28
28
  /** 分页配置 */
29
- 'pagination'?: boolean | PaginationProps;
29
+ pagination?: boolean | PaginationProps;
30
30
  /** 是否显示斑马纹 */
31
- 'stripe'?: boolean;
31
+ stripe?: boolean;
32
32
  /** 是否固定表格布局 */
33
- 'tableLayoutFixed'?: boolean;
33
+ tableLayoutFixed?: boolean;
34
34
  /** 分页位置 */
35
- 'pagePosition'?: 'top' | 'tl' | 'tr' | 'bottom' | 'bl' | 'br';
35
+ pagePosition?: 'top' | 'tl' | 'tr' | 'bottom' | 'bl' | 'br';
36
36
  /** 缩进大小 */
37
- 'indentSize'?: number;
37
+ indentSize?: number;
38
38
  /** 行键字段 */
39
- 'rowKey'?: string;
39
+ rowKey?: string;
40
40
  /** 是否显示表头 */
41
- 'showHeader'?: boolean;
41
+ showHeader?: boolean;
42
42
  /** 是否跨行跨列 */
43
- 'spanAll'?: boolean;
43
+ spanAll?: boolean;
44
44
  /** 筛选图标是否左对齐 */
45
- 'filterIconAlignLeft'?: boolean;
45
+ filterIconAlignLeft?: boolean;
46
46
  /** 空数据时是否隐藏展开按钮 */
47
- 'hideExpandButtonOnEmpty'?: boolean;
47
+ hideExpandButtonOnEmpty?: boolean;
48
48
  /** 列是否可调整大小 */
49
- 'columnResizable'?: boolean;
49
+ columnResizable?: boolean;
50
50
  /** 汇总行文本 */
51
- 'summaryText'?: string;
51
+ summaryText?: string;
52
52
  /** 是否默认展开所有行 */
53
- 'defaultExpandAllRows'?: boolean;
53
+ defaultExpandAllRows?: boolean;
54
54
  /** 固定表头配置 */
55
- 'stickyHeader'?: number | boolean;
55
+ stickyHeader?: number | boolean;
56
56
  /** 是否显示空树 */
57
- 'showEmptyTree'?: boolean;
57
+ showEmptyTree?: boolean;
58
58
  /** 滚动配置 */
59
- 'scroll'?: {
59
+ scroll?: {
60
60
  x?: string | number;
61
61
  y?: string | number;
62
62
  minWidth?: string | number;
63
63
  maxHeight?: string | number;
64
64
  };
65
65
  /** 汇总行配置 */
66
- 'summary'?: boolean | ((params: {
66
+ summary?: boolean | ((params: {
67
67
  columns: any[];
68
68
  data: any[];
69
69
  }) => any[]);
70
70
  /** 自定义组件 */
71
- 'components'?: any;
71
+ components?: any;
72
72
  /** 虚拟列表配置 */
73
- 'virtualListProps'?: any;
73
+ virtualListProps?: any;
74
74
  /** 行选择配置 */
75
- 'rowSelection'?: any;
75
+ rowSelection?: any;
76
76
  /** 行展开配置 */
77
- 'expandable'?: any;
77
+ expandable?: any;
78
78
  /** 单元格合并方法 */
79
- 'spanMethod'?: (data: {
79
+ spanMethod?: (data: {
80
80
  record: any;
81
81
  column: any;
82
82
  rowIndex: number;
@@ -86,15 +86,15 @@ export interface IProTable {
86
86
  colspan?: number;
87
87
  };
88
88
  /** 加载更多回调 */
89
- 'loadMore'?: (record: any, done: (children?: any[]) => void) => void;
89
+ loadMore?: (record: any, done: (children?: any[]) => void) => void;
90
90
  /** 行类名 */
91
- 'rowClass'?: string | any[] | Record<string, any> | ((record: any, rowIndex: number) => any);
91
+ rowClass?: string | any[] | Record<string, any> | ((record: any, rowIndex: number) => any);
92
92
  /** 拖拽配置 */
93
- 'draggable'?: any;
93
+ draggable?: any;
94
94
  /** 行号配置 */
95
- 'rowNumber'?: boolean | Record<string, any>;
95
+ rowNumber?: boolean | Record<string, any>;
96
96
  /** 汇总行单元格合并方法 */
97
- 'summarySpanMethod'?: (data: {
97
+ summarySpanMethod?: (data: {
98
98
  record: any;
99
99
  column: any;
100
100
  rowIndex: number;
@@ -104,56 +104,57 @@ export interface IProTable {
104
104
  colspan?: number;
105
105
  };
106
106
  /** 选中的行键 */
107
- 'selectedKeys'?: (string | number)[];
107
+ selectedKeys?: (string | number)[];
108
108
  /** 默认选中的行键 */
109
- 'defaultSelectedKeys'?: (string | number)[];
109
+ defaultSelectedKeys?: (string | number)[];
110
110
  /** 展开的行键 */
111
- 'expandedKeys'?: (string | number)[];
111
+ expandedKeys?: (string | number)[];
112
112
  /** 默认展开的行键 */
113
- 'defaultExpandedKeys'?: (string | number)[];
113
+ defaultExpandedKeys?: (string | number)[];
114
114
  /** 数据变化事件 */
115
- 'onChange'?: (data: any[], extra: any, currentData: any[]) => any;
115
+ onChange?: (data: any[], extra: any, currentData: any[]) => any;
116
116
  /** 行选择事件 */
117
- 'onSelect'?: (rowKeys: (string | number)[], rowKey: string | number, record: any) => any;
117
+ onSelect?: (rowKeys: (string | number)[], rowKey: string | number, record: any) => any;
118
118
  /** 页码变化事件 */
119
- 'onPageChange'?: (page: number) => any;
119
+ onPageChange?: (page: number) => any;
120
120
  /** 每页大小变化事件 */
121
- 'onPageSizeChange'?: (pageSize: number) => any;
121
+ onPageSizeChange?: (pageSize: number) => any;
122
122
  /** 行展开事件 */
123
- 'onExpand'?: (rowKey: string | number, record: any) => any;
124
- /** 选中行键更新事件 */
125
- 'onUpdate:selectedKeys'?: (rowKeys: (string | number)[]) => any;
126
- /** 展开行键更新事件 */
127
- 'onUpdate:expandedKeys'?: (rowKeys: (string | number)[]) => any;
123
+ onExpand?: (rowKey: string | number, record: any) => any;
128
124
  /** 展开状态变化事件 */
129
- 'onExpandedChange'?: (rowKeys: (string | number)[]) => any;
125
+ onExpandedChange?: (rowKeys: (string | number)[]) => any;
130
126
  /** 全选事件 */
131
- 'onSelectAll'?: (checked: boolean) => any;
127
+ onSelectAll?: (checked: boolean) => any;
132
128
  /** 选择变化事件 */
133
- 'onSelectionChange'?: (rowKeys: (string | number)[]) => any;
129
+ onSelectionChange?: (rowKeys: (string | number)[]) => any;
134
130
  /** 排序变化事件 */
135
- 'onSorterChange'?: (dataIndex: string, direction: string) => any;
131
+ onSorterChange?: (dataIndex: string, direction: string) => any;
136
132
  /** 筛选变化事件 */
137
- 'onFilterChange'?: (dataIndex: string, filteredValues: string[]) => any;
133
+ onFilterChange?: (dataIndex: string, filteredValues: string[]) => any;
138
134
  /** 单元格鼠标进入事件 */
139
- 'onCellMouseEnter'?: (record: any, column: any, ev: Event) => any;
135
+ onCellMouseEnter?: (record: any, column: any, ev: Event) => any;
140
136
  /** 单元格鼠标离开事件 */
141
- 'onCellMouseLeave'?: (record: any, column: any, ev: Event) => any;
137
+ onCellMouseLeave?: (record: any, column: any, ev: Event) => any;
142
138
  /** 单元格点击事件 */
143
- 'onCellClick'?: (record: any, column: any, ev: Event) => any;
139
+ onCellClick?: (record: any, column: any, ev: Event) => any;
144
140
  /** 行点击事件 */
145
- 'onRowClick'?: (record: any, ev: Event) => any;
141
+ onRowClick?: (record: any, ev: Event) => any;
146
142
  /** 表头点击事件 */
147
- 'onHeaderClick'?: (column: any, ev: Event) => any;
143
+ onHeaderClick?: (column: any, ev: Event) => any;
148
144
  /** 列调整大小事件 */
149
- 'onColumnResize'?: (dataIndex: string, width: number) => any;
145
+ onColumnResize?: (dataIndex: string, width: number) => any;
150
146
  /** 行双击事件 */
151
- 'onRowDblclick'?: (record: any, ev: Event) => any;
147
+ onRowDblclick?: (record: any, ev: Event) => any;
152
148
  /** 单元格双击事件 */
153
- 'onCellDblclick'?: (record: any, column: any, ev: Event) => any;
149
+ onCellDblclick?: (record: any, column: any, ev: Event) => any;
154
150
  /** 行右键菜单事件 */
155
- 'onRowContextmenu'?: (record: any, ev: Event) => any;
151
+ onRowContextmenu?: (record: any, ev: Event) => any;
156
152
  /** 单元格右键菜单事件 */
157
- 'onCellContextmenu'?: (record: any, column: any, ev: Event) => any;
158
- }
153
+ onCellContextmenu?: (record: any, column: any, ev: Event) => any;
154
+ } & {
155
+ /** 选中行键更新事件 */
156
+ 'onUpdate:selectedKeys'?: (rowKeys: (string | number)[]) => any;
157
+ /** 展开行键更新事件 */
158
+ 'onUpdate:expandedKeys'?: (rowKeys: (string | number)[]) => any;
159
+ };
159
160
  export type ProTableProps = Partial<IProTable>;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@keyblade/pro-components",
3
3
  "description": "KeyBlade Pro Components",
4
4
  "author": "yangshuai <704807396@qq.com>",
5
- "version": "1.13.8-alpha.32",
5
+ "version": "1.13.8-alpha.33",
6
6
  "private": false,
7
7
  "type": "module",
8
8
  "main": "es/index.js",