bkui-vue 2.0.1-beta.28.table.1 → 2.0.1-beta.29

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.
@@ -149,6 +149,7 @@
149
149
  display: flex;
150
150
  align-items: center;
151
151
  justify-content: center;
152
+ height: 100%;
152
153
  }
153
154
 
154
155
  &.expand-cell {
@@ -308,20 +309,6 @@
308
309
  background-color: var(--background-color);
309
310
  height: var(--row-height);
310
311
 
311
- &.has-group {
312
- .is-head-group {
313
- border-bottom: 1px solid @table-border-color;
314
- }
315
-
316
- th {
317
- border-right: 1px solid @table-border-color;
318
-
319
- &.is-last-child {
320
- border-right: none;
321
- }
322
- }
323
- }
324
-
325
312
  .col-resize-drag {
326
313
  position: absolute;
327
314
  top: 0;
@@ -420,9 +407,6 @@
420
407
  &.bordered-col {
421
408
  .@{bk-prefix}-table-head {
422
409
  border-right: 1px solid @table-border-color;
423
- .is-head-group {
424
- border-bottom: 1px solid @table-border-color;
425
- }
426
410
  }
427
411
  th {
428
412
  border-right: 1px solid @table-border-color;
@@ -1748,6 +1748,7 @@
1748
1748
  display: flex;
1749
1749
  align-items: center;
1750
1750
  justify-content: center;
1751
+ height: 100%;
1751
1752
  }
1752
1753
  .bk-table .bk-table-head table th .cell.expand-cell,
1753
1754
  .bk-table .bk-table-body table th .cell.expand-cell,
@@ -1894,15 +1895,6 @@
1894
1895
  background-color: var(--background-color);
1895
1896
  height: var(--row-height);
1896
1897
  }
1897
- .bk-table .bk-table-head.has-group .is-head-group {
1898
- border-bottom: 1px solid var(--table-border-color);
1899
- }
1900
- .bk-table .bk-table-head.has-group th {
1901
- border-right: 1px solid var(--table-border-color);
1902
- }
1903
- .bk-table .bk-table-head.has-group th.is-last-child {
1904
- border-right: none;
1905
- }
1906
1898
  .bk-table .bk-table-head .col-resize-drag {
1907
1899
  position: absolute;
1908
1900
  top: 0;
@@ -1975,9 +1967,6 @@
1975
1967
  .bk-table.bordered-col .bk-table-head {
1976
1968
  border-right: 1px solid var(--table-border-color);
1977
1969
  }
1978
- .bk-table.bordered-col .bk-table-head .is-head-group {
1979
- border-bottom: 1px solid var(--table-border-color);
1980
- }
1981
1970
  .bk-table.bordered-col th {
1982
1971
  border-right: 1px solid var(--table-border-color);
1983
1972
  }
@@ -6,7 +6,7 @@ import { Column, GroupColumn, ISortPropShape, TablePropTypes } from './props';
6
6
  * @param args 如果是函数,传递参数
7
7
  * @returns
8
8
  */
9
- export declare const resolvePropVal: (prop: Record<string, unknown>, key: string | string[], args: unknown[]) => any;
9
+ export declare const resolvePropVal: (prop: any, key: string | string[], args: any[]) => any;
10
10
  /**
11
11
  * 处理Props中的ActiveColumn,解析为统一的数组格式
12
12
  * @param props
@@ -159,4 +159,4 @@ export declare const getRawData: (data: any) => any;
159
159
  * @param parentVal
160
160
  * @returns
161
161
  */
162
- export declare const getNumberOrPercentValue: (val: number | string, parentVal?: number) => number;
162
+ export declare const getNumberOrPercentValue: (val: string | number, parentVal?: number) => number;
@@ -39,7 +39,9 @@ declare const BkTree: {
39
39
  default: any;
40
40
  };
41
41
  async: import("vue-types").VueTypeShape<{
42
- callback: (item: any, cb: any) => Promise<any>;
42
+ callback: (item: any, cb: any) => Promise<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
43
+ [key: string]: any;
44
+ }>>;
43
45
  cache: boolean;
44
46
  deepAutoOpen?: string;
45
47
  }>;
@@ -183,7 +185,9 @@ declare const BkTree: {
183
185
  default: any;
184
186
  };
185
187
  async: import("vue-types").VueTypeShape<{
186
- callback: (item: any, cb: any) => Promise<any>;
188
+ callback: (item: any, cb: any) => Promise<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
189
+ [key: string]: any;
190
+ }>>;
187
191
  cache: boolean;
188
192
  deepAutoOpen?: string;
189
193
  }>;
@@ -353,7 +357,9 @@ declare const BkTree: {
353
357
  default: any;
354
358
  };
355
359
  async: import("vue-types").VueTypeShape<{
356
- callback: (item: any, cb: any) => Promise<any>;
360
+ callback: (item: any, cb: any) => Promise<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
361
+ [key: string]: any;
362
+ }>>;
357
363
  cache: boolean;
358
364
  deepAutoOpen?: string;
359
365
  }>;
