bkui-vue 1.0.3-beta.65.dialog.1 → 1.0.3-beta.66
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 +69 -69
- package/dist/index.esm.js +18967 -19760
- package/dist/index.umd.js +69 -69
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/checkbox/index.js +4 -4
- package/lib/components.d.ts +0 -1
- package/lib/components.js +0 -1
- package/lib/dialog/dialog.css +77 -139
- package/lib/dialog/dialog.d.ts +121 -41
- package/lib/dialog/dialog.less +65 -10
- package/lib/dialog/dialog.variable.css +77 -139
- package/lib/dialog/index.d.ts +272 -105
- package/lib/dialog/index.js +100 -91
- package/lib/dialog/props.d.ts +48 -8
- package/lib/form/index.js +3 -1
- package/lib/info-box/index.d.ts +2 -2
- package/lib/info-box/index.js +173 -312
- package/lib/info-box/info-box.css +7 -63
- package/lib/info-box/info-box.d.ts +16 -17
- package/lib/info-box/info-box.less +14 -76
- package/lib/info-box/info-box.variable.css +7 -63
- package/lib/modal/index.d.ts +325 -45
- package/lib/modal/index.js +666 -187
- package/lib/modal/modal.css +31 -131
- package/lib/modal/modal.d.ts +126 -16
- package/lib/modal/modal.less +28 -84
- package/lib/modal/modal.variable.css +31 -131
- package/lib/modal/props.mixin.d.ts +53 -2
- package/lib/radio/index.js +5 -5
- package/lib/search-select/index.d.ts +54 -10
- package/lib/search-select/index.js +119 -63
- package/lib/search-select/input.d.ts +8 -4
- package/lib/search-select/search-select.d.ts +22 -5
- package/lib/search-select/selected.d.ts +11 -3
- package/lib/search-select/utils.d.ts +7 -6
- package/lib/select/index.d.ts +33 -0
- package/lib/select/index.js +5 -2
- package/lib/select/select.css +19 -5
- package/lib/select/select.d.ts +11 -0
- package/lib/select/select.less +26 -6
- package/lib/select/select.variable.css +19 -5
- package/lib/select/selectTagInput.d.ts +7 -0
- package/lib/shared/index.d.ts +1 -0
- package/lib/shared/index.js +48 -1
- package/lib/shared/mask.d.ts +11 -0
- package/lib/sideslider/index.d.ts +222 -31
- package/lib/sideslider/index.js +36 -49
- package/lib/sideslider/sideslider.css +42 -4
- package/lib/sideslider/sideslider.d.ts +105 -14
- package/lib/sideslider/sideslider.less +58 -13
- package/lib/sideslider/sideslider.variable.css +42 -4
- package/lib/table/const.d.ts +1 -1
- package/lib/table/index.d.ts +0 -23
- package/lib/table/index.js +47 -184
- package/lib/table/plugins/use-fixed-column.d.ts +1 -1
- package/lib/table/plugins/use-pagination.d.ts +1 -3
- package/lib/table/props.d.ts +0 -8
- package/lib/table/table.css +42 -97
- package/lib/table/table.d.ts +0 -11
- package/lib/table/table.less +58 -43
- package/lib/table/table.variable.css +42 -97
- package/lib/table/use-attributes.d.ts +0 -1
- package/lib/table/use-render.d.ts +1 -1
- package/lib/table-column/index.js +2 -6
- package/lib/tree/index.d.ts +0 -23
- package/lib/tree/index.js +3 -9
- package/lib/tree/props.d.ts +0 -8
- package/lib/tree/tree.css +2 -75
- package/lib/tree/tree.d.ts +0 -11
- package/lib/tree/tree.variable.css +2 -75
- package/lib/virtual-render/index.d.ts +0 -27
- package/lib/virtual-render/index.js +63 -264
- package/lib/virtual-render/props.d.ts +0 -16
- package/lib/virtual-render/use-fix-top.d.ts +7 -2
- package/lib/virtual-render/v-virtual-render.d.ts +1 -2
- package/lib/virtual-render/virtual-render.css +2 -75
- package/lib/virtual-render/virtual-render.d.ts +0 -13
- package/lib/virtual-render/virtual-render.less +3 -3
- package/lib/virtual-render/virtual-render.variable.css +2 -75
- package/package.json +1 -1
- package/lib/info-box/render-component.d.ts +0 -4
- package/lib/modal/mask.d.ts +0 -6
- package/lib/scrollbar/index.d.ts +0 -14
- package/lib/scrollbar/index.js +0 -18740
- package/lib/scrollbar/scrollbar-core/can-use-dom.d.ts +0 -2
- package/lib/scrollbar/scrollbar-core/helpers.d.ts +0 -5
- package/lib/scrollbar/scrollbar-core/index.d.ts +0 -236
- package/lib/scrollbar/scrollbar-core/mouse-wheel.d.ts +0 -5
- package/lib/scrollbar/scrollbar-core/scrollbar-width.d.ts +0 -1
- package/lib/scrollbar/scrollbar.css +0 -74
- package/lib/scrollbar/scrollbar.less +0 -93
- package/lib/scrollbar/scrollbar.variable.css +0 -203
- package/lib/table/plugins/use-shift-key.d.ts +0 -11
- package/lib/virtual-render/use-scrollbar.d.ts +0 -23
package/lib/table/index.js
CHANGED
@@ -122,7 +122,7 @@ function defineProperty_defineProperty(obj, key, value) {
|
|
122
122
|
;// CONCATENATED MODULE: external "vue"
|
123
123
|
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
124
124
|
var external_vue_y = x => () => x
|
125
|
-
const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createTextVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["isProxy"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isProxy, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["
|
125
|
+
const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createTextVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["isProxy"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isProxy, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["provide"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.provide, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["toRaw"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRaw, ["toRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRef, ["unref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.unref, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch, ["watchEffect"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watchEffect });
|
126
126
|
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/native.js
|
127
127
|
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
128
128
|
/* harmony default export */ const esm_browser_native = ({
|
@@ -295,7 +295,7 @@ var COLUMN_ATTRIBUTE = {
|
|
295
295
|
/**
|
296
296
|
* Y 轴滚动条宽度
|
297
297
|
*/
|
298
|
-
var SCROLLY_WIDTH =
|
298
|
+
var SCROLLY_WIDTH = 6;
|
299
299
|
/**
|
300
300
|
* 默认行高
|
301
301
|
*/
|
@@ -723,11 +723,7 @@ var tableProps = {
|
|
723
723
|
/**
|
724
724
|
* 是否支持行拖拽排序
|
725
725
|
*/
|
726
|
-
rowDraggable: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.func, shared_namespaceObject.PropTypes.bool, shared_namespaceObject.PropTypes.object]).def(false)
|
727
|
-
/**
|
728
|
-
* 是否支持shift键多行选择
|
729
|
-
*/
|
730
|
-
shiftMultiChecked: shared_namespaceObject.PropTypes.bool.def(false)
|
726
|
+
rowDraggable: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.func, shared_namespaceObject.PropTypes.bool, shared_namespaceObject.PropTypes.object]).def(false)
|
731
727
|
};
|
732
728
|
;// CONCATENATED MODULE: ../../packages/table/src/components/table-column.tsx
|
733
729
|
|
@@ -1500,6 +1496,7 @@ function _toConsumableArray(arr) {
|
|
1500
1496
|
*/
|
1501
1497
|
|
1502
1498
|
|
1499
|
+
|
1503
1500
|
/**
|
1504
1501
|
* 固定列Hooks
|
1505
1502
|
*/
|
@@ -1586,12 +1583,13 @@ function _toConsumableArray(arr) {
|
|
1586
1583
|
* @returns
|
1587
1584
|
*/
|
1588
1585
|
var resolveFixedColumnStyle = function resolveFixedColumnStyle(column) {
|
1586
|
+
var hasScrollY = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
1589
1587
|
if (!column.fixed || isHiddenColumn(column)) {
|
1590
1588
|
return {};
|
1591
1589
|
}
|
1592
1590
|
var fixedOffset = {
|
1593
1591
|
left: 0,
|
1594
|
-
right: -1
|
1592
|
+
right: hasScrollY ? SCROLLY_WIDTH : -1
|
1595
1593
|
};
|
1596
1594
|
var fixedPos = resolveFixColPos(column);
|
1597
1595
|
fixedOffset[fixedPos] = getPreColumnOffset(fixedPos, column, fixedOffset[fixedPos]);
|
@@ -3201,7 +3199,6 @@ const loading_less_namespaceObject = loading_less_x({ });
|
|
3201
3199
|
return refScrollLoading.value !== null && (typeof refScrollLoading.value === 'boolean' && refScrollLoading.value || typeof_typeof(refScrollLoading.value) === 'object');
|
3202
3200
|
});
|
3203
3201
|
var renderScrollLoading = function renderScrollLoading() {
|
3204
|
-
var _ctx$slots$fixedBotto3, _ctx$slots$fixedBotto4, _ctx$slots2;
|
3205
3202
|
if (isRender.value) {
|
3206
3203
|
var _ctx$slots$fixedBotto, _ctx$slots$fixedBotto2, _ctx$slots;
|
3207
3204
|
var _getLoadingOption = getLoadingOption(),
|
@@ -3220,7 +3217,6 @@ const loading_less_namespaceObject = loading_less_x({ });
|
|
3220
3217
|
indicator: indicator
|
3221
3218
|
}, null);
|
3222
3219
|
}
|
3223
|
-
return (_ctx$slots$fixedBotto3 = (_ctx$slots$fixedBotto4 = (_ctx$slots2 = ctx.slots).fixedBottom) === null || _ctx$slots$fixedBotto4 === void 0 ? void 0 : _ctx$slots$fixedBotto4.call(_ctx$slots2)) !== null && _ctx$slots$fixedBotto3 !== void 0 ? _ctx$slots$fixedBotto3 : null;
|
3224
3220
|
};
|
3225
3221
|
return {
|
3226
3222
|
renderScrollLoading: renderScrollLoading
|
@@ -3308,9 +3304,9 @@ var resolvePaginationOption = function resolvePaginationOption(propPagination, d
|
|
3308
3304
|
if (!props.pagination) {
|
3309
3305
|
return;
|
3310
3306
|
}
|
3311
|
-
localPagination.value = props.remotePagination ? pagination : use_pagination_objectSpread({
|
3307
|
+
localPagination.value = props.remotePagination ? pagination : use_pagination_objectSpread(use_pagination_objectSpread({}, pagination), {}, {
|
3312
3308
|
count: indexData.length
|
3313
|
-
}
|
3309
|
+
});
|
3314
3310
|
};
|
3315
3311
|
/**
|
3316
3312
|
* 重置当前分页开始位置 & 结束位置
|
@@ -3375,35 +3371,35 @@ var resolvePaginationOption = function resolvePaginationOption(propPagination, d
|
|
3375
3371
|
}
|
3376
3372
|
pageData.length = 0;
|
3377
3373
|
pageData.push.apply(pageData, _toConsumableArray(sourceData.slice(startIndex.value, endIndex.value)));
|
3378
|
-
|
3379
|
-
multiFilter(filterFn, pageData);
|
3380
|
-
} else {
|
3381
|
-
filter(pageData, filterFn);
|
3382
|
-
}
|
3374
|
+
filter(pageData, filterFn);
|
3383
3375
|
sort(pageData, sortFn, column, type, sortScope);
|
3384
3376
|
resolveLocalPagination();
|
3385
3377
|
};
|
3386
3378
|
var resolvePageDataBySortList = function resolvePageDataBySortList(multiCol) {
|
3387
3379
|
resolvePageData(null, null, null, null, null, multiCol);
|
3388
3380
|
};
|
3389
|
-
var
|
3390
|
-
|
3391
|
-
};
|
3392
|
-
var multiFilter = function multiFilter(filterFnList, origin) {
|
3393
|
-
var sourceData = (origin !== null && origin !== void 0 ? origin : indexData).slice();
|
3381
|
+
var multiFilter = function multiFilter(filterFnList) {
|
3382
|
+
var sourceData = indexData.slice();
|
3394
3383
|
var target = filterFnList.reduce(function (result, fn) {
|
3395
3384
|
return filter(result, fn);
|
3396
3385
|
}, sourceData);
|
3397
3386
|
pageData.length = 0;
|
3398
3387
|
pageData.push.apply(pageData, _toConsumableArray(getRawData(target)));
|
3399
3388
|
};
|
3400
|
-
var handlePaginationChange = function handlePaginationChange(
|
3389
|
+
var handlePaginationChange = function handlePaginationChange() {
|
3401
3390
|
pagination = resolvePaginationOption(props.pagination, pagination);
|
3402
3391
|
resolveLocalPagination();
|
3403
3392
|
resetStartEndIndex();
|
3404
|
-
resolvePageData(
|
3393
|
+
resolvePageData();
|
3405
3394
|
};
|
3406
3395
|
handlePaginationChange();
|
3396
|
+
(0,external_vue_namespaceObject.watch)(function () {
|
3397
|
+
return [props.pagination];
|
3398
|
+
}, function () {
|
3399
|
+
handlePaginationChange();
|
3400
|
+
}, {
|
3401
|
+
deep: true
|
3402
|
+
});
|
3407
3403
|
return {
|
3408
3404
|
pageData: pageData,
|
3409
3405
|
indexData: indexData,
|
@@ -3411,9 +3407,7 @@ var resolvePaginationOption = function resolvePaginationOption(propPagination, d
|
|
3411
3407
|
resolvePageData: resolvePageData,
|
3412
3408
|
resolveIndexData: resolveIndexData,
|
3413
3409
|
resolvePageDataBySortList: resolvePageDataBySortList,
|
3414
|
-
handlePaginationChange: handlePaginationChange,
|
3415
3410
|
resetStartEndIndex: resetStartEndIndex,
|
3416
|
-
getCurrentPageData: getCurrentPageData,
|
3417
3411
|
multiFilter: multiFilter,
|
3418
3412
|
sort: sort
|
3419
3413
|
};
|
@@ -3492,8 +3486,6 @@ var tableSchemaResponse = function tableSchemaResponse(props) {
|
|
3492
3486
|
localPagination = _usePagination.localPagination,
|
3493
3487
|
resolvePageData = _usePagination.resolvePageData,
|
3494
3488
|
resolvePageDataBySortList = _usePagination.resolvePageDataBySortList,
|
3495
|
-
handlePaginationChange = _usePagination.handlePaginationChange,
|
3496
|
-
getCurrentPageData = _usePagination.getCurrentPageData,
|
3497
3489
|
multiFilter = _usePagination.multiFilter,
|
3498
3490
|
sort = _usePagination.sort,
|
3499
3491
|
resetStartEndIndex = _usePagination.resetStartEndIndex,
|
@@ -3616,15 +3608,13 @@ var tableSchemaResponse = function tableSchemaResponse(props) {
|
|
3616
3608
|
var getColumnFilterFn = function getColumnFilterFn(col) {
|
3617
3609
|
return getColumnAttribute(col, COLUMN_ATTRIBUTE.COL_FILTER_FN);
|
3618
3610
|
};
|
3619
|
-
var
|
3620
|
-
|
3611
|
+
var filter = function filter() {
|
3612
|
+
var filterFnList = formatData.columns.filter(function (col) {
|
3621
3613
|
return !isHiddenColumn(col) && typeof getColumnFilterFn(col) === 'function';
|
3622
3614
|
}).map(function (col) {
|
3623
3615
|
return getColumnFilterFn(col);
|
3624
3616
|
});
|
3625
|
-
|
3626
|
-
var filter = function filter() {
|
3627
|
-
multiFilter(getFilterFnList(), getCurrentPageData());
|
3617
|
+
multiFilter(filterFnList);
|
3628
3618
|
};
|
3629
3619
|
/**
|
3630
3620
|
* 按照指定列排序
|
@@ -4085,13 +4075,6 @@ var tableSchemaResponse = function tableSchemaResponse(props) {
|
|
4085
4075
|
var setIndexData = function setIndexData() {
|
4086
4076
|
return resolveIndexData();
|
4087
4077
|
};
|
4088
|
-
(0,external_vue_namespaceObject.watch)(function () {
|
4089
|
-
return [props.pagination];
|
4090
|
-
}, function () {
|
4091
|
-
handlePaginationChange(getFilterFnList());
|
4092
|
-
}, {
|
4093
|
-
deep: true
|
4094
|
-
});
|
4095
4078
|
return {
|
4096
4079
|
formatColumns: formatColumns,
|
4097
4080
|
formatDataSchema: formatDataSchema,
|
@@ -4129,8 +4112,7 @@ var tableSchemaResponse = function tableSchemaResponse(props) {
|
|
4129
4112
|
pageData: pageData,
|
4130
4113
|
localPagination: localPagination,
|
4131
4114
|
formatData: formatData,
|
4132
|
-
setIndexData: setIndexData
|
4133
|
-
getFilterFnList: getFilterFnList
|
4115
|
+
setIndexData: setIndexData
|
4134
4116
|
};
|
4135
4117
|
};
|
4136
4118
|
/* harmony default export */ const use_attributes = (tableSchemaResponse);
|
@@ -5622,10 +5604,10 @@ function head_filter_isSlot(s) {
|
|
5622
5604
|
if (scope.data.length) {
|
5623
5605
|
return scope.data.map(function (item) {
|
5624
5606
|
return (0,external_vue_namespaceObject.createVNode)("div", {
|
5625
|
-
"class": "list-item"
|
5626
|
-
"key": item.value
|
5607
|
+
"class": "list-item"
|
5627
5608
|
}, [(0,external_vue_namespaceObject.createVNode)(checkbox_namespaceObject["default"], {
|
5628
5609
|
"label": item.value,
|
5610
|
+
"key": item.$index,
|
5629
5611
|
"immediateEmitChange": false,
|
5630
5612
|
"checked": state.checked.includes(item.value),
|
5631
5613
|
"modelValue": state.checked.includes(item.value),
|
@@ -6130,88 +6112,6 @@ function use_head_cell_isSlot(s) {
|
|
6130
6112
|
getTH: getTH
|
6131
6113
|
};
|
6132
6114
|
});
|
6133
|
-
;// CONCATENATED MODULE: ../../packages/table/src/plugins/use-shift-key.tsx
|
6134
|
-
/*
|
6135
|
-
* Tencent is pleased to support the open source community by making
|
6136
|
-
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
6137
|
-
*
|
6138
|
-
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
6139
|
-
*
|
6140
|
-
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
6141
|
-
*
|
6142
|
-
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
6143
|
-
*
|
6144
|
-
* ---------------------------------------------------
|
6145
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
6146
|
-
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
6147
|
-
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
6148
|
-
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
6149
|
-
*
|
6150
|
-
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
6151
|
-
* the Software.
|
6152
|
-
*
|
6153
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
6154
|
-
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
6155
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
6156
|
-
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
6157
|
-
* IN THE SOFTWARE.
|
6158
|
-
*/
|
6159
|
-
|
6160
|
-
/* harmony default export */ const use_shift_key = (function (props) {
|
6161
|
-
var isShiftKeyDown = (0,external_vue_namespaceObject.ref)(false);
|
6162
|
-
var store = {
|
6163
|
-
start: null,
|
6164
|
-
end: null
|
6165
|
-
};
|
6166
|
-
var handleKeyDown = function handleKeyDown(e) {
|
6167
|
-
if (e.key === 'Shift') {
|
6168
|
-
isShiftKeyDown.value = true;
|
6169
|
-
}
|
6170
|
-
};
|
6171
|
-
var handleKeyUp = function handleKeyUp(e) {
|
6172
|
-
if (e.key === 'Shift') {
|
6173
|
-
isShiftKeyDown.value = false;
|
6174
|
-
clearStore();
|
6175
|
-
}
|
6176
|
-
};
|
6177
|
-
var setStore = function setStore(row, index) {
|
6178
|
-
if (store.start === null && store.end === null) {
|
6179
|
-
store.start = {
|
6180
|
-
index: index,
|
6181
|
-
row: row
|
6182
|
-
};
|
6183
|
-
return false;
|
6184
|
-
}
|
6185
|
-
store.end = {
|
6186
|
-
index: index,
|
6187
|
-
row: row
|
6188
|
-
};
|
6189
|
-
return true;
|
6190
|
-
};
|
6191
|
-
var clearStore = function clearStore() {
|
6192
|
-
store.start = null;
|
6193
|
-
store.end = null;
|
6194
|
-
};
|
6195
|
-
if (props.shiftMultiChecked) {
|
6196
|
-
window.addEventListener('keydown', handleKeyDown);
|
6197
|
-
window.addEventListener('keyup', handleKeyUp);
|
6198
|
-
}
|
6199
|
-
var getStore = function getStore() {
|
6200
|
-
return store;
|
6201
|
-
};
|
6202
|
-
(0,external_vue_namespaceObject.onUnmounted)(function () {
|
6203
|
-
if (props.shiftMultiChecked) {
|
6204
|
-
window.removeEventListener('keydown', handleKeyDown);
|
6205
|
-
window.removeEventListener('keyup', handleKeyUp);
|
6206
|
-
}
|
6207
|
-
});
|
6208
|
-
return {
|
6209
|
-
isShiftKeyDown: isShiftKeyDown,
|
6210
|
-
setStore: setStore,
|
6211
|
-
getStore: getStore,
|
6212
|
-
clearStore: clearStore
|
6213
|
-
};
|
6214
|
-
});
|
6215
6115
|
;// CONCATENATED MODULE: ../../packages/table/src/use-render.tsx
|
6216
6116
|
|
6217
6117
|
|
@@ -6263,11 +6163,10 @@ function use_render_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
|
|
6263
6163
|
|
6264
6164
|
|
6265
6165
|
|
6266
|
-
|
6267
6166
|
function use_render_isSlot(s) {
|
6268
6167
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0,external_vue_namespaceObject.isVNode)(s);
|
6269
6168
|
}
|
6270
|
-
/* harmony default export */ const use_render = (function (props, context, tableResp, head, root, resetTableHeight) {
|
6169
|
+
/* harmony default export */ const use_render = (function (props, context, tableResp, styleRef, head, root, resetTableHeight) {
|
6271
6170
|
var t = (0,config_provider_namespaceObject.useLocale)('table');
|
6272
6171
|
var uuid = esm_browser_v4();
|
6273
6172
|
var formatData = (0,external_vue_namespaceObject.computed)(function () {
|
@@ -6279,10 +6178,6 @@ function use_render_isSlot(s) {
|
|
6279
6178
|
var settings = (0,external_vue_namespaceObject.computed)(function () {
|
6280
6179
|
return formatData.value.settings;
|
6281
6180
|
});
|
6282
|
-
var _useShiftKey = use_shift_key(props),
|
6283
|
-
isShiftKeyDown = _useShiftKey.isShiftKeyDown,
|
6284
|
-
getStore = _useShiftKey.getStore,
|
6285
|
-
setStore = _useShiftKey.setStore;
|
6286
6181
|
// const activeSortIndex = ref(null);
|
6287
6182
|
/**
|
6288
6183
|
* 过滤当前可渲染的列
|
@@ -6409,7 +6304,8 @@ function use_render_isSlot(s) {
|
|
6409
6304
|
'--row-height': "".concat(resolvePropVal(config, 'height', ['thead']), "px"),
|
6410
6305
|
backgroundColor: props.thead.color
|
6411
6306
|
};
|
6412
|
-
|
6307
|
+
var _useFixedColumn = use_fixed_column(props, tableResp, head),
|
6308
|
+
resolveFixedColumnStyle = _useFixedColumn.resolveFixedColumnStyle;
|
6413
6309
|
return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)("thead", {
|
6414
6310
|
"style": rowStyle
|
6415
6311
|
}, [(0,external_vue_namespaceObject.createVNode)(table_row, null, {
|
@@ -6418,7 +6314,7 @@ function use_render_isSlot(s) {
|
|
6418
6314
|
var _props$thead$color, _props$thead;
|
6419
6315
|
var _useHeadCell = use_head_cell(props, context, column, tableResp),
|
6420
6316
|
getTH = _useHeadCell.getTH;
|
6421
|
-
var headStyle = Object.assign({}, resolveFixedColumnStyle(column), {
|
6317
|
+
var headStyle = Object.assign({}, resolveFixedColumnStyle(column, styleRef.value.hasScrollY), {
|
6422
6318
|
'--background-color': DEF_COLOR[(_props$thead$color = (_props$thead = props.thead) === null || _props$thead === void 0 ? void 0 : _props$thead.color) !== null && _props$thead$color !== void 0 ? _props$thead$color : IHeadColor.DEF1]
|
6423
6319
|
});
|
6424
6320
|
var classList = [getHeadColumnClass(column, index), getColumnCustomClass(column), column.align || props.headerAlign || props.align];
|
@@ -6494,14 +6390,13 @@ function use_render_isSlot(s) {
|
|
6494
6390
|
return result;
|
6495
6391
|
})]);
|
6496
6392
|
};
|
6497
|
-
var
|
6498
|
-
resolveFixedColumnStyle =
|
6393
|
+
var _useFixedColumn2 = use_fixed_column(props, tableResp, head),
|
6394
|
+
resolveFixedColumnStyle = _useFixedColumn2.resolveFixedColumnStyle;
|
6499
6395
|
var getRowRender = function getRowRender(row, rowIndex, preRow, rows, rowSpanMap, needRowSpan) {
|
6500
6396
|
var isChild = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
|
6501
6397
|
var rowLength = rows.length;
|
6502
6398
|
var rowStyle = [].concat(_toConsumableArray(formatPropAsArray(props.rowStyle, [row, rowIndex])), [{
|
6503
|
-
'--row-height': "".concat(getRowHeight(row, rowIndex), "px")
|
6504
|
-
'--scroll-x': "".concat(tableResp.formatData.layout.translateX, "px")
|
6399
|
+
'--row-height': "".concat(getRowHeight(row, rowIndex), "px")
|
6505
6400
|
}]);
|
6506
6401
|
var rowClass = [].concat(_toConsumableArray(formatPropAsArray(props.rowClass, [row, rowIndex])), ["hover-".concat(props.rowHover), rowIndex % 2 === 1 && props.stripe ? 'stripe-row' : '']);
|
6507
6402
|
var rowId = tableResp.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_UID);
|
@@ -6512,6 +6407,7 @@ function use_render_isSlot(s) {
|
|
6512
6407
|
return [(0,external_vue_namespaceObject.createVNode)("tr", (0,external_vue_namespaceObject.mergeProps)({
|
6513
6408
|
"style": rowStyle,
|
6514
6409
|
"class": rowClass,
|
6410
|
+
"data-row-id": rowId,
|
6515
6411
|
"key": rowId,
|
6516
6412
|
"data-row-index": rowIndex,
|
6517
6413
|
"onClick": function onClick(e) {
|
@@ -6562,14 +6458,11 @@ function use_render_isSlot(s) {
|
|
6562
6458
|
};
|
6563
6459
|
context.emit(type, args);
|
6564
6460
|
};
|
6565
|
-
var columnKey = "".concat(rowId, "_").concat(index);
|
6566
|
-
var cellKey = "".concat(rowId, "_").concat(index, "_cell");
|
6567
6461
|
return (0,external_vue_namespaceObject.createVNode)("td", {
|
6568
6462
|
"class": cellClass,
|
6569
6463
|
"style": cellStyle,
|
6570
6464
|
"colspan": colspan,
|
6571
6465
|
"rowspan": rowspan,
|
6572
|
-
"key": columnKey,
|
6573
6466
|
"onClick": function onClick(event) {
|
6574
6467
|
return handleEmit(event, EMIT_EVENTS.CELL_CLICK);
|
6575
6468
|
},
|
@@ -6577,7 +6470,6 @@ function use_render_isSlot(s) {
|
|
6577
6470
|
return handleEmit(event, EMIT_EVENTS.CELL_DBL_CLICK);
|
6578
6471
|
}
|
6579
6472
|
}, [(0,external_vue_namespaceObject.createVNode)(table_cell, {
|
6580
|
-
"key": cellKey,
|
6581
6473
|
"class": tdCtxClass,
|
6582
6474
|
"column": column,
|
6583
6475
|
"row": row,
|
@@ -6709,38 +6601,6 @@ function use_render_isSlot(s) {
|
|
6709
6601
|
data: props.data
|
6710
6602
|
});
|
6711
6603
|
};
|
6712
|
-
var beforeRowChange = function beforeRowChange() {
|
6713
|
-
if (isShiftKeyDown.value && !isAll) {
|
6714
|
-
var result = setStore(row, index);
|
6715
|
-
if (result) {
|
6716
|
-
var _tableResp$pageData$s;
|
6717
|
-
var _getStore = getStore(),
|
6718
|
-
start = _getStore.start,
|
6719
|
-
end = _getStore.end;
|
6720
|
-
var startIndex = start.index < end.index ? start.index : end.index;
|
6721
|
-
var endIndex = start.index < end.index ? end.index : start.index;
|
6722
|
-
((_tableResp$pageData$s = tableResp.pageData.slice(startIndex, endIndex + 1)) !== null && _tableResp$pageData$s !== void 0 ? _tableResp$pageData$s : []).forEach(function (item) {
|
6723
|
-
tableResp.setRowSelection(item, true);
|
6724
|
-
});
|
6725
|
-
}
|
6726
|
-
context.emit(EMIT_EVENTS.ROW_SELECT, {
|
6727
|
-
row: row,
|
6728
|
-
index: index,
|
6729
|
-
checked: true,
|
6730
|
-
data: props.data,
|
6731
|
-
isShiftKeyDown: true
|
6732
|
-
});
|
6733
|
-
context.emit(EMIT_EVENTS.ROW_SELECT_CHANGE, {
|
6734
|
-
row: row,
|
6735
|
-
index: index,
|
6736
|
-
checked: true,
|
6737
|
-
data: props.data,
|
6738
|
-
isShiftKeyDown: true
|
6739
|
-
});
|
6740
|
-
return Promise.resolve(!result);
|
6741
|
-
}
|
6742
|
-
return Promise.resolve(true);
|
6743
|
-
};
|
6744
6604
|
var indeterminate = tableResp.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_SELECTION_INDETERMINATE);
|
6745
6605
|
var isChecked = tableResp.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_SELECTION);
|
6746
6606
|
var isEnable = isRowSelectEnable(props, {
|
@@ -6752,8 +6612,7 @@ function use_render_isSlot(s) {
|
|
6752
6612
|
"onChange": handleChecked,
|
6753
6613
|
"disabled": !isEnable,
|
6754
6614
|
"modelValue": isChecked,
|
6755
|
-
"indeterminate": indeterminate
|
6756
|
-
"beforeChange": beforeRowChange
|
6615
|
+
"indeterminate": indeterminate
|
6757
6616
|
}, null);
|
6758
6617
|
};
|
6759
6618
|
var renderExpandColumn = function renderExpandColumn(row, column, index, rows) {
|
@@ -6952,6 +6811,7 @@ function table_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { va
|
|
6952
6811
|
wrapperStyle = _useClass.wrapperStyle,
|
6953
6812
|
contentStyle = _useClass.contentStyle,
|
6954
6813
|
headStyle = _useClass.headStyle,
|
6814
|
+
hasScrollYRef = _useClass.hasScrollYRef,
|
6955
6815
|
hasFooter = _useClass.hasFooter,
|
6956
6816
|
footerStyle = _useClass.footerStyle,
|
6957
6817
|
tableBodyClass = _useClass.tableBodyClass,
|
@@ -6972,12 +6832,17 @@ function table_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { va
|
|
6972
6832
|
updateFixClass = _useFixedColumn.updateFixClass;
|
6973
6833
|
var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
|
6974
6834
|
resolveClassName = _usePrefix.resolveClassName;
|
6835
|
+
var styleRef = (0,external_vue_namespaceObject.computed)(function () {
|
6836
|
+
return {
|
6837
|
+
hasScrollY: hasScrollYRef.value
|
6838
|
+
};
|
6839
|
+
});
|
6975
6840
|
use_observer_resize(root, function () {
|
6976
6841
|
(0,external_vue_namespaceObject.nextTick)(function () {
|
6977
6842
|
resolveFixedColumns(tableOffsetRight.value);
|
6978
6843
|
});
|
6979
6844
|
});
|
6980
|
-
var _useRender = use_render(props, ctx, tableSchema, head, root, resetTableHeight),
|
6845
|
+
var _useRender = use_render(props, ctx, tableSchema, styleRef, head, root, resetTableHeight),
|
6981
6846
|
renderTableBodySchema = _useRender.renderTableBodySchema,
|
6982
6847
|
renderTableFooter = _useRender.renderTableFooter,
|
6983
6848
|
renderTableHeadSchema = _useRender.renderTableHeadSchema;
|
@@ -6999,12 +6864,13 @@ function table_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { va
|
|
6999
6864
|
tableSchema.formatColumns(columns);
|
7000
6865
|
resolveFixedColumns(tableOffsetRight.value);
|
7001
6866
|
tableSchema.setIndexData().then(function () {
|
6867
|
+
// tableSchema.formatDataSchema(props.data);
|
7002
6868
|
tableSchema.resetStartEndIndex();
|
7003
6869
|
if (isFirstLoad.value) {
|
7004
6870
|
tableSchema.resolveByDefColumns();
|
7005
6871
|
isFirstLoad.value = false;
|
7006
6872
|
} else {
|
7007
|
-
tableSchema.resolvePageData(
|
6873
|
+
tableSchema.resolvePageData();
|
7008
6874
|
}
|
7009
6875
|
registerResizeEvent();
|
7010
6876
|
(0,external_vue_namespaceObject.nextTick)(function () {
|
@@ -7118,12 +6984,8 @@ function table_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { va
|
|
7118
6984
|
"throttleDelay": 120,
|
7119
6985
|
"scrollEvent": true,
|
7120
6986
|
"rowKey": props.rowKey,
|
7121
|
-
"scrollbar": {
|
7122
|
-
enabled: true
|
7123
|
-
},
|
7124
6987
|
"enabled": props.virtualEnabled,
|
7125
|
-
"keepAlive": true
|
7126
|
-
"autoIndex": false
|
6988
|
+
"keepAlive": true
|
7127
6989
|
}), {
|
7128
6990
|
beforeContent: function beforeContent() {
|
7129
6991
|
return renderPrepend();
|
@@ -7132,7 +6994,8 @@ function table_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { va
|
|
7132
6994
|
return renderTableBodySchema(scope.data);
|
7133
6995
|
},
|
7134
6996
|
afterSection: function afterSection() {
|
7135
|
-
return [
|
6997
|
+
return [// <div class={fixedBottomBorder.value}></div>,
|
6998
|
+
(0,external_vue_namespaceObject.createVNode)("div", {
|
7136
6999
|
"class": resizeColumnClass,
|
7137
7000
|
"style": resizeColumnStyle.value
|
7138
7001
|
}, null)];
|
@@ -6,7 +6,7 @@ import { ITableResponse } from '../use-attributes';
|
|
6
6
|
*/
|
7
7
|
declare const _default: (props: TablePropTypes, tableResp: ITableResponse, head?: Ref<HTMLElement>) => {
|
8
8
|
fixedWrapperClass: string;
|
9
|
-
resolveFixedColumnStyle: (column: Column) => {
|
9
|
+
resolveFixedColumnStyle: (column: Column, hasScrollY?: boolean) => {
|
10
10
|
[x: string]: string;
|
11
11
|
};
|
12
12
|
resolveFixedColumns: (tableOffsetRight: any) => void;
|
@@ -14,10 +14,8 @@ declare const _default: (props: TablePropTypes) => {
|
|
14
14
|
resolvePageData: (filterFn?: any, sortFn?: any, column?: Column, type?: string, sortScope?: any, multiCol?: any) => void;
|
15
15
|
resolveIndexData: () => Promise<void>;
|
16
16
|
resolvePageDataBySortList: (multiCol?: any) => void;
|
17
|
-
handlePaginationChange: (filterFn?: any, sortFn?: any) => void;
|
18
17
|
resetStartEndIndex: () => void;
|
19
|
-
|
20
|
-
multiFilter: (filterFnList: ((row: any, index: any, data: any) => void)[], origin?: any) => void;
|
18
|
+
multiFilter: (filterFnList: ((row: any, index: any, data: any) => void)[]) => void;
|
21
19
|
sort: (sourceData: any[], sortFn: any, column: Column, type: string, sortScope: SortScope) => void;
|
22
20
|
};
|
23
21
|
export default _default;
|
package/lib/table/props.d.ts
CHANGED
@@ -560,13 +560,5 @@ export declare const tableProps: {
|
|
560
560
|
rowDraggable: import("vue-types").VueTypeDef<any> & {
|
561
561
|
default: any;
|
562
562
|
};
|
563
|
-
/**
|
564
|
-
* 是否支持shift键多行选择
|
565
|
-
*/
|
566
|
-
shiftMultiChecked: import("vue-types").VueTypeValidableDef<boolean> & {
|
567
|
-
default: boolean;
|
568
|
-
} & {
|
569
|
-
default: boolean;
|
570
|
-
};
|
571
563
|
};
|
572
564
|
export {};
|