bkui-vue 2.0.1-beta.41 → 2.0.1-beta.43
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 +36 -36
- package/dist/index.esm.js +7288 -7267
- package/dist/index.umd.js +32 -32
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/index.js +1 -1
- package/lib/table/components/table-column.d.ts +1 -3
- package/lib/table/index.d.ts +5 -3
- package/lib/table/index.js +60 -21
- package/lib/table/props.d.ts +8 -0
- package/lib/table/table.css +1 -1
- package/lib/table/table.d.ts +2 -0
- package/lib/table/table.less +1 -1
- package/lib/table/table.variable.css +1 -1
- package/lib/table-column/index.d.ts +3 -9
- package/lib/table-column/index.js +17 -8
- package/lib/tree/index.js +5 -5
- package/lib/tree/props.d.ts +1 -1
- package/lib/tree/use-node-action.d.ts +1 -1
- package/lib/tree/use-node-async.d.ts +2 -1
- package/lib/tree/use-search.d.ts +1 -1
- package/lib/tree/use-tree-init.d.ts +8 -5
- package/lib/tree/util.d.ts +21 -21
- package/package.json +1 -1
package/lib/index.js
CHANGED
@@ -79,9 +79,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
79
79
|
} & {
|
80
80
|
default: number;
|
81
81
|
};
|
82
|
-
}, () => import("vue").
|
83
|
-
[key: string]: any;
|
84
|
-
}>[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
82
|
+
}, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
85
83
|
label: import("vue-types").VueTypeDef<import("../props").LabelFunctionString>;
|
86
84
|
field: import("vue-types").VueTypeDef<import("../props").LabelFunctionString>;
|
87
85
|
render: import("vue-types").VueTypeDef<import("../props").RenderFunctionString>;
|
package/lib/table/index.d.ts
CHANGED
@@ -181,6 +181,7 @@ declare const BkTable: {
|
|
181
181
|
fixedBottom: import("vue-types").VueTypeDef<import("./props").FixedBottomOption> & {
|
182
182
|
default: () => import("./props").FixedBottomOption;
|
183
183
|
};
|
184
|
+
appendLastRow: import("vue-types").VueTypeDef<import("./props").AppendLastRowOption>;
|
184
185
|
}>>, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, (...args: any[]) => boolean>, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<ExtractPropTypes<{
|
185
186
|
data: import("vue-types").VueTypeDef<any[]> & {
|
186
187
|
default: () => any[];
|
@@ -358,6 +359,7 @@ declare const BkTable: {
|
|
358
359
|
fixedBottom: import("vue-types").VueTypeDef<import("./props").FixedBottomOption> & {
|
359
360
|
default: () => import("./props").FixedBottomOption;
|
360
361
|
};
|
362
|
+
appendLastRow: import("vue-types").VueTypeDef<import("./props").AppendLastRowOption>;
|
361
363
|
}>>, {
|
362
364
|
data: any[];
|
363
365
|
thead: import("./props").Thead;
|
@@ -589,6 +591,7 @@ declare const BkTable: {
|
|
589
591
|
fixedBottom: import("vue-types").VueTypeDef<import("./props").FixedBottomOption> & {
|
590
592
|
default: () => import("./props").FixedBottomOption;
|
591
593
|
};
|
594
|
+
appendLastRow: import("vue-types").VueTypeDef<import("./props").AppendLastRowOption>;
|
592
595
|
}>>, () => JSX.Element, {}, {}, {}, {
|
593
596
|
data: any[];
|
594
597
|
thead: import("./props").Thead;
|
@@ -817,6 +820,7 @@ declare const BkTable: {
|
|
817
820
|
fixedBottom: import("vue-types").VueTypeDef<import("./props").FixedBottomOption> & {
|
818
821
|
default: () => import("./props").FixedBottomOption;
|
819
822
|
};
|
823
|
+
appendLastRow: import("vue-types").VueTypeDef<import("./props").AppendLastRowOption>;
|
820
824
|
}>>, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, (...args: any[]) => boolean>, string, {
|
821
825
|
data: any[];
|
822
826
|
thead: import("./props").Thead;
|
@@ -904,9 +908,7 @@ declare const BkTable: {
|
|
904
908
|
} & {
|
905
909
|
default: number;
|
906
910
|
};
|
907
|
-
}, () => import("vue").
|
908
|
-
[key: string]: any;
|
909
|
-
}>[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
911
|
+
}, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
910
912
|
label: import("vue-types").VueTypeDef<import("./props").LabelFunctionString>;
|
911
913
|
field: import("vue-types").VueTypeDef<import("./props").LabelFunctionString>;
|
912
914
|
render: import("vue-types").VueTypeDef<import("./props").RenderFunctionString>;
|
package/lib/table/index.js
CHANGED
@@ -17320,6 +17320,10 @@ __webpack_require__.d(__webpack_exports__, {
|
|
17320
17320
|
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
17321
17321
|
var y = x => () => x
|
17322
17322
|
const shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.PropTypes, ["RenderType"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.RenderType, ["classes"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.classes, ["hasOverflowEllipsis"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.hasOverflowEllipsis, ["isElement"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.isElement, ["throttle"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.throttle, ["withInstallProps"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.withInstallProps });
|
17323
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js
|
17324
|
+
function _objectDestructuringEmpty(obj) {
|
17325
|
+
if (obj == null) throw new TypeError("Cannot destructure " + obj);
|
17326
|
+
}
|
17323
17327
|
;// CONCATENATED MODULE: external "vue"
|
17324
17328
|
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
17325
17329
|
var external_vue_y = x => () => x
|
@@ -17926,9 +17930,19 @@ var tableProps = {
|
|
17926
17930
|
position: 'relative',
|
17927
17931
|
height: LINE_HEIGHT
|
17928
17932
|
}
|
17929
|
-
}).def(null)
|
17933
|
+
}).def(null),
|
17934
|
+
/**
|
17935
|
+
* 表格尾部追加的行配置
|
17936
|
+
*/
|
17937
|
+
appendLastRow: (0,external_vue_types_namespaceObject.toType)('AppendLastRowOption', {
|
17938
|
+
"default": {
|
17939
|
+
type: 'default',
|
17940
|
+
cellRender: undefined
|
17941
|
+
}
|
17942
|
+
})
|
17930
17943
|
};
|
17931
17944
|
;// CONCATENATED MODULE: ../../packages/table/src/components/table-column.tsx
|
17945
|
+
|
17932
17946
|
/*
|
17933
17947
|
* Tencent is pleased to support the open source community by making
|
17934
17948
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -17983,7 +17997,7 @@ var TableColumnProp = {
|
|
17983
17997
|
name: 'TableColumn',
|
17984
17998
|
props: TableColumnProp,
|
17985
17999
|
setup: function setup(props, _ref) {
|
17986
|
-
|
18000
|
+
_objectDestructuringEmpty(_ref);
|
17987
18001
|
var initTableColumns = (0,external_vue_namespaceObject.inject)(PROVIDE_KEY_INIT_COL, function () {});
|
17988
18002
|
var lastPropsVal = {};
|
17989
18003
|
(0,external_vue_namespaceObject.watch)(function () {
|
@@ -18000,12 +18014,7 @@ var TableColumnProp = {
|
|
18000
18014
|
(0,external_vue_namespaceObject.onUnmounted)(function () {
|
18001
18015
|
initTableColumns();
|
18002
18016
|
});
|
18003
|
-
return function () {
|
18004
|
-
var _slots$default;
|
18005
|
-
return (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots, {
|
18006
|
-
row: {}
|
18007
|
-
});
|
18008
|
-
};
|
18017
|
+
return function () {};
|
18009
18018
|
}
|
18010
18019
|
}));
|
18011
18020
|
;// CONCATENATED MODULE: ../../packages/table/src/events.ts
|
@@ -18187,6 +18196,9 @@ var CELL_EVENT_TYPES = defineProperty_defineProperty(defineProperty_defineProper
|
|
18187
18196
|
handleMouseoutDragSection(target);
|
18188
18197
|
dragColumn = null;
|
18189
18198
|
};
|
18199
|
+
var throttleUpdateDragOffsetX = (0,lodash.throttle)(function (diff) {
|
18200
|
+
dragOffsetX.value = dragOffsetX.value + diff;
|
18201
|
+
});
|
18190
18202
|
var handleMouseDragMove = function handleMouseDragMove(e) {
|
18191
18203
|
stopDefaultEvent(e);
|
18192
18204
|
document.body.style.setProperty('user-select', 'none');
|
@@ -18196,7 +18208,7 @@ var CELL_EVENT_TYPES = defineProperty_defineProperty(defineProperty_defineProper
|
|
18196
18208
|
var resolveWidth = getColumnOrderWidth(dragColumn, ORDER_LIST) + diff;
|
18197
18209
|
var minWidth = getColumnOrderWidth(dragColumn, [COLUMN_ATTRIBUTE.COL_MIN_WIDTH]);
|
18198
18210
|
if (minWidth < resolveWidth) {
|
18199
|
-
|
18211
|
+
throttleUpdateDragOffsetX(diff);
|
18200
18212
|
}
|
18201
18213
|
};
|
18202
18214
|
var setNodeCursor = function () {
|
@@ -21224,7 +21236,7 @@ function use_layout_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
|
|
21224
21236
|
};
|
21225
21237
|
var setRootStyleVars = (0,shared_namespaceObject.throttle)(function () {
|
21226
21238
|
var _refRoot$value3, _refRoot$value4, _refRoot$value5, _refRoot$value6, _refRoot$value7;
|
21227
|
-
(_refRoot$value3 = refRoot.value) === null || _refRoot$value3 === void 0 || (_refRoot$value3 = _refRoot$value3.style) === null || _refRoot$value3 === void 0 || _refRoot$value3.setProperty('--drag-offset-x', "".concat(dragOffsetX.value, "px"));
|
21239
|
+
(_refRoot$value3 = refRoot.value) === null || _refRoot$value3 === void 0 || (_refRoot$value3 = _refRoot$value3.style) === null || _refRoot$value3 === void 0 || _refRoot$value3.setProperty('--drag-offset-x', "".concat(dragOffsetX.value + translateX.value, "px"));
|
21228
21240
|
(_refRoot$value4 = refRoot.value) === null || _refRoot$value4 === void 0 || (_refRoot$value4 = _refRoot$value4.style) === null || _refRoot$value4 === void 0 || _refRoot$value4.setProperty('--drag-offset-h-x', "".concat(dragOffsetX.value - 2, "px"));
|
21229
21241
|
(_refRoot$value5 = refRoot.value) === null || _refRoot$value5 === void 0 || (_refRoot$value5 = _refRoot$value5.style) === null || _refRoot$value5 === void 0 || _refRoot$value5.setProperty('--translate-y', "".concat(translateY.value, "px"));
|
21230
21242
|
(_refRoot$value6 = refRoot.value) === null || _refRoot$value6 === void 0 || (_refRoot$value6 = _refRoot$value6.style) === null || _refRoot$value6 === void 0 || _refRoot$value6.setProperty('--translate-x', "".concat(translateX.value, "px"));
|
@@ -23245,17 +23257,44 @@ function use_render_isSlot(s) {
|
|
23245
23257
|
};
|
23246
23258
|
/** **************************************** Rows Render ******************************* **/
|
23247
23259
|
var renderAppendLastRow = function renderAppendLastRow() {
|
23248
|
-
|
23249
|
-
|
23260
|
+
var rowId = 'append-last-row';
|
23261
|
+
var rowStyle = [].concat(_toConsumableArray(formatPropAsArray(props.rowStyle, [])), [{
|
23262
|
+
'--row-height': "".concat(getRowHeight(null, null), "px")
|
23263
|
+
}]);
|
23264
|
+
if (props.appendLastRow.type === 'default') {
|
23265
|
+
if (ctx.slots.appendLastRow) {
|
23266
|
+
var _props$appendLastRow$, _props$appendLastRow$2, _props$appendLastRow;
|
23267
|
+
return (0,external_vue_namespaceObject.createVNode)(table_row, {
|
23268
|
+
"key": rowId
|
23269
|
+
}, {
|
23270
|
+
"default": function _default() {
|
23271
|
+
return [(0,external_vue_namespaceObject.createVNode)("tr", {
|
23272
|
+
"key": rowId,
|
23273
|
+
"style": rowStyle
|
23274
|
+
}, [(0,external_vue_namespaceObject.createVNode)("td", {
|
23275
|
+
"colspan": columns.visibleColumns.length
|
23276
|
+
}, [(_props$appendLastRow$ = (_props$appendLastRow$2 = (_props$appendLastRow = props.appendLastRow).cellRender) === null || _props$appendLastRow$2 === void 0 ? void 0 : _props$appendLastRow$2.call(_props$appendLastRow, null, null)) !== null && _props$appendLastRow$ !== void 0 ? _props$appendLastRow$ : ctx.slots.appendLastRow()])])];
|
23277
|
+
}
|
23278
|
+
});
|
23279
|
+
}
|
23280
|
+
return;
|
23281
|
+
}
|
23282
|
+
if (props.appendLastRow.type === 'summary') {
|
23250
23283
|
return (0,external_vue_namespaceObject.createVNode)(table_row, {
|
23251
23284
|
"key": rowId
|
23252
23285
|
}, {
|
23253
23286
|
"default": function _default() {
|
23254
23287
|
return [(0,external_vue_namespaceObject.createVNode)("tr", {
|
23255
|
-
"key": rowId
|
23256
|
-
|
23257
|
-
|
23258
|
-
|
23288
|
+
"key": rowId,
|
23289
|
+
"style": rowStyle
|
23290
|
+
}, [columns.visibleColumns.map(function (column, index) {
|
23291
|
+
var _ref2, _props$appendLastRow$3, _props$appendLastRow$4, _props$appendLastRow2;
|
23292
|
+
return (0,external_vue_namespaceObject.createVNode)("td", null, [(0,external_vue_namespaceObject.createVNode)(table_cell, null, {
|
23293
|
+
"default": function _default() {
|
23294
|
+
return [(_ref2 = (_props$appendLastRow$3 = (_props$appendLastRow$4 = (_props$appendLastRow2 = props.appendLastRow).cellRender) === null || _props$appendLastRow$4 === void 0 ? void 0 : _props$appendLastRow$4.call(_props$appendLastRow2, column, index)) !== null && _props$appendLastRow$3 !== void 0 ? _props$appendLastRow$3 : column.field) !== null && _ref2 !== void 0 ? _ref2 : column.prop];
|
23295
|
+
}
|
23296
|
+
})]);
|
23297
|
+
})])];
|
23259
23298
|
}
|
23260
23299
|
});
|
23261
23300
|
}
|
@@ -23354,9 +23393,9 @@ function use_render_isSlot(s) {
|
|
23354
23393
|
skipRow: false
|
23355
23394
|
});
|
23356
23395
|
}
|
23357
|
-
var
|
23358
|
-
|
23359
|
-
skipRowLen =
|
23396
|
+
var _ref3 = (_store$get$get = (_store$get = store.get(preRow)) === null || _store$get === void 0 ? void 0 : _store$get.get(col)) !== null && _store$get$get !== void 0 ? _store$get$get : {},
|
23397
|
+
_ref3$skipRowLen = _ref3.skipRowLen,
|
23398
|
+
skipRowLen = _ref3$skipRowLen === void 0 ? 0 : _ref3$skipRowLen;
|
23360
23399
|
var skipRow = false;
|
23361
23400
|
var rowspan = resolveColumnSpan(col, null, row, rowIndex, 'rowspan');
|
23362
23401
|
if (skipRowLen > 1) {
|
@@ -23414,10 +23453,10 @@ function use_render_isSlot(s) {
|
|
23414
23453
|
rowspan = _resolveCellSpan.rowspan;
|
23415
23454
|
var _columns$getColumnAtt = columns.getColumnAttribute(column, COLUMN_ATTRIBUTE.COL_SPAN),
|
23416
23455
|
skipCol = _columns$getColumnAtt.skipCol;
|
23417
|
-
var
|
23456
|
+
var _ref4 = needRowSpan && !isChild ? getRowSpanConfig(row, rowIndex, preRow, column, rowSpanMap) : {
|
23418
23457
|
skipRow: false
|
23419
23458
|
},
|
23420
|
-
skipRow =
|
23459
|
+
skipRow = _ref4.skipRow;
|
23421
23460
|
var tdCtxClass = {
|
23422
23461
|
'expand-cell': column.type === 'expand'
|
23423
23462
|
};
|
package/lib/table/props.d.ts
CHANGED
@@ -250,6 +250,10 @@ export type FixedBottomOption = {
|
|
250
250
|
height: number;
|
251
251
|
loading?: boolean;
|
252
252
|
};
|
253
|
+
export type AppendLastRowOption = {
|
254
|
+
type: 'default' | 'summary';
|
255
|
+
cellRender?: (column: Column, index: number) => VNode | number | string;
|
256
|
+
};
|
253
257
|
export declare const tableProps: {
|
254
258
|
/**
|
255
259
|
* 渲染列表
|
@@ -619,5 +623,9 @@ export declare const tableProps: {
|
|
619
623
|
fixedBottom: import("vue-types").VueTypeDef<FixedBottomOption> & {
|
620
624
|
default: () => FixedBottomOption;
|
621
625
|
};
|
626
|
+
/**
|
627
|
+
* 表格尾部追加的行配置
|
628
|
+
*/
|
629
|
+
appendLastRow: import("vue-types").VueTypeDef<AppendLastRowOption>;
|
622
630
|
};
|
623
631
|
export {};
|
package/lib/table/table.css
CHANGED
@@ -1540,7 +1540,7 @@
|
|
1540
1540
|
z-index: 1;
|
1541
1541
|
width: 6px;
|
1542
1542
|
background-color: #3785ff;
|
1543
|
-
transform:
|
1543
|
+
transform: translate3d(var(--drag-offset-h-x), 0, 0);
|
1544
1544
|
pointer-events: none;
|
1545
1545
|
}
|
1546
1546
|
.bk-table .bk-table-head .bk-table-fixed {
|
package/lib/table/table.d.ts
CHANGED
@@ -175,6 +175,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
175
175
|
fixedBottom: import("vue-types").VueTypeDef<import("./props").FixedBottomOption> & {
|
176
176
|
default: () => import("./props").FixedBottomOption;
|
177
177
|
};
|
178
|
+
appendLastRow: import("vue-types").VueTypeDef<import("./props").AppendLastRowOption>;
|
178
179
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, (...args: any[]) => boolean>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
179
180
|
data: import("vue-types").VueTypeDef<any[]> & {
|
180
181
|
default: () => any[];
|
@@ -352,6 +353,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
352
353
|
fixedBottom: import("vue-types").VueTypeDef<import("./props").FixedBottomOption> & {
|
353
354
|
default: () => import("./props").FixedBottomOption;
|
354
355
|
};
|
356
|
+
appendLastRow: import("vue-types").VueTypeDef<import("./props").AppendLastRowOption>;
|
355
357
|
}>>, {
|
356
358
|
data: any[];
|
357
359
|
thead: import("./props").Thead;
|
package/lib/table/table.less
CHANGED
@@ -1930,7 +1930,7 @@
|
|
1930
1930
|
z-index: 1;
|
1931
1931
|
width: 6px;
|
1932
1932
|
background-color: #3785ff;
|
1933
|
-
transform:
|
1933
|
+
transform: translate3d(var(--drag-offset-h-x), 0, 0);
|
1934
1934
|
pointer-events: none;
|
1935
1935
|
}
|
1936
1936
|
.bk-table .bk-table-head .bk-table-fixed {
|
@@ -38,9 +38,7 @@ declare const BkTableColumn: {
|
|
38
38
|
} & {
|
39
39
|
default: number;
|
40
40
|
};
|
41
|
-
}>>, () => import("vue").
|
42
|
-
[key: string]: any;
|
43
|
-
}>[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
41
|
+
}>>, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
44
42
|
label: import("vue-types").VueTypeDef<import("../table/props").LabelFunctionString>;
|
45
43
|
field: import("vue-types").VueTypeDef<import("../table/props").LabelFunctionString>;
|
46
44
|
render: import("vue-types").VueTypeDef<import("../table/props").RenderFunctionString>;
|
@@ -133,9 +131,7 @@ declare const BkTableColumn: {
|
|
133
131
|
} & {
|
134
132
|
default: number;
|
135
133
|
};
|
136
|
-
}>>, () =>
|
137
|
-
[key: string]: any;
|
138
|
-
}>[], {}, {}, {}, {
|
134
|
+
}>>, () => void, {}, {}, {}, {
|
139
135
|
fixed: boolean | "left" | "right";
|
140
136
|
resizable: boolean;
|
141
137
|
minWidth: string | number;
|
@@ -186,9 +182,7 @@ declare const BkTableColumn: {
|
|
186
182
|
} & {
|
187
183
|
default: number;
|
188
184
|
};
|
189
|
-
}>>, () => import("vue").
|
190
|
-
[key: string]: any;
|
191
|
-
}>[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
185
|
+
}>>, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
192
186
|
fixed: boolean | "left" | "right";
|
193
187
|
resizable: boolean;
|
194
188
|
minWidth: string | number;
|
@@ -17295,6 +17295,10 @@ __webpack_require__.d(__webpack_exports__, {
|
|
17295
17295
|
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
17296
17296
|
var y = x => () => x
|
17297
17297
|
const shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.PropTypes, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.withInstall });
|
17298
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js
|
17299
|
+
function _objectDestructuringEmpty(obj) {
|
17300
|
+
if (obj == null) throw new TypeError("Cannot destructure " + obj);
|
17301
|
+
}
|
17298
17302
|
;// CONCATENATED MODULE: external "vue"
|
17299
17303
|
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
17300
17304
|
var external_vue_y = x => () => x
|
@@ -17901,9 +17905,19 @@ var tableProps = {
|
|
17901
17905
|
position: 'relative',
|
17902
17906
|
height: LINE_HEIGHT
|
17903
17907
|
}
|
17904
|
-
}).def(null)
|
17908
|
+
}).def(null),
|
17909
|
+
/**
|
17910
|
+
* 表格尾部追加的行配置
|
17911
|
+
*/
|
17912
|
+
appendLastRow: (0,external_vue_types_namespaceObject.toType)('AppendLastRowOption', {
|
17913
|
+
"default": {
|
17914
|
+
type: 'default',
|
17915
|
+
cellRender: undefined
|
17916
|
+
}
|
17917
|
+
})
|
17905
17918
|
};
|
17906
17919
|
;// CONCATENATED MODULE: ../../packages/table/src/components/table-column.tsx
|
17920
|
+
|
17907
17921
|
/*
|
17908
17922
|
* Tencent is pleased to support the open source community by making
|
17909
17923
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -17958,7 +17972,7 @@ var TableColumnProp = {
|
|
17958
17972
|
name: 'TableColumn',
|
17959
17973
|
props: TableColumnProp,
|
17960
17974
|
setup: function setup(props, _ref) {
|
17961
|
-
|
17975
|
+
_objectDestructuringEmpty(_ref);
|
17962
17976
|
var initTableColumns = (0,external_vue_namespaceObject.inject)(PROVIDE_KEY_INIT_COL, function () {});
|
17963
17977
|
var lastPropsVal = {};
|
17964
17978
|
(0,external_vue_namespaceObject.watch)(function () {
|
@@ -17975,12 +17989,7 @@ var TableColumnProp = {
|
|
17975
17989
|
(0,external_vue_namespaceObject.onUnmounted)(function () {
|
17976
17990
|
initTableColumns();
|
17977
17991
|
});
|
17978
|
-
return function () {
|
17979
|
-
var _slots$default;
|
17980
|
-
return (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots, {
|
17981
|
-
row: {}
|
17982
|
-
});
|
17983
|
-
};
|
17992
|
+
return function () {};
|
17984
17993
|
}
|
17985
17994
|
}));
|
17986
17995
|
;// CONCATENATED MODULE: ../../packages/table-column/src/index.ts
|
package/lib/tree/index.js
CHANGED
@@ -18391,6 +18391,7 @@ var assignTreeNode = function assignTreeNode(path, treeData, childKey, assignVal
|
|
18391
18391
|
};
|
18392
18392
|
var resolveNodeItem = function resolveNodeItem(node) {
|
18393
18393
|
if (node === undefined || node === null) {
|
18394
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
18394
18395
|
return {
|
18395
18396
|
__IS_NULL: true
|
18396
18397
|
};
|
@@ -18954,7 +18955,7 @@ var use_node_action_this = undefined;
|
|
18954
18955
|
var handleNodeContentClick = function handleNodeContentClick(item, e) {
|
18955
18956
|
var nodeActions = resolveNodeAction(item);
|
18956
18957
|
if (nodeActions.includes('selected')) {
|
18957
|
-
setSelect(item, true,
|
18958
|
+
setSelect(item, true, true, true);
|
18958
18959
|
}
|
18959
18960
|
if (nodeActions.includes('expand')) {
|
18960
18961
|
if (!isNodeOpened(item)) {
|
@@ -19786,7 +19787,7 @@ var use_tree_init_this = undefined;
|
|
19786
19787
|
return [props.data];
|
19787
19788
|
}, function (newData) {
|
19788
19789
|
var _props$async, _props$async2;
|
19789
|
-
var formatData = getFlatdata(newData, flatData.schema);
|
19790
|
+
var formatData = getFlatdata(newData[0], flatData.schema);
|
19790
19791
|
flatData.data = formatData[0];
|
19791
19792
|
flatData.schema = formatData[1];
|
19792
19793
|
if ((_props$async = props.async) !== null && _props$async !== void 0 && _props$async.callback && ((_props$async2 = props.async) === null || _props$async2 === void 0 ? void 0 : _props$async2.deepAutoOpen) === 'every') {
|
@@ -19938,7 +19939,6 @@ var use_tree_init_this = undefined;
|
|
19938
19939
|
}),
|
19939
19940
|
renderTreeNode = _useNodeAction.renderTreeNode,
|
19940
19941
|
handleTreeNodeClick = _useNodeAction.handleTreeNodeClick,
|
19941
|
-
setNodeOpened = _useNodeAction.setNodeOpened,
|
19942
19942
|
setOpen = _useNodeAction.setOpen,
|
19943
19943
|
setNodeAction = _useNodeAction.setNodeAction,
|
19944
19944
|
setSelect = _useNodeAction.setSelect,
|
@@ -19989,7 +19989,7 @@ var use_tree_init_this = undefined;
|
|
19989
19989
|
}
|
19990
19990
|
};
|
19991
19991
|
onSelected(function (newData) {
|
19992
|
-
setSelect(newData, true, props.autoOpenParentNode);
|
19992
|
+
setSelect(newData, true, props.autoOpenParentNode, true);
|
19993
19993
|
});
|
19994
19994
|
var getData = function getData() {
|
19995
19995
|
return flatData;
|
@@ -20056,7 +20056,7 @@ var use_tree_init_this = undefined;
|
|
20056
20056
|
setOpen: setOpen,
|
20057
20057
|
setChecked: setChecked,
|
20058
20058
|
setNodeAction: setNodeAction,
|
20059
|
-
setNodeOpened:
|
20059
|
+
setNodeOpened: setOpen,
|
20060
20060
|
setSelect: setSelect,
|
20061
20061
|
scrollToTop: scrollToTop,
|
20062
20062
|
asyncNodeClick: asyncNodeClick,
|
package/lib/tree/props.d.ts
CHANGED
@@ -4,7 +4,7 @@ declare const _default: (props: TreePropTypes, ctx: any, flatData: IFlatData, _r
|
|
4
4
|
renderTreeNode: (item: TreeNode, showTree?: boolean) => JSX.Element;
|
5
5
|
handleTreeNodeClick: (item: TreeNode, e: MouseEvent) => void;
|
6
6
|
deepAutoOpen: () => void;
|
7
|
-
asyncNodeClick: (item:
|
7
|
+
asyncNodeClick: (item: TreeNode) => Promise<boolean> | Promise<void | Record<string, unknown>>;
|
8
8
|
setNodeAction: (args: TreeNode | TreeNode[], action: string, value: unknown) => void;
|
9
9
|
setNodeOpened: (item: TreeNode, isOpen?: any, e?: MouseEvent, fireEmit?: boolean) => void;
|
10
10
|
setSelect: (nodes: TreeNode | TreeNode[], selected?: boolean, autoOpen?: boolean, triggerEvent?: boolean) => void;
|
@@ -1,5 +1,6 @@
|
|
1
|
+
import { TreeNode } from './props';
|
1
2
|
declare const _default: (props: any, flatData: any) => {
|
2
|
-
asyncNodeClick: (item:
|
3
|
+
asyncNodeClick: (item: TreeNode) => Promise<boolean> | Promise<void | Record<string, unknown>>;
|
3
4
|
deepAutoOpen: () => void;
|
4
5
|
};
|
5
6
|
export default _default;
|
package/lib/tree/use-search.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { SearchOption, TreePropTypes } from './props';
|
2
2
|
declare const _default: (props: TreePropTypes) => {
|
3
|
-
searchFn: (itemValue:
|
3
|
+
searchFn: (itemValue: unknown, item: unknown) => boolean;
|
4
4
|
refSearch: import("vue").Ref<string | number | boolean | SearchOption>;
|
5
5
|
isSearchActive: import("vue").ComputedRef<boolean>;
|
6
6
|
isSearchDisabled: boolean;
|
@@ -1,13 +1,16 @@
|
|
1
|
-
import { TreePropTypes } from './props';
|
1
|
+
import { TreeNode, TreePropTypes } from './props';
|
2
2
|
declare const _default: (props: TreePropTypes) => {
|
3
3
|
flatData: {
|
4
|
-
data:
|
5
|
-
|
4
|
+
data: {
|
5
|
+
[x: string]: unknown;
|
6
|
+
children?: any[];
|
7
|
+
}[];
|
8
|
+
schema: WeakMap<TreeNode, Record<string, unknown>> & Omit<WeakMap<TreeNode, Record<string, unknown>>, keyof WeakMap<any, any>>;
|
6
9
|
levelLineSchema: {};
|
7
10
|
};
|
8
|
-
asyncNodeClick: (item:
|
11
|
+
asyncNodeClick: (item: TreeNode) => Promise<boolean> | Promise<void | Record<string, unknown>>;
|
9
12
|
deepAutoOpen: () => void;
|
10
|
-
afterDataUpdate: (callFn: (d: any) =>
|
13
|
+
afterDataUpdate: (callFn: (d: any) => void) => void;
|
11
14
|
registerNextLoop: (key: string, event: any, reset?: boolean) => void;
|
12
15
|
onSelected: (event: (d: any) => void) => void;
|
13
16
|
};
|
package/lib/tree/util.d.ts
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
import { TreePropTypes } from './props';
|
1
|
+
import { TreeNode, TreePropTypes } from './props';
|
2
2
|
export type IFlatData = {
|
3
|
-
data:
|
4
|
-
schema: WeakMap<
|
3
|
+
data: TreeNode[];
|
4
|
+
schema: WeakMap<TreeNode, Record<string, unknown>>;
|
5
5
|
};
|
6
6
|
/**
|
7
7
|
* 获取当前节点显示Label
|
8
8
|
* @param item 当前节点
|
9
9
|
* @param props Props
|
10
10
|
*/
|
11
|
-
export declare const getLabel: (item:
|
11
|
+
export declare const getLabel: (item: TreeNode, props: TreePropTypes) => unknown;
|
12
12
|
/**
|
13
13
|
* 根据Props获取Tree样式设置
|
14
14
|
* @param item
|
15
15
|
* @param props
|
16
16
|
* @returns
|
17
17
|
*/
|
18
|
-
export declare const getTreeStyle: (item:
|
19
|
-
'--level-line':
|
18
|
+
export declare const getTreeStyle: (item: TreeNode, props: TreePropTypes) => {
|
19
|
+
'--level-line': unknown;
|
20
20
|
'--lineHeight': string;
|
21
21
|
'--indent': string;
|
22
22
|
'--offset-left': string;
|
@@ -27,16 +27,16 @@ export declare const getTreeStyle: (item: any, props: TreePropTypes) => {
|
|
27
27
|
* @param props
|
28
28
|
* @returns
|
29
29
|
*/
|
30
|
-
export declare const getNodeItemStyle:
|
30
|
+
export declare const getNodeItemStyle: (item: TreeNode, props: TreePropTypes, flatData: IFlatData, showTree?: boolean) => {};
|
31
31
|
/**
|
32
32
|
* 获取当前渲染节点Class List
|
33
33
|
* @param item
|
34
34
|
* @returns
|
35
35
|
*/
|
36
|
-
export declare const getNodeItemClass: (item:
|
37
|
-
[x: string]:
|
38
|
-
'is-root':
|
39
|
-
'is-open':
|
36
|
+
export declare const getNodeItemClass: (item: TreeNode, schema: WeakMap<TreeNode, Record<string, unknown>>, props: TreePropTypes, showTree?: boolean) => {
|
37
|
+
[x: string]: unknown;
|
38
|
+
'is-root': unknown;
|
39
|
+
'is-open': unknown;
|
40
40
|
'is-virtual-render': boolean;
|
41
41
|
'level-line': boolean;
|
42
42
|
};
|
@@ -45,12 +45,12 @@ export declare const getNodeItemClass: (item: any, schema: WeakMap<Object, any>,
|
|
45
45
|
* @param item
|
46
46
|
* @returns
|
47
47
|
*/
|
48
|
-
export declare const getNodeRowClass: (item:
|
49
|
-
[x: string]:
|
50
|
-
'is-checked':
|
51
|
-
'is-selected':
|
52
|
-
'node-folder':
|
53
|
-
'node-leaf':
|
48
|
+
export declare const getNodeRowClass: (item: TreeNode, schema: WeakMap<TreeNode, Record<string, unknown>>) => {
|
49
|
+
[x: string]: unknown;
|
50
|
+
'is-checked': unknown;
|
51
|
+
'is-selected': unknown;
|
52
|
+
'node-folder': unknown;
|
53
|
+
'node-leaf': unknown;
|
54
54
|
};
|
55
55
|
/**
|
56
56
|
* 根据路径更新指定节点Child-Data
|
@@ -60,7 +60,7 @@ export declare const getNodeRowClass: (item: any, schema: WeakMap<Object, any>)
|
|
60
60
|
* @param nodekey 节点key
|
61
61
|
* @param nodeValue 节点值
|
62
62
|
*/
|
63
|
-
export declare const updateTreeNode: (path: string, treeData:
|
63
|
+
export declare const updateTreeNode: (path: string, treeData: TreeNode[], childKey: string, nodekey: string, nodeValue: Record<string, unknown>[]) => void;
|
64
64
|
/**
|
65
65
|
* 根据路径更新指定节点Child-Data
|
66
66
|
* @param path 节点路径
|
@@ -68,7 +68,7 @@ export declare const updateTreeNode: (path: string, treeData: any[], childKey: s
|
|
68
68
|
* @param childKey Child Key
|
69
69
|
* @param assignVal value
|
70
70
|
*/
|
71
|
-
export declare const assignTreeNode: (path: string, treeData:
|
72
|
-
export declare const resolveNodeItem: (node:
|
71
|
+
export declare const assignTreeNode: (path: string, treeData: TreeNode[], childKey: string, assignVal: Record<string, unknown>) => void;
|
72
|
+
export declare const resolveNodeItem: (node: TreeNode) => TreeNode;
|
73
73
|
export declare const resolvePropIsMatched: (node: any, prop: any, id: any) => any;
|
74
|
-
export declare const showCheckbox: (props: TreePropTypes, node?:
|
74
|
+
export declare const showCheckbox: (props: TreePropTypes, node?: TreeNode) => any;
|