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.
- package/dist/index.cjs.js +37 -37
- package/dist/index.esm.js +5834 -5839
- package/dist/index.umd.js +36 -36
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/index.js +1 -1
- package/lib/search-select/index.d.ts +28 -66
- package/lib/search-select/index.js +50 -55
- package/lib/search-select/input.d.ts +3 -3
- package/lib/search-select/search-select.d.ts +11 -37
- package/lib/search-select/selected.d.ts +7 -7
- package/lib/search-select/utils.d.ts +3 -3
- package/lib/table/hooks/use-settings.d.ts +108 -2
- package/lib/table/index.js +12 -4
- package/lib/table/props.d.ts +1 -0
- package/lib/tag/index.js +0 -1
- package/lib/tag/tag.css +1 -1
- package/lib/tag/tag.less +1 -1
- package/lib/tag/tag.variable.css +1 -1
- package/package.json +1 -1
@@ -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:
|
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;
|
package/lib/table/index.js
CHANGED
@@ -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
|
-
|
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,
|
package/lib/table/props.d.ts
CHANGED
package/lib/tag/index.js
CHANGED
package/lib/tag/tag.css
CHANGED
package/lib/tag/tag.less
CHANGED
package/lib/tag/tag.variable.css
CHANGED