bkui-vue 2.0.1-beta.30 → 2.0.1-beta.32

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.
@@ -1,10 +1,116 @@
1
1
  import { SetupContext } from 'vue';
2
- import { TablePropTypes } from '../props';
2
+ import { Column, TablePropTypes } from '../props';
3
3
  import { UseColumns } from './use-columns';
4
4
  declare const useSettings: (props: TablePropTypes, ctx: SetupContext, columns: UseColumns, afterSetting: any) => {
5
5
  options: {
6
6
  enabled: boolean;
7
- fields: any[];
7
+ fields: {
8
+ label?: import("../props").LabelFunctionString;
9
+ field: import("../props").LabelFunctionString & (string | number | true | ((_column: any, _index: any) => string | number | boolean | JSX.Element));
10
+ render?: import("../props").RenderFunctionString;
11
+ disabled?: boolean;
12
+ renderHead?: import("../props").RenderFunctionString;
13
+ width?: string | number;
14
+ minWidth?: string | number;
15
+ columnKey?: string;
16
+ showOverflowTooltip?: boolean | {
17
+ content: string | ((col: Column, row: Record<string, object>) => string);
18
+ disabled?: boolean | ((col: Column, row: Record<string, object>) => boolean);
19
+ allowHtml?: boolean;
20
+ watchCellResize?: boolean;
21
+ mode?: "auto" | "static";
22
+ popoverOption?: Record<string, object>;
23
+ resizerWay?: import("../props").ResizerWay;
24
+ showHead?: boolean;
25
+ };
26
+ type?: string;
27
+ fixed?: string | boolean;
28
+ resizable?: boolean;
29
+ sort?: string | boolean | {
30
+ sortFn?: (...args: any[]) => boolean;
31
+ sortScope?: import("../props").SortScope;
32
+ value?: import("../const").SORT_OPTION;
33
+ };
34
+ filter?: string | boolean | {
35
+ list: {
36
+ label: string;
37
+ value: string;
38
+ }[];
39
+ filterFn?: (...args: any[]) => boolean;
40
+ match?: import("../props").FullEnum;
41
+ checked?: string[];
42
+ filterScope?: import("../props").SortScope;
43
+ btnSave?: string | boolean;
44
+ btnReset?: string | boolean;
45
+ height?: number;
46
+ maxHeight?: number;
47
+ };
48
+ colspan?: import("../props").SpanFunctionString;
49
+ rowspan?: import("../props").SpanFunctionString;
50
+ textAlign?: string;
51
+ className?: import("../props").RowClassFunctionString;
52
+ align?: string;
53
+ prop?: import("../props").LabelFunctionString;
54
+ index?: number;
55
+ explain?: boolean | {
56
+ content: import("../props").LabelFunctionString;
57
+ head: import("../props").LabelFunctionString;
58
+ };
59
+ children?: {
60
+ label?: import("../props").LabelFunctionString;
61
+ field?: import("../props").LabelFunctionString;
62
+ render?: import("../props").RenderFunctionString;
63
+ disabled?: boolean;
64
+ renderHead?: import("../props").RenderFunctionString;
65
+ width?: string | number;
66
+ minWidth?: string | number;
67
+ columnKey?: string;
68
+ showOverflowTooltip?: boolean | {
69
+ content: string | ((col: Column, row: Record<string, object>) => string);
70
+ disabled?: boolean | ((col: Column, row: Record<string, object>) => boolean);
71
+ allowHtml?: boolean;
72
+ watchCellResize?: boolean;
73
+ mode?: "auto" | "static";
74
+ popoverOption?: Record<string, object>;
75
+ resizerWay?: import("../props").ResizerWay;
76
+ showHead?: boolean;
77
+ };
78
+ type?: string;
79
+ fixed?: string | boolean;
80
+ resizable?: boolean;
81
+ sort?: string | boolean | {
82
+ sortFn?: (...args: any[]) => boolean;
83
+ sortScope?: import("../props").SortScope;
84
+ value?: import("../const").SORT_OPTION;
85
+ };
86
+ filter?: string | boolean | {
87
+ list: {
88
+ label: string;
89
+ value: string;
90
+ }[];
91
+ filterFn?: (...args: any[]) => boolean;
92
+ match?: import("../props").FullEnum;
93
+ checked?: string[];
94
+ filterScope?: import("../props").SortScope;
95
+ btnSave?: string | boolean;
96
+ btnReset?: string | boolean;
97
+ height?: number;
98
+ maxHeight?: number;
99
+ };
100
+ colspan?: import("../props").SpanFunctionString;
101
+ rowspan?: import("../props").SpanFunctionString;
102
+ textAlign?: string;
103
+ className?: import("../props").RowClassFunctionString;
104
+ align?: string;
105
+ prop?: import("../props").LabelFunctionString;
106
+ index?: number;
107
+ explain?: boolean | {
108
+ content: import("../props").LabelFunctionString;
109
+ head: import("../props").LabelFunctionString;
110
+ };
111
+ children?: any[];
112
+ }[];
113
+ }[];
8
114
  checked: any[];
9
115
  limit: number;
10
116
  size: string;
@@ -20173,13 +20173,14 @@ var useColumns = function useColumns(props) {
20173
20173
  var resolveDraggableColumn = function resolveDraggableColumn() {
20174
20174
  if (props.rowDraggable) {
20175
20175
  var _props$rowDraggable$w, _props$rowDraggable, _props$rowDraggable$l, _props$rowDraggable2;
20176
- tableColumnList.unshift({
20176
+ return {
20177
20177
  minWidth: 50,
20178
20178
  width: (_props$rowDraggable$w = (_props$rowDraggable = props.rowDraggable) === null || _props$rowDraggable === void 0 ? void 0 : _props$rowDraggable.width) !== null && _props$rowDraggable$w !== void 0 ? _props$rowDraggable$w : 60,
20179
20179
  label: (_props$rowDraggable$l = (_props$rowDraggable2 = props.rowDraggable) === null || _props$rowDraggable2 === void 0 ? void 0 : _props$rowDraggable2.label) !== null && _props$rowDraggable$l !== void 0 ? _props$rowDraggable$l : t.value.sort,
20180
20180
  type: 'drag'
20181
- });
20181
+ };
20182
20182
  }
20183
+ return null;
20183
20184
  };
20184
20185
  /**
20185
20186
  * 判定是否需要合并行或者列配置
@@ -20278,6 +20279,10 @@ var useColumns = function useColumns(props) {
20278
20279
  columnGroup.length = 0;
20279
20280
  var maxDepth = 0;
20280
20281
  var targetColumns = [];
20282
+ var dragColumn = resolveDraggableColumn();
20283
+ if (dragColumn) {
20284
+ cols.unshift(dragColumn);
20285
+ }
20281
20286
  var getMaxDepth = function getMaxDepth(root) {
20282
20287
  var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
20283
20288
  if (root.length && maxDepth < depth) {
@@ -20351,7 +20356,7 @@ var useColumns = function useColumns(props) {
20351
20356
  */
20352
20357
  var formatColumns = function formatColumns() {
20353
20358
  sortColumns.length = 0;
20354
- resolveDraggableColumn();
20359
+ // resolveDraggableColumn();
20355
20360
  var skipColNum = 0;
20356
20361
  (tableColumnList || []).forEach(function (col, index) {
20357
20362
  var _ref = needColSpan.value ? getColumnSpanConfig(col, index, skipColNum) : {
@@ -22056,7 +22061,7 @@ const icon_namespaceObject = icon_x({ ["DownShape"]: () => __WEBPACK_EXTERNAL_MO
22056
22061
  var defaultFn = function defaultFn() {
22057
22062
  var type = resolvePropVal(column, 'type', [column, row]);
22058
22063
  if (type === 'index') {
22059
- return rows.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_INDEX);
22064
+ return rows.getRowAttribute((0,external_vue_namespaceObject.toRaw)(row), TABLE_ROW_ATTRIBUTE.ROW_INDEX);
22060
22065
  }
22061
22066
  var key = resolvePropVal(column, 'field', [column, row]);
22062
22067
  var cell = getRowText(row, key);
@@ -23064,6 +23069,9 @@ function use_render_isSlot(s) {
23064
23069
  "style": rowStyle
23065
23070
  }, [columns.columnGroup.map(function (cols, rowIndex) {
23066
23071
  return (0,external_vue_namespaceObject.createVNode)("tr", null, [cols.map(function (column, index) {
23072
+ if (columns.isHiddenColumn(column)) {
23073
+ return null;
23074
+ }
23067
23075
  var _useHead = use_head({
23068
23076
  props: props,
23069
23077
  ctx: ctx,
@@ -174,6 +174,7 @@ export type Column = {
174
174
  label?: LabelFunctionString;
175
175
  field?: LabelFunctionString;
176
176
  render?: RenderFunctionString;
177
+ disabled?: boolean;
177
178
  renderHead?: RenderFunctionString;
178
179
  width?: number | string;
179
180
  minWidth?: number | string;
package/lib/tag/index.js CHANGED
@@ -150,7 +150,6 @@ var TagStrokeType;
150
150
  size: shared_namespaceObject.PropTypes.size()
151
151
  },
152
152
  emits: ['change', 'close'],
153
- // slots: ['icon'],
154
153
  slots: Object,
155
154
  setup: function setup(props, _ref) {
156
155
  var emit = _ref.emit;
package/lib/tag/tag.css CHANGED
@@ -232,7 +232,7 @@
232
232
  background: var(--primary-color);
233
233
  opacity: 1;
234
234
  }
235
- .bk-tag--defaul {
235
+ .bk-tag--default {
236
236
  padding: 0 8px;
237
237
  }
238
238
  .bk-tag--small {
package/lib/tag/tag.less CHANGED
@@ -117,7 +117,7 @@
117
117
  }
118
118
  }
119
119
 
120
- .@{bk-prefix}-tag--defaul {
120
+ .@{bk-prefix}-tag--default {
121
121
  padding: 0 8px;
122
122
  }
123
123
 
@@ -492,7 +492,7 @@
492
492
  background: var(--primary-color);
493
493
  opacity: 1;
494
494
  }
495
- .bk-tag--defaul {
495
+ .bk-tag--default {
496
496
  padding: 0 8px;
497
497
  }
498
498
  .bk-tag--small {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkui-vue",
3
- "version": "2.0.1-beta.30",
3
+ "version": "2.0.1-beta.32",
4
4
  "workspaces": [
5
5
  "packages/**",
6
6
  "scripts/cli",