bkui-vue 0.0.1-beta.102 → 0.0.1-beta.103
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 +18 -18
- package/dist/index.esm.js +69 -48
- package/dist/index.umd.js +15 -15
- package/lib/popover2/index.js +1 -1
- package/lib/popover2/props.d.ts +3 -0
- package/lib/table/index.js +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
@@ -10934,9 +10934,9 @@ const PopoverProps = __spreadValues({
|
|
10934
10934
|
offset: PropTypes.number.def(6),
|
10935
10935
|
boundary: PropTypes.string.def(void 0),
|
10936
10936
|
zIndex: PropTypes.number.def(void 0),
|
10937
|
-
disableTeleport: PropTypes.bool.def(
|
10937
|
+
disableTeleport: PropTypes.bool.def(false),
|
10938
10938
|
autoPlacement: PropTypes.bool.def(false),
|
10939
|
-
autoVisibility: PropTypes.bool.def(
|
10939
|
+
autoVisibility: PropTypes.bool.def(true),
|
10940
10940
|
disableOutsideClick: PropTypes.bool.def(false)
|
10941
10941
|
}, EventProps$1);
|
10942
10942
|
var Reference = defineComponent({
|
@@ -15641,6 +15641,13 @@ var Component$c = defineComponent({
|
|
15641
15641
|
}
|
15642
15642
|
});
|
15643
15643
|
const BkPagination = withInstall(Component$c);
|
15644
|
+
var TableRow = defineComponent({
|
15645
|
+
name: "TableRow",
|
15646
|
+
render() {
|
15647
|
+
var _a, _b;
|
15648
|
+
return createVNode(Fragment, null, [(_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)]);
|
15649
|
+
}
|
15650
|
+
});
|
15644
15651
|
var BodyEmpty = defineComponent({
|
15645
15652
|
name: "BodyEmpty",
|
15646
15653
|
props: {
|
@@ -16289,7 +16296,7 @@ class TableRender {
|
|
16289
16296
|
this.reactiveProp = reactiveProp;
|
16290
16297
|
this.colgroups = colgroups;
|
16291
16298
|
this.plugins = new TablePlugins(props, ctx);
|
16292
|
-
this.uuid =
|
16299
|
+
this.uuid = uuid_1.v4();
|
16293
16300
|
this.events = /* @__PURE__ */ new Map();
|
16294
16301
|
}
|
16295
16302
|
get propActiveCols() {
|
@@ -16339,7 +16346,8 @@ class TableRender {
|
|
16339
16346
|
}
|
16340
16347
|
return createVNode("table", {
|
16341
16348
|
"cellpadding": 0,
|
16342
|
-
"cellspacing": 0
|
16349
|
+
"cellspacing": 0,
|
16350
|
+
"data-table-uuid": this.uuid
|
16343
16351
|
}, [this.renderColGroup(), this.renderTBody(rows)]);
|
16344
16352
|
}
|
16345
16353
|
renderTableFooter(options) {
|
@@ -16471,15 +16479,17 @@ class TableRender {
|
|
16471
16479
|
} = getFixedColumnStyleResolve();
|
16472
16480
|
return createVNode("thead", {
|
16473
16481
|
"style": rowStyle
|
16474
|
-
}, [createVNode(
|
16475
|
-
"
|
16476
|
-
|
16477
|
-
|
16478
|
-
|
16479
|
-
|
16480
|
-
|
16481
|
-
"
|
16482
|
-
|
16482
|
+
}, [createVNode(TableRow, null, {
|
16483
|
+
default: () => [createVNode("tr", null, [this.filterColgroups.map((column, index) => createVNode("th", mergeProps({
|
16484
|
+
"colspan": 1,
|
16485
|
+
"rowspan": 1,
|
16486
|
+
"class": this.getHeadColumnClass(column, index),
|
16487
|
+
"style": resolveFixedColumnStyle(column, fixedoffset),
|
16488
|
+
"onClick": () => this.handleColumnHeadClick(index)
|
16489
|
+
}, resolveEventListener(column)), [createVNode("div", {
|
16490
|
+
"class": "cell"
|
16491
|
+
}, [renderHeadCell(column, index)])]))])]
|
16492
|
+
})]);
|
16483
16493
|
}
|
16484
16494
|
renderTBody(rows) {
|
16485
16495
|
const {
|
@@ -16494,49 +16504,60 @@ class TableRender {
|
|
16494
16504
|
resolveFixedColumnStyle,
|
16495
16505
|
fixedoffset
|
16496
16506
|
} = getFixedColumnStyleResolve();
|
16497
|
-
|
16498
|
-
|
16499
|
-
"
|
16500
|
-
|
16501
|
-
|
16502
|
-
|
16503
|
-
|
16504
|
-
|
16505
|
-
|
16506
|
-
|
16507
|
-
|
16508
|
-
|
16509
|
-
|
16510
|
-
|
16511
|
-
|
16512
|
-
|
16513
|
-
|
16514
|
-
|
16515
|
-
|
16516
|
-
"
|
16517
|
-
|
16518
|
-
|
16519
|
-
|
16520
|
-
|
16521
|
-
|
16522
|
-
|
16507
|
+
const rowKey = `${this.uuid}-${row[TABLE_ROW_ATTRIBUTE.ROW_UID]}`;
|
16508
|
+
return [createVNode(TableRow, {
|
16509
|
+
"key": rowKey
|
16510
|
+
}, {
|
16511
|
+
default: () => [createVNode("tr", {
|
16512
|
+
"style": rowStyle,
|
16513
|
+
"class": rowClass,
|
16514
|
+
"onClick": (e) => this.handleRowClick(e, row, rowIndex, rows),
|
16515
|
+
"onDblclick": (e) => this.handleRowDblClick(e, row, rowIndex, rows)
|
16516
|
+
}, [this.filterColgroups.map((column, index) => {
|
16517
|
+
const cellStyle = [resolveFixedColumnStyle(column, fixedoffset), ...formatPropAsArray(this.props.cellStyle, [column, index, row, rowIndex, this])];
|
16518
|
+
const cellClass = [this.getColumnClass(column, index), ...formatPropAsArray(this.props.cellClass, [column, index, row, rowIndex, this]), {
|
16519
|
+
"expand-row": row[TABLE_ROW_ATTRIBUTE.ROW_EXPAND]
|
16520
|
+
}];
|
16521
|
+
const tdCtxClass = {
|
16522
|
+
cell: true,
|
16523
|
+
"expand-cell": column.type === "expand"
|
16524
|
+
};
|
16525
|
+
const cellKey = `__CELL_${rowIndex}_${index}`;
|
16526
|
+
return createVNode("td", {
|
16527
|
+
"class": cellClass,
|
16528
|
+
"style": cellStyle,
|
16529
|
+
"key": cellKey,
|
16530
|
+
"colspan": 1,
|
16531
|
+
"rowspan": 1
|
16532
|
+
}, [createVNode("div", {
|
16533
|
+
"class": tdCtxClass
|
16534
|
+
}, [this.renderCell(row, column, rowIndex, rows)])]);
|
16535
|
+
})])]
|
16536
|
+
}), this.renderExpandRow(row, rowClass)];
|
16523
16537
|
})]);
|
16524
16538
|
}
|
16525
16539
|
renderExpandRow(row, rowClass) {
|
16526
|
-
var _a, _b, _c;
|
16527
16540
|
const isExpand = !!row[TABLE_ROW_ATTRIBUTE.ROW_EXPAND];
|
16528
16541
|
if (isExpand) {
|
16529
16542
|
const resovledClass = [...rowClass, {
|
16530
16543
|
row_expend: true
|
16531
16544
|
}];
|
16532
|
-
|
16533
|
-
|
16534
|
-
|
16535
|
-
|
16536
|
-
|
16537
|
-
|
16538
|
-
|
16539
|
-
|
16545
|
+
const rowKey = `${this.uuid}-${row[TABLE_ROW_ATTRIBUTE.ROW_UID]}_expand`;
|
16546
|
+
return createVNode(TableRow, {
|
16547
|
+
"key": rowKey
|
16548
|
+
}, {
|
16549
|
+
default: () => {
|
16550
|
+
var _a, _b, _c;
|
16551
|
+
return [createVNode("tr", {
|
16552
|
+
"class": resovledClass
|
16553
|
+
}, [createVNode("td", {
|
16554
|
+
"colspan": this.filterColgroups.length,
|
16555
|
+
"rowspan": 1
|
16556
|
+
}, [(_c = (_b = (_a = this.context.slots).expandRow) == null ? void 0 : _b.call(_a, row)) != null ? _c : createVNode("div", {
|
16557
|
+
"class": "expand-cell-ctx"
|
16558
|
+
}, [createTextVNode("Expand Row")])])])];
|
16559
|
+
}
|
16560
|
+
});
|
16540
16561
|
}
|
16541
16562
|
}
|
16542
16563
|
handleRowClick(e, row, index, rows) {
|