bkui-vue 0.0.1-beta.129 → 0.0.1-beta.131
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 +32 -32
- package/dist/index.esm.js +53 -53
- package/dist/index.umd.js +34 -34
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/index.d.ts +48 -1
- package/lib/alert/index.d.ts +63 -1
- package/lib/animate-number/index.d.ts +28 -1
- package/lib/backtop/index.d.ts +61 -1
- package/lib/badge/index.d.ts +103 -1
- package/lib/button/button.less +1 -1
- package/lib/card/index.d.ts +111 -1
- package/lib/code-diff/index.d.ts +51 -1
- package/lib/collapse/index.d.ts +64 -1
- package/lib/date-picker/index.d.ts +312 -1
- package/lib/dialog/index.d.ts +317 -1
- package/lib/divider/index.d.ts +49 -1
- package/lib/exception/index.d.ts +27 -1
- package/lib/fixed-navbar/index.d.ts +49 -1
- package/lib/input/index.d.ts +226 -1
- package/lib/link/index.d.ts +59 -1
- package/lib/navigation/index.d.ts +119 -1
- package/lib/pagination/index.d.ts +158 -1
- package/lib/popover/index.d.ts +166 -1
- package/lib/popover2/index.d.ts +210 -1
- package/lib/process/index.d.ts +75 -1
- package/lib/progress/index.d.ts +169 -1
- package/lib/rate/index.d.ts +33 -1
- package/lib/resize-layout/index.d.ts +128 -1
- package/lib/shared/index.d.ts +3 -1
- package/lib/sideslider/index.d.ts +206 -1
- package/lib/slider/index.d.ts +175 -1
- package/lib/steps/index.d.ts +96 -1
- package/lib/swiper/index.d.ts +66 -1
- package/lib/switcher/index.d.ts +114 -1
- package/lib/table/const.d.ts +10 -1
- package/lib/table/index.d.ts +230 -1
- package/lib/table/index.js +1 -1
- package/lib/table/plugins/head-filter.css +68 -0
- package/lib/table/plugins/settings.css +2 -2
- package/lib/table/plugins/settings.less +2 -2
- package/lib/table/plugins/settings.variable.css +2 -2
- package/lib/table/table.css +2 -2
- package/lib/table/table.d.ts +6 -2
- package/lib/table/table.variable.css +2 -2
- package/lib/table/utils.d.ts +1 -1
- package/lib/tag/index.d.ts +85 -1
- package/lib/tag-input/index.d.ts +374 -1
- package/lib/timeline/index.d.ts +40 -1
- package/lib/transfer/index.d.ts +136 -1
- package/lib/tree/index.d.ts +227 -1
- package/lib/virtual-render/index.d.ts +256 -1
- package/lib/volar.components.d.ts +6 -3
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
@@ -10759,7 +10759,7 @@ var isEventSupported_1 = isEventSupported$1;
|
|
10759
10759
|
var UserAgent_DEPRECATED = UserAgent_DEPRECATED_1;
|
10760
10760
|
var isEventSupported = isEventSupported_1;
|
10761
10761
|
var PIXEL_STEP = 10;
|
10762
|
-
var LINE_HEIGHT = 40;
|
10762
|
+
var LINE_HEIGHT$1 = 40;
|
10763
10763
|
var PAGE_HEIGHT = 800;
|
10764
10764
|
function normalizeWheel$1(event) {
|
10765
10765
|
var sX = 0, sY = 0, pX = 0, pY = 0;
|
@@ -10789,8 +10789,8 @@ function normalizeWheel$1(event) {
|
|
10789
10789
|
}
|
10790
10790
|
if ((pX || pY) && event.deltaMode) {
|
10791
10791
|
if (event.deltaMode == 1) {
|
10792
|
-
pX *= LINE_HEIGHT;
|
10793
|
-
pY *= LINE_HEIGHT;
|
10792
|
+
pX *= LINE_HEIGHT$1;
|
10793
|
+
pY *= LINE_HEIGHT$1;
|
10794
10794
|
} else {
|
10795
10795
|
pX *= PAGE_HEIGHT;
|
10796
10796
|
pY *= PAGE_HEIGHT;
|
@@ -15299,11 +15299,17 @@ const TABLE_ROW_ATTRIBUTE = {
|
|
15299
15299
|
ROW_EXPAND: "__row_expand"
|
15300
15300
|
};
|
15301
15301
|
const SCROLLY_WIDTH = 4;
|
15302
|
+
const LINE_HEIGHT = 42;
|
15302
15303
|
const SETTING_SIZE = {
|
15303
|
-
large:
|
15304
|
-
|
15305
|
-
small:
|
15306
|
-
};
|
15304
|
+
large: 78,
|
15305
|
+
medium: 60,
|
15306
|
+
small: 42
|
15307
|
+
};
|
15308
|
+
const DEFAULT_SIZE_LIST = [
|
15309
|
+
{ value: "small", label: "\u5C0F", height: SETTING_SIZE.small },
|
15310
|
+
{ value: "medium", label: "\u4E2D", height: SETTING_SIZE.medium },
|
15311
|
+
{ value: "large", label: "\u5927", height: SETTING_SIZE.large }
|
15312
|
+
];
|
15307
15313
|
const resolvePaginationOption = (propPagination, defVal) => {
|
15308
15314
|
if (!!propPagination) {
|
15309
15315
|
if (typeof propPagination === "object") {
|
@@ -15456,13 +15462,13 @@ const tableProps = {
|
|
15456
15462
|
activeColumn: PropTypes.oneOfType([PropTypes.number.def(-1), PropTypes.arrayOf(PropTypes.number.def(-1))]),
|
15457
15463
|
columnPick: PropTypes.commonType(["multi", "single", "disabled"], "columnPick").def("disabled"),
|
15458
15464
|
height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).def("auto"),
|
15459
|
-
minHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).def(
|
15465
|
+
minHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).def(LINE_HEIGHT * 2),
|
15460
15466
|
maxHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).def("auto"),
|
15461
|
-
rowHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.func]).def(
|
15462
|
-
headHeight: PropTypes.number.def(
|
15467
|
+
rowHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.func]).def(LINE_HEIGHT),
|
15468
|
+
headHeight: PropTypes.number.def(LINE_HEIGHT),
|
15463
15469
|
showHead: PropTypes.bool.def(true),
|
15464
15470
|
thead: PropTypes.shape({
|
15465
|
-
height: PropTypes.number.def(
|
15471
|
+
height: PropTypes.number.def(LINE_HEIGHT),
|
15466
15472
|
isShow: PropTypes.bool.def(true),
|
15467
15473
|
cellFn: PropTypes.func.def(void 0)
|
15468
15474
|
}),
|
@@ -15480,7 +15486,7 @@ const tableProps = {
|
|
15480
15486
|
})),
|
15481
15487
|
checked: PropTypes.arrayOf(PropTypes.string),
|
15482
15488
|
limit: PropTypes.number.def(0),
|
15483
|
-
size: PropTypes.size(["small", "
|
15489
|
+
size: PropTypes.size(["small", "medium", "large"]).def("small"),
|
15484
15490
|
sizeList: PropTypes.shape([])
|
15485
15491
|
}),
|
15486
15492
|
PropTypes.bool
|
@@ -16153,11 +16159,11 @@ const getRowKey = (item, props, index) => {
|
|
16153
16159
|
}
|
16154
16160
|
return uuid_1.v4();
|
16155
16161
|
};
|
16156
|
-
const hasRootScrollY = (root, querySelector) => {
|
16162
|
+
const hasRootScrollY = (root, querySelector, offsetHeight = 0) => {
|
16157
16163
|
if (root) {
|
16158
16164
|
const tableBody = root.querySelector(querySelector);
|
16159
16165
|
if (tableBody) {
|
16160
|
-
return tableBody.offsetHeight > root.offsetHeight;
|
16166
|
+
return tableBody.offsetHeight > root.offsetHeight - offsetHeight;
|
16161
16167
|
}
|
16162
16168
|
}
|
16163
16169
|
return false;
|
@@ -16169,7 +16175,7 @@ var HeadFilter = defineComponent({
|
|
16169
16175
|
name: "HeadFilter",
|
16170
16176
|
props: {
|
16171
16177
|
column: PropTypes.any.def({}),
|
16172
|
-
height: PropTypes.number.def(
|
16178
|
+
height: PropTypes.number.def(LINE_HEIGHT)
|
16173
16179
|
},
|
16174
16180
|
emits: ["change"],
|
16175
16181
|
setup(props, {
|
@@ -16344,30 +16350,17 @@ var Settings = defineComponent({
|
|
16344
16350
|
})),
|
16345
16351
|
checked: PropTypes.arrayOf(PropTypes.string),
|
16346
16352
|
limit: PropTypes.number.def(0),
|
16347
|
-
size: PropTypes.size(["small", "
|
16353
|
+
size: PropTypes.size(["small", "medium", "large"]).def("small"),
|
16348
16354
|
sizeList: PropTypes.shape([])
|
16349
16355
|
}), PropTypes.bool]).def(false),
|
16350
16356
|
columns: PropTypes.array.def([]),
|
16351
|
-
rowHeight: PropTypes.number.def(
|
16357
|
+
rowHeight: PropTypes.number.def(LINE_HEIGHT)
|
16352
16358
|
},
|
16353
16359
|
emits: ["change"],
|
16354
16360
|
setup(props, {
|
16355
16361
|
emit
|
16356
16362
|
}) {
|
16357
|
-
|
16358
|
-
const defaultSizeList = [{
|
16359
|
-
value: "small",
|
16360
|
-
label: "\u5C0F",
|
16361
|
-
height: SETTING_SIZE.small
|
16362
|
-
}, {
|
16363
|
-
value: "default",
|
16364
|
-
label: "\u4E2D",
|
16365
|
-
height: props.rowHeight
|
16366
|
-
}, {
|
16367
|
-
value: "large",
|
16368
|
-
label: "\u5927",
|
16369
|
-
height: SETTING_SIZE.large
|
16370
|
-
}];
|
16363
|
+
const defaultSizeList = DEFAULT_SIZE_LIST;
|
16371
16364
|
const checkAll = ref(false);
|
16372
16365
|
const isShow = ref(false);
|
16373
16366
|
const localSettings = typeof props.settings === "boolean" ? ref({
|
@@ -16376,10 +16369,10 @@ var Settings = defineComponent({
|
|
16376
16369
|
})),
|
16377
16370
|
checked: [],
|
16378
16371
|
limit: 0,
|
16379
|
-
size: "
|
16372
|
+
size: "small",
|
16380
16373
|
sizeList: defaultSizeList
|
16381
16374
|
}) : ref(props.settings);
|
16382
|
-
const activeSize = ref(localSettings.value.size || "
|
16375
|
+
const activeSize = ref(localSettings.value.size || "small");
|
16383
16376
|
const activeHeight = ref(props.rowHeight);
|
16384
16377
|
const checkedFields = ref(localSettings.value.checked);
|
16385
16378
|
const className = resolveClassName("table-settings");
|
@@ -16426,10 +16419,10 @@ var Settings = defineComponent({
|
|
16426
16419
|
}
|
16427
16420
|
};
|
16428
16421
|
const isLimit = computed(() => {
|
16429
|
-
var
|
16430
|
-
return ((
|
16422
|
+
var _a;
|
16423
|
+
return ((_a = localSettings.value.limit) != null ? _a : 0) > 0;
|
16431
16424
|
});
|
16432
|
-
const sizeList =
|
16425
|
+
const sizeList = localSettings.value.sizeList || defaultSizeList;
|
16433
16426
|
const isFiledDisabled = computed(() => isLimit.value && (localSettings.value.limit ? localSettings.value.limit : 0) <= checkedFields.value.length);
|
16434
16427
|
const isItemReadonly = (item, index) => item.disabled || isFiledDisabled.value && !checkedFields.value.includes(resolvePropVal(item, "field", [item, index]));
|
16435
16428
|
const handleSizeItemClick = (item) => {
|
@@ -16438,7 +16431,7 @@ var Settings = defineComponent({
|
|
16438
16431
|
};
|
16439
16432
|
const getItemClass = (item) => ({
|
16440
16433
|
"line-size": true,
|
16441
|
-
"is-
|
16434
|
+
"is-medium": activeSize.value === "medium",
|
16442
16435
|
active: item.value === activeSize.value
|
16443
16436
|
});
|
16444
16437
|
const buttonStyle = {
|
@@ -16547,7 +16540,7 @@ var Settings = defineComponent({
|
|
16547
16540
|
}
|
16548
16541
|
});
|
16549
16542
|
var useFixedColumn = (props, colgroups, hasScrollY) => {
|
16550
|
-
const footHeight = computed(() => props.pagination && props.data.length ?
|
16543
|
+
const footHeight = computed(() => props.pagination && props.data.length ? LINE_HEIGHT : 0);
|
16551
16544
|
const resolveColumnClass = (column) => ({
|
16552
16545
|
column_fixed: !!column.fixed,
|
16553
16546
|
column_fixed_left: column.fixed !== "right",
|
@@ -17193,11 +17186,12 @@ const useClass = (props, root, reactiveProp, pageData) => {
|
|
17193
17186
|
return defaultValue;
|
17194
17187
|
};
|
17195
17188
|
const contentStyle = reactive({});
|
17189
|
+
const getHeadHeight = () => props.showHead ? resolvePropHeight(props.headHeight, LINE_HEIGHT) : 0;
|
17196
17190
|
const resolveContentStyle = () => {
|
17197
17191
|
const resolveHeight = resolvePropHeight(props.height, autoHeight.value);
|
17198
|
-
const resolveHeadHeight =
|
17192
|
+
const resolveHeadHeight = getHeadHeight();
|
17199
17193
|
const resolveMinHeight = resolvePropHeight(props.minHeight, autoHeight.value);
|
17200
|
-
const resolveFooterHeight = props.pagination && props.data.length ?
|
17194
|
+
const resolveFooterHeight = props.pagination && props.data.length ? LINE_HEIGHT : 0;
|
17201
17195
|
const contentHeight = resolveHeight - resolveHeadHeight - resolveFooterHeight;
|
17202
17196
|
const height = props.height !== "auto" ? `${contentHeight}px` : false;
|
17203
17197
|
const minHeight = resolveMinHeight - resolveHeadHeight - resolveFooterHeight;
|
@@ -17220,7 +17214,8 @@ const useClass = (props, root, reactiveProp, pageData) => {
|
|
17220
17214
|
};
|
17221
17215
|
const updateBorderClass = (root2) => {
|
17222
17216
|
const querySelector = props.virtualEnabled ? `.${resolveClassName("virtual-section")}` : `.${resolveClassName("table-body-content")}`;
|
17223
|
-
|
17217
|
+
const rootBody = root2.querySelector(".bk-table-body");
|
17218
|
+
hasScrollY.value = hasRootScrollY(rootBody, querySelector, 0);
|
17224
17219
|
};
|
17225
17220
|
const getColumnsWidthOffsetWidth = () => {
|
17226
17221
|
let offsetWidth = 0;
|
@@ -17251,18 +17246,19 @@ const useInit = (props) => {
|
|
17251
17246
|
var _a, _b;
|
17252
17247
|
const colgroups = reactive([]);
|
17253
17248
|
const updateColGroups = () => {
|
17254
|
-
|
17255
|
-
colgroups.splice(0, colgroups.length, ...((_a2 = props.columns) != null ? _a2 : []).map((col) => __spreadProps(__spreadValues({}, col), {
|
17249
|
+
colgroups.splice(0, colgroups.length, ...(props.columns || []).map((col) => __spreadProps(__spreadValues({}, col), {
|
17256
17250
|
calcWidth: null,
|
17257
17251
|
resizeWidth: null,
|
17258
17252
|
listeners: /* @__PURE__ */ new Map()
|
17259
17253
|
})));
|
17260
17254
|
};
|
17255
|
+
const { dragOffsetXStyle, dragOffsetX, resetResizeEvents, registerResizeEvent } = useColumnResize(colgroups, true);
|
17256
|
+
const { activeColumns } = useActiveColumns(props);
|
17261
17257
|
watch(() => props.columns, () => {
|
17262
17258
|
updateColGroups();
|
17259
|
+
resetResizeEvents();
|
17260
|
+
registerResizeEvent();
|
17263
17261
|
}, { immediate: true, deep: true });
|
17264
|
-
const { dragOffsetXStyle, dragOffsetX } = useColumnResize(colgroups, true);
|
17265
|
-
const { activeColumns } = useActiveColumns(props);
|
17266
17262
|
const reactiveSchema = reactive({
|
17267
17263
|
rowActions: /* @__PURE__ */ new Map(),
|
17268
17264
|
scrollTranslateY: 0,
|
@@ -17419,19 +17415,22 @@ var Component$b = defineComponent({
|
|
17419
17415
|
index
|
17420
17416
|
});
|
17421
17417
|
}).on(EVENTS$1.ON_SETTING_CHANGE, (args) => {
|
17422
|
-
var _a, _b;
|
17423
17418
|
const {
|
17424
17419
|
checked = [],
|
17425
17420
|
size,
|
17426
17421
|
height
|
17427
17422
|
} = args;
|
17428
|
-
|
17429
|
-
|
17430
|
-
|
17431
|
-
|
17432
|
-
checked,
|
17433
|
-
|
17434
|
-
|
17423
|
+
nextTick(() => {
|
17424
|
+
var _a, _b;
|
17425
|
+
updateBorderClass(root.value);
|
17426
|
+
const offset2 = getColumnsWidthOffsetWidth();
|
17427
|
+
checked.length && resolveColumnWidth(root.value, colgroups, 20, offset2);
|
17428
|
+
(_b = (_a = refVirtualRender.value) == null ? void 0 : _a.reset) == null ? void 0 : _b.call(_a);
|
17429
|
+
ctx.emit(EMITEVENTS.SETTING_CHANGE, {
|
17430
|
+
checked,
|
17431
|
+
size,
|
17432
|
+
height
|
17433
|
+
});
|
17435
17434
|
});
|
17436
17435
|
}).on(EVENTS$1.ON_ROW_EXPAND_CLICK, (args) => {
|
17437
17436
|
const {
|
@@ -17479,6 +17478,7 @@ var Component$b = defineComponent({
|
|
17479
17478
|
if (props.height === "100%" || props.height === "auto") {
|
17480
17479
|
resetTableHeight(root.value);
|
17481
17480
|
}
|
17481
|
+
updateBorderClass(root.value);
|
17482
17482
|
const offset2 = getColumnsWidthOffsetWidth();
|
17483
17483
|
resolveColumnWidth(root.value, colgroups, 20, offset2);
|
17484
17484
|
}, 60, true);
|