bkui-vue 1.0.3-beta.66.dialog.4 → 1.0.3-beta.67.dialog.1
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 +31 -31
- package/dist/index.esm.js +1222 -1219
- package/dist/index.umd.js +25 -25
- package/lib/overflow-title/index.js +1 -1
- package/lib/table/components/table-cell.d.ts +3 -2
- package/lib/table/components/table-column.d.ts +2 -2
- package/lib/table/index.d.ts +2 -2
- package/lib/table/index.js +19 -10
- package/lib/table/props.d.ts +3 -3
- package/lib/table/use-attributes.d.ts +1 -1
- package/lib/table/use-column.d.ts +6 -6
- package/lib/table-column/index.d.ts +6 -6
- package/package.json +1 -1
@@ -128,7 +128,7 @@ function placementType() {
|
|
128
128
|
// const { fontSize, fontFamily } = getComputedStyle(boxRef.value);
|
129
129
|
// textWidth = getActualWidthByCanvas(contentText.value as string, { fontSize, fontFamily });
|
130
130
|
// }
|
131
|
-
if ((0,shared_namespaceObject.hasOverflowEllipsis)(
|
131
|
+
if ((0,shared_namespaceObject.hasOverflowEllipsis)(textRef.value)) {
|
132
132
|
isShowTips.value = true;
|
133
133
|
if (props.type === 'title') {
|
134
134
|
var _textRef$value$innerT, _textRef$value;
|
@@ -1,5 +1,6 @@
|
|
1
|
+
import { Column } from '../props';
|
1
2
|
declare const _default: import("vue").DefineComponent<{
|
2
|
-
column: import("vue-types").VueTypeDef<
|
3
|
+
column: import("vue-types").VueTypeDef<Column>;
|
3
4
|
row: import("vue-types").VueTypeValidableDef<any> & {
|
4
5
|
default: any;
|
5
6
|
};
|
@@ -24,7 +25,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
24
25
|
};
|
25
26
|
resizerWay: import("vue-types").VueTypeDef<"debounce" | "throttle">;
|
26
27
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
27
|
-
column: import("vue-types").VueTypeDef<
|
28
|
+
column: import("vue-types").VueTypeDef<Column>;
|
28
29
|
row: import("vue-types").VueTypeValidableDef<any> & {
|
29
30
|
default: any;
|
30
31
|
};
|
@@ -193,8 +193,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
193
193
|
className?: import("../props").RowClassFunctionString;
|
194
194
|
align?: "" | "right" | "left" | "center";
|
195
195
|
showOverflowTooltip?: boolean | {
|
196
|
-
content: string |
|
197
|
-
disabled?: (col: Column, row: any) => boolean;
|
196
|
+
content: string | ((col: Column, row: any) => string);
|
197
|
+
disabled?: boolean | ((col: Column, row: any) => boolean);
|
198
198
|
watchCellResize?: boolean;
|
199
199
|
mode?: "auto" | "static";
|
200
200
|
popoverOption?: any;
|
package/lib/table/index.d.ts
CHANGED
@@ -1429,8 +1429,8 @@ declare const BkTable: {
|
|
1429
1429
|
className?: import("./props").RowClassFunctionString;
|
1430
1430
|
align?: "" | "right" | "left" | "center";
|
1431
1431
|
showOverflowTooltip?: boolean | {
|
1432
|
-
content: string |
|
1433
|
-
disabled?: (col: import("./props").Column, row: any) => boolean;
|
1432
|
+
content: string | ((col: import("./props").Column, row: any) => string);
|
1433
|
+
disabled?: boolean | ((col: import("./props").Column, row: any) => boolean);
|
1434
1434
|
watchCellResize?: boolean;
|
1435
1435
|
mode?: "auto" | "static";
|
1436
1436
|
popoverOption?: any;
|
package/lib/table/index.js
CHANGED
@@ -3889,15 +3889,17 @@ var tableSchemaResponse = function tableSchemaResponse(props) {
|
|
3889
3889
|
* @param row
|
3890
3890
|
* @param isSelected
|
3891
3891
|
*/
|
3892
|
-
var setRowSelection = function setRowSelection(row, isSelected) {
|
3892
|
+
var setRowSelection = function setRowSelection(row, isSelected, index) {
|
3893
3893
|
var value = isSelected;
|
3894
3894
|
if (typeof props.isSelectedFn === 'function') {
|
3895
3895
|
value = props.isSelectedFn({
|
3896
|
-
row: row
|
3896
|
+
row: row,
|
3897
|
+
index: index !== null && index !== void 0 ? index : getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_INDEX)
|
3897
3898
|
});
|
3898
3899
|
}
|
3899
3900
|
if (isRowSelectEnable(props, {
|
3900
|
-
row: row
|
3901
|
+
row: row,
|
3902
|
+
index: index !== null && index !== void 0 ? index : getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_INDEX)
|
3901
3903
|
})) {
|
3902
3904
|
setRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_SELECTION, value);
|
3903
3905
|
}
|
@@ -3936,13 +3938,13 @@ var tableSchemaResponse = function tableSchemaResponse(props) {
|
|
3936
3938
|
var toggleAllSelection = function toggleAllSelection(value) {
|
3937
3939
|
var val = value !== null && value !== void 0 ? value : !isCheckedAll();
|
3938
3940
|
if (props.acrossAll) {
|
3939
|
-
formatData.data.forEach(function (row) {
|
3940
|
-
return setRowSelection(row, val);
|
3941
|
+
formatData.data.forEach(function (row, index) {
|
3942
|
+
return setRowSelection(row, val, index);
|
3941
3943
|
});
|
3942
3944
|
return;
|
3943
3945
|
}
|
3944
|
-
pageData.forEach(function (row) {
|
3945
|
-
return setRowSelection(row, val);
|
3946
|
+
pageData.forEach(function (row, index) {
|
3947
|
+
return setRowSelection(row, val, index);
|
3946
3948
|
});
|
3947
3949
|
formatData.dataSchema.set(CHECK_ALL_OBJ, defineProperty_defineProperty(defineProperty_defineProperty({}, TABLE_ROW_ATTRIBUTE.ROW_SELECTION, val), TABLE_ROW_ATTRIBUTE.ROW_SELECTION_INDETERMINATE, false));
|
3948
3950
|
};
|
@@ -6013,7 +6015,6 @@ function use_head_cell_isSlot(s) {
|
|
6013
6015
|
* @param type 排序类型
|
6014
6016
|
*/
|
6015
6017
|
var handleSortClick = function handleSortClick(sortFn, type) {
|
6016
|
-
console.log('handleSortClick', type);
|
6017
6018
|
var fn = function fn(a, b) {
|
6018
6019
|
return getSortFnByColumn(column, sortFn, a, b, type);
|
6019
6020
|
};
|
@@ -6692,7 +6693,10 @@ function use_render_isSlot(s) {
|
|
6692
6693
|
};
|
6693
6694
|
var renderCheckboxColumn = function renderCheckboxColumn(row, index) {
|
6694
6695
|
var isAll = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
6695
|
-
var handleChecked = function handleChecked(value) {
|
6696
|
+
var handleChecked = function handleChecked(value, event) {
|
6697
|
+
event.stopImmediatePropagation();
|
6698
|
+
event.preventDefault();
|
6699
|
+
event.stopPropagation();
|
6696
6700
|
if (isAll) {
|
6697
6701
|
tableResp.setRowSelectionAll(value);
|
6698
6702
|
context.emit(EMIT_EVENTS.ROW_SELECT_ALL, {
|
@@ -6726,7 +6730,12 @@ function use_render_isSlot(s) {
|
|
6726
6730
|
var startIndex = start.index < end.index ? start.index : end.index;
|
6727
6731
|
var endIndex = start.index < end.index ? end.index : start.index;
|
6728
6732
|
((_tableResp$pageData$s = tableResp.pageData.slice(startIndex, endIndex + 1)) !== null && _tableResp$pageData$s !== void 0 ? _tableResp$pageData$s : []).forEach(function (item) {
|
6729
|
-
|
6733
|
+
var isRowEnabled = isRowSelectEnable(props, {
|
6734
|
+
row: row,
|
6735
|
+
index: index,
|
6736
|
+
isCheckAll: false
|
6737
|
+
});
|
6738
|
+
isRowEnabled && tableResp.setRowSelection(item, true);
|
6730
6739
|
});
|
6731
6740
|
}
|
6732
6741
|
context.emit(EMIT_EVENTS.ROW_SELECT, {
|
package/lib/table/props.d.ts
CHANGED
@@ -44,8 +44,8 @@ export declare enum FixedEnum {
|
|
44
44
|
}
|
45
45
|
export declare const fixedType: import("vue-types").VueTypeValidableDef<"right" | "left">;
|
46
46
|
export type IOverflowTooltipOption = {
|
47
|
-
content: string |
|
48
|
-
disabled?: (col: Column, row: any) => boolean | boolean;
|
47
|
+
content: ((col: Column, row: any) => string) | string;
|
48
|
+
disabled?: ((col: Column, row: any) => boolean) | boolean;
|
49
49
|
watchCellResize?: boolean;
|
50
50
|
mode?: `${OverflowModeEnum}`;
|
51
51
|
popoverOption?: any;
|
@@ -165,7 +165,7 @@ export type Column = {
|
|
165
165
|
width?: number | string;
|
166
166
|
minWidth?: number | string;
|
167
167
|
columnKey?: string;
|
168
|
-
showOverflowTooltip?:
|
168
|
+
showOverflowTooltip?: IOverflowTooltip;
|
169
169
|
type?: string;
|
170
170
|
fixed?: string | boolean;
|
171
171
|
resizable?: boolean;
|
@@ -21,7 +21,7 @@ export type ITableFormatData = {
|
|
21
21
|
declare const tableSchemaResponse: (props: TablePropTypes) => {
|
22
22
|
formatColumns: (columns: Column[]) => void;
|
23
23
|
formatDataSchema: (data: any[]) => void;
|
24
|
-
setRowSelection: (row: any, isSelected: boolean) => void;
|
24
|
+
setRowSelection: (row: any, isSelected: boolean, index?: number) => void;
|
25
25
|
setRowExpand: (row: any, isExpand: boolean) => void;
|
26
26
|
setRowIndex: (row: any, index: number) => void;
|
27
27
|
setColumnAttribute: (col: Column, attrName: string, attrValue: string | number | boolean | ((...args: any[]) => boolean | number | void | string)) => void;
|
@@ -17,8 +17,8 @@ declare const _default: (props: TablePropTypes, targetColumns: ITableColumn[]) =
|
|
17
17
|
minWidth?: string | number;
|
18
18
|
columnKey?: string;
|
19
19
|
showOverflowTooltip?: boolean | {
|
20
|
-
content: string |
|
21
|
-
disabled?: (col: Column, row: any) => boolean;
|
20
|
+
content: string | ((col: Column, row: any) => string);
|
21
|
+
disabled?: boolean | ((col: Column, row: any) => boolean);
|
22
22
|
watchCellResize?: boolean;
|
23
23
|
mode?: "auto" | "static";
|
24
24
|
popoverOption?: any;
|
@@ -105,8 +105,8 @@ declare const _default: (props: TablePropTypes, targetColumns: ITableColumn[]) =
|
|
105
105
|
minWidth?: string | number;
|
106
106
|
columnKey?: string;
|
107
107
|
showOverflowTooltip?: boolean | {
|
108
|
-
content: string |
|
109
|
-
disabled?: (col: Column, row: any) => boolean;
|
108
|
+
content: string | ((col: Column, row: any) => string);
|
109
|
+
disabled?: boolean | ((col: Column, row: any) => boolean);
|
110
110
|
watchCellResize?: boolean;
|
111
111
|
mode?: "auto" | "static";
|
112
112
|
popoverOption?: any;
|
@@ -193,8 +193,8 @@ declare const _default: (props: TablePropTypes, targetColumns: ITableColumn[]) =
|
|
193
193
|
minWidth?: string | number;
|
194
194
|
columnKey?: string;
|
195
195
|
showOverflowTooltip?: boolean | {
|
196
|
-
content: string |
|
197
|
-
disabled?: (col: Column, row: any) => boolean;
|
196
|
+
content: string | ((col: Column, row: any) => string);
|
197
|
+
disabled?: boolean | ((col: Column, row: any) => boolean);
|
198
198
|
watchCellResize?: boolean;
|
199
199
|
mode?: "auto" | "static";
|
200
200
|
popoverOption?: any;
|
@@ -130,8 +130,8 @@ declare const BkTableColumn: {
|
|
130
130
|
className?: import("../table/props").RowClassFunctionString;
|
131
131
|
align?: "" | "right" | "left" | "center";
|
132
132
|
showOverflowTooltip?: boolean | {
|
133
|
-
content: string |
|
134
|
-
disabled?: (col: import("../../bkui-vue").TableIColumn, row: any) => boolean;
|
133
|
+
content: string | ((col: import("../../bkui-vue").TableIColumn, row: any) => string);
|
134
|
+
disabled?: boolean | ((col: import("../../bkui-vue").TableIColumn, row: any) => boolean);
|
135
135
|
watchCellResize?: boolean;
|
136
136
|
mode?: "auto" | "static";
|
137
137
|
popoverOption?: any;
|
@@ -420,8 +420,8 @@ declare const BkTableColumn: {
|
|
420
420
|
className?: import("../table/props").RowClassFunctionString;
|
421
421
|
align?: "" | "right" | "left" | "center";
|
422
422
|
showOverflowTooltip?: boolean | {
|
423
|
-
content: string |
|
424
|
-
disabled?: (col: import("../../bkui-vue").TableIColumn, row: any) => boolean;
|
423
|
+
content: string | ((col: import("../../bkui-vue").TableIColumn, row: any) => string);
|
424
|
+
disabled?: boolean | ((col: import("../../bkui-vue").TableIColumn, row: any) => boolean);
|
425
425
|
watchCellResize?: boolean;
|
426
426
|
mode?: "auto" | "static";
|
427
427
|
popoverOption?: any;
|
@@ -647,8 +647,8 @@ declare const BkTableColumn: {
|
|
647
647
|
className?: import("../table/props").RowClassFunctionString;
|
648
648
|
align?: "" | "right" | "left" | "center";
|
649
649
|
showOverflowTooltip?: boolean | {
|
650
|
-
content: string |
|
651
|
-
disabled?: (col: import("../../bkui-vue").TableIColumn, row: any) => boolean;
|
650
|
+
content: string | ((col: import("../../bkui-vue").TableIColumn, row: any) => string);
|
651
|
+
disabled?: boolean | ((col: import("../../bkui-vue").TableIColumn, row: any) => boolean);
|
652
652
|
watchCellResize?: boolean;
|
653
653
|
mode?: "auto" | "static";
|
654
654
|
popoverOption?: any;
|