@@ -520,7 +526,9 @@ declare const BkTree: {
520
526
  default: any;
521
527
  };
522
528
  async: import("vue-types").VueTypeShape<{
523
- callback: (item: any, cb: any) => Promise<any>;
529
+ callback: (item: any, cb: any) => Promise<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
530
+ [key: string]: any;
531
+ }>>;
524
532
  cache: boolean;
525
533
  deepAutoOpen?: string;
526
534
  }>;
package/lib/tree/index.js CHANGED
@@ -17367,7 +17367,7 @@ function _slicedToArray(arr, i) {
17367
17367
  ;// CONCATENATED MODULE: external "vue"
17368
17368
  var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
17369
17369
  var external_vue_y = x => () => x
17370
- const external_vue_namespaceObject = external_vue_x({ ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["onUnmounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onUnmounted, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["toRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRef, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
17370
+ const external_vue_namespaceObject = external_vue_x({ ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["onUnmounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onUnmounted, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["toRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRef, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
17371
17371
  ;// CONCATENATED MODULE: external "../config-provider"
17372
17372
  var config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
17373
17373
  var config_provider_y = x => () => x
@@ -18606,7 +18606,7 @@ var use_node_action_this = undefined;
18606
18606
  return val;
18607
18607
  }
18608
18608
  if (_typeof(val) === 'object' && val !== null) {
18609
- if (val.__v_isVNode) {
18609
+ if ((0,external_vue_namespaceObject.isVNode)(val)) {
18610
18610
  return val;
18611
18611
  }
18612
18612
  var node = val.node,
@@ -18689,7 +18689,7 @@ var use_node_action_this = undefined;
18689
18689
  });
18690
18690
  setNodeAttr(parent, NODE_ATTRIBUTES.IS_CHECKED, isNeedChecked);
18691
18691
  setNodeAttr(parent, NODE_ATTRIBUTES.IS_INDETERMINATE, (getChildNodes(parent) || []).some(function (node) {
18692
- return !isNodeChecked(node);
18692
+ return !isNodeChecked(node) || isIndeterminate(node);
18693
18693
  }));
18694
18694
  if (!isRootNode(parent)) {
18695
18695
  updateParentChecked(parent, isChecked);
@@ -1,4 +1,4 @@
1
- import { ExtractPropTypes } from 'vue';
1
+ import { ExtractPropTypes, VNode } from 'vue';
2
2
  declare enum TreeSearchMatchEnum {
3
3
  FULL = "full",
4
4
  FUZZY = "fuzzy"
@@ -7,6 +7,10 @@ declare enum TreeSearchResultEnum {
7
7
  LIST = "list",
8
8
  TREE = "tree"
9
9
  }
10
+ export type TreeNode = {
11
+ [key: string]: unknown;
12
+ children: TreeNode[];
13
+ };
10
14
  /**
11
15
  * Tree Prop: prefixIcon function
12
16
  * @param {} isRoot 是否为分跟节点
@@ -15,7 +19,7 @@ declare enum TreeSearchResultEnum {
15
19
  * @param {} renderType 当前渲染类型(action: 用来标识当前节点状态,展开 | 收起, node_type:节点类型,文件、文件夹)
16
20
  * @param {} item 当前节点数据
17
21
  */
18
- export type IPrefixIcon = (isRoot: boolean, hasChild: boolean, isOpen: boolean, renderType: string, item: any) => any;
22
+ export type IPrefixIcon = (isRoot: boolean, hasChild: boolean, isOpen: boolean, renderType: string, item: TreeNode) => VNode | string;
19
23
  export declare const treeProps: {
20
24
  /**
21
25
  * 渲染列表
@@ -230,17 +234,17 @@ export declare const treeProps: {
230
234
  };
231
235
  };
232
236
  type AsyncOption = {
233
- callback: (item: any, cb: any) => Promise<any>;
237
+ callback: (item: any, cb: any) => Promise<VNode | string>;
234
238
  cache: boolean;
235
239
  deepAutoOpen?: string;
236
240
  };
237
241
  export type IIntersectionObserver = {
238
242
  enabled: boolean;
239
- callback: (node: any, level: number, index: number) => void;
243
+ callback: (node: TreeNode, level: number, index: number) => void;
240
244
  };
241
245
  export type SearchOption = {
242
246
  value: boolean | number | string;
243
- match?: `${TreeSearchMatchEnum}` | Function;
247
+ match?: ((...args: any[]) => boolean) | `${TreeSearchMatchEnum}`;
244
248
  resultType?: `${TreeSearchResultEnum}`;
245
249
  showChildNodes?: boolean;
246
250
  };
@@ -44,7 +44,9 @@ declare const _default: import("vue").DefineComponent<{
44
44
  default: any;
45
45
  };
46
46
  async: import("vue-types").VueTypeShape<{
47
- callback: (item: any, cb: any) => Promise<any>;
47
+ callback: (item: any, cb: any) => Promise<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
48
+ [key: string]: any;
49
+ }>>;
48
50
  cache: boolean;
49
51
  deepAutoOpen?: string;
50
52
  }>;
@@ -178,7 +180,9 @@ declare const _default: import("vue").DefineComponent<{
178
180
  default: any;
179
181
  };
180
182
  async: import("vue-types").VueTypeShape<{
181
- callback: (item: any, cb: any) => Promise<any>;
183
+ callback: (item: any, cb: any) => Promise<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
184
+ [key: string]: any;
185
+ }>>;
182
186
  cache: boolean;
183
187
  deepAutoOpen?: string;
184
188
  }>;
@@ -1,14 +1,14 @@
1
- import { TreePropTypes } from './props';
1
+ import { TreeNode, TreePropTypes } from './props';
2
2
  import { IFlatData } from './util';
3
3
  declare const _default: (props: TreePropTypes, ctx: any, flatData: IFlatData, _renderData: any, initOption: any) => {
4
- renderTreeNode: (item: any, showTree?: boolean) => JSX.Element;
5
- handleTreeNodeClick: (item: any, e: MouseEvent) => void;
4
+ renderTreeNode: (item: TreeNode, showTree?: boolean) => JSX.Element;
5
+ handleTreeNodeClick: (item: TreeNode, e: MouseEvent) => void;
6
6
  deepAutoOpen: () => void;
7
7
  asyncNodeClick: (item: any) => Promise<any>;
8
- setNodeAction: (args: any | any[], action: string, value: any) => void;
9
- setNodeOpened: (item: any, isOpen?: any, e?: MouseEvent, fireEmit?: boolean) => void;
10
- setSelect: (nodes: any, selected?: boolean, autoOpen?: boolean) => void;
11
- setOpen: (item: any | any[], isOpen?: boolean, autoOpenParents?: boolean) => void;
12
- setNodeAttribute: (node: any, attrName: string | string[], value: (boolean | number | string)[] | boolean | number | string, loopParent?: boolean) => void;
8
+ setNodeAction: (args: TreeNode | TreeNode[], action: string, value: unknown) => void;
9
+ setNodeOpened: (item: TreeNode, isOpen?: any, e?: MouseEvent, fireEmit?: boolean) => void;
10
+ setSelect: (nodes: TreeNode | TreeNode[], selected?: boolean, autoOpen?: boolean) => void;
11
+ setOpen: (item: TreeNode, isOpen?: boolean, autoOpenParents?: boolean) => void;
12
+ setNodeAttribute: (node: TreeNode, attrName: string | string[], value: (boolean | number | string)[] | boolean | number | string, loopParent?: boolean) => void;
13
13
  };
14
14
  export default _default;
@@ -1,45 +1,53 @@
1
- import { TreePropTypes } from './props';
1
+ import { TreeNode, TreePropTypes } from './props';
2
2
  declare const _default: (flatData: {
3
- data: any[];
4
- schema: WeakMap<Object, any>;
3
+ data: TreeNode[];
4
+ schema: WeakMap<TreeNode, unknown>;
5
5
  }, props?: TreePropTypes) => {
6
- getSchemaVal: (node: any) => any;
7
- getNodeAttr: (node: any, attr: string) => any;
8
- getNodeId: (node: any) => any;
9
- getNodeById: (id: any) => any;
10
- getNodeParentId: (node: any) => any;
11
- getParentNodeData: (node: any) => any;
6
+ getSchemaVal: (node: TreeNode) => unknown;
7
+ getNodeAttr: (node: TreeNode, attr: string) => any;
8
+ getNodeId: (node: TreeNode) => any;
9
+ getNodeById: (id: string | unknown) => TreeNode;
10
+ getNodeParentId: (node: TreeNode) => any;
11
+ getParentNodeData: (node: TreeNode | string) => any;
12
12
  getNodePathById: (id: string) => any;
13
13
  getNodeAttrById: (id: string, attr: string) => any;
14
14
  getNodeParentIdById: (id: string) => any;
15
- getParentNodeAttr: (node: any, attrName: string) => any;
16
- getParentNode: (node: any) => any;
17
- setNodeAttr: (node: any, attr: string, val: any, id?: any) => void;
18
- setNodeAttrById: (id: any, attr: string, val: any) => void;
19
- getNodePath: (node: any) => any;
20
- isRootNode: (node: any | string) => any;
21
- isNodeOpened: (node: any) => any;
22
- hasChildNode: (node: any) => any;
23
- isItemOpen: (item: any) => any;
24
- isNodeChecked: (node: any) => any;
25
- isNodeMatched: (node: any) => any;
26
- isNodeLoading: (node: any) => any;
27
- checkNodeIsOpen: (node: any) => any;
28
- getSourceNodeByPath: (path: string, uid?: string) => any;
29
- getSourceNodeByUID: (uid: string) => any;
30
- isMatchedNode: (node: any) => any;
31
- resolveScopedSlotParam: (item: any) => {
15
+ getParentNodeAttr: (node: TreeNode, attrName: string) => any;
16
+ getParentNode: (node: TreeNode) => any;
17
+ setNodeAttr: (node: TreeNode, attr: string, val: unknown, id?: any) => void;
18
+ setNodeAttrById: (id: unknown, attr: string, val: unknown) => void;
19
+ getNodePath: (node: TreeNode) => any;
20
+ isRootNode: (node: TreeNode | string) => any;
21
+ isNodeOpened: (node: TreeNode) => any;
22
+ hasChildNode: (node: TreeNode) => any;
23
+ isItemOpen: (item: TreeNode) => any;
24
+ isNodeChecked: (node: TreeNode) => any;
25
+ isNodeMatched: (node: TreeNode) => any;
26
+ isNodeLoading: (node: TreeNode) => any;
27
+ checkNodeIsOpen: (node: TreeNode) => any;
28
+ getSourceNodeByPath: (path: string, uid?: string) => any[];
29
+ getSourceNodeByUID: (uid: string) => TreeNode;
30
+ isMatchedNode: (node: TreeNode) => any;
31
+ resolveScopedSlotParam: (item: TreeNode) => {
32
32
  [x: string]: any;
33
33
  fullPath: any;
34
34
  uuid: any;
35
35
  parent: any;
36
36
  parentId: any;
37
37
  };
38
- setTreeNodeLoading: (node: any, value: boolean) => void;
39
- extendNodeAttr: (item: any) => any;
40
- getChildNodes: (node: any) => any;
41
- extendNodeScopedData: (item: any) => {
42
- data: any;
38
+ setTreeNodeLoading: (node: TreeNode, value: boolean) => void;
39
+ extendNodeAttr: (item: TreeNode) => TreeNode & {
40
+ __attr__: {
41
+ [x: string]: any;
42
+ fullPath: any;
43
+ uuid: any;
44
+ parent: any;
45
+ parentId: any;
46
+ };
47
+ };
48
+ getChildNodes: (node: TreeNode) => TreeNode[];
49
+ extendNodeScopedData: (item: TreeNode) => {
50
+ data: TreeNode;
43
51
  attributes: {
44
52
  [x: string]: any;
45
53
  fullPath: any;
@@ -48,12 +56,12 @@ declare const _default: (flatData: {
48
56
  parentId: any;
49
57
  };
50
58
  };
51
- getIntersectionResponse: (target: HTMLElement | Record<string, any>) => {
59
+ getIntersectionResponse: (target: HTMLElement | TreeNode) => {
52
60
  level: any;
53
- target: HTMLElement | Record<string, any>;
61
+ target: HTMLElement | TreeNode;
54
62
  index: any;
55
63
  parent: any;
56
- node: HTMLElement | Record<string, any>;
64
+ node: HTMLElement | TreeNode;
57
65
  isRoot: any;
58
66
  };
59
67
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkui-vue",
3
- "version": "2.0.1-beta.28.table.1",
3
+ "version": "2.0.1-beta.29",
4
4
  "workspaces": [
5
5
  "packages/**",
6
6
  "scripts/cli",