@weitutech/by-components 1.1.130 → 1.1.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/lib/by-components.common.js +40 -20
- package/lib/by-components.umd.js +40 -20
- package/lib/by-components.umd.min.js +1 -1
- package/package.json +1 -1
|
@@ -60751,8 +60751,8 @@ var component = normalizeComponent(
|
|
|
60751
60751
|
)
|
|
60752
60752
|
|
|
60753
60753
|
/* harmony default export */ var pager = (component.exports);
|
|
60754
|
-
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/table/index.vue?vue&type=template&id=
|
|
60755
|
-
var
|
|
60754
|
+
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/table/index.vue?vue&type=template&id=5b90b233
|
|
60755
|
+
var tablevue_type_template_id_5b90b233_render = function render() {
|
|
60756
60756
|
var _vm = this,
|
|
60757
60757
|
_c = _vm._self._c;
|
|
60758
60758
|
return _c('div', [_c('vxe-grid', _vm._g(_vm._b({
|
|
@@ -60826,7 +60826,7 @@ var tablevue_type_template_id_3aefd0b0_render = function render() {
|
|
|
60826
60826
|
}
|
|
60827
60827
|
}) : _vm._e()], 1);
|
|
60828
60828
|
};
|
|
60829
|
-
var
|
|
60829
|
+
var tablevue_type_template_id_5b90b233_staticRenderFns = [];
|
|
60830
60830
|
|
|
60831
60831
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
60832
60832
|
var es_array_push = __webpack_require__(4114);
|
|
@@ -61899,7 +61899,7 @@ var custom_column_component = normalizeComponent(
|
|
|
61899
61899
|
handler() {
|
|
61900
61900
|
this.$nextTick(() => {
|
|
61901
61901
|
setTimeout(() => {
|
|
61902
|
-
var _this$gridOptions$pag;
|
|
61902
|
+
var _this$gridOptions$pag, _this$gridOptions$sor;
|
|
61903
61903
|
if (this.$refs.xGrid && this.$refs.xGrid.refreshScroll) {
|
|
61904
61904
|
this.$refs.xGrid.refreshScroll(); // 刷新滚动布局
|
|
61905
61905
|
}
|
|
@@ -61910,11 +61910,11 @@ var custom_column_component = normalizeComponent(
|
|
|
61910
61910
|
});
|
|
61911
61911
|
}
|
|
61912
61912
|
|
|
61913
|
-
//
|
|
61914
|
-
if ((_this$gridOptions$pag = this.gridOptions.pagerConfig) !== null && _this$gridOptions$pag !== void 0 && _this$gridOptions$pag.frontendPagination) {
|
|
61913
|
+
// 前端分页或前端排序模式下,数据变化时确保默认排序高亮
|
|
61914
|
+
if ((_this$gridOptions$pag = this.gridOptions.pagerConfig) !== null && _this$gridOptions$pag !== void 0 && _this$gridOptions$pag.frontendPagination || (_this$gridOptions$sor = this.gridOptions.sortConfig) !== null && _this$gridOptions$sor !== void 0 && _this$gridOptions$sor.frontendSort) {
|
|
61915
61915
|
this.ensureDefaultSortHighlight();
|
|
61916
61916
|
} else {
|
|
61917
|
-
//
|
|
61917
|
+
// 后端模式,恢复之前的排序高亮
|
|
61918
61918
|
if (this.sortState.field && this.sortState.order && this.$refs.xGrid) {
|
|
61919
61919
|
setTimeout(() => {
|
|
61920
61920
|
this.$refs.xGrid.sort(this.sortState.field, this.sortState.order, {
|
|
@@ -62357,12 +62357,12 @@ var custom_column_component = normalizeComponent(
|
|
|
62357
62357
|
* @param event
|
|
62358
62358
|
*/
|
|
62359
62359
|
handleSortChange(event) {
|
|
62360
|
-
var _this$gridOptions$pag3, _this$gridOptions$
|
|
62360
|
+
var _this$gridOptions$pag3, _this$gridOptions$sor2;
|
|
62361
62361
|
const {
|
|
62362
62362
|
property,
|
|
62363
62363
|
order
|
|
62364
62364
|
} = event;
|
|
62365
|
-
const shouldHandleSort = ((_this$gridOptions$pag3 = this.gridOptions.pagerConfig) === null || _this$gridOptions$pag3 === void 0 ? void 0 : _this$gridOptions$pag3.frontendPagination) || ((_this$gridOptions$
|
|
62365
|
+
const shouldHandleSort = ((_this$gridOptions$pag3 = this.gridOptions.pagerConfig) === null || _this$gridOptions$pag3 === void 0 ? void 0 : _this$gridOptions$pag3.frontendPagination) || ((_this$gridOptions$sor2 = this.gridOptions.sortConfig) === null || _this$gridOptions$sor2 === void 0 ? void 0 : _this$gridOptions$sor2.frontendSort);
|
|
62366
62366
|
|
|
62367
62367
|
// 无论前端还是后端分页,都保存排序状态用于恢复箭头高亮
|
|
62368
62368
|
this.sortState.field = property;
|
|
@@ -62426,17 +62426,35 @@ var custom_column_component = normalizeComponent(
|
|
|
62426
62426
|
silent: true
|
|
62427
62427
|
});
|
|
62428
62428
|
}, 100);
|
|
62429
|
+
|
|
62430
|
+
// 🔧 修复:重置后自动应用默认排序(支持虚拟滚动和前端分页)
|
|
62431
|
+
this.$nextTick(() => {
|
|
62432
|
+
var _this$gridOptions$sor3;
|
|
62433
|
+
const defaultSort = (_this$gridOptions$sor3 = this.gridOptions.sortConfig) === null || _this$gridOptions$sor3 === void 0 ? void 0 : _this$gridOptions$sor3.defaultSort;
|
|
62434
|
+
if (defaultSort && defaultSort.field && defaultSort.order) {
|
|
62435
|
+
this.sortState.field = defaultSort.field;
|
|
62436
|
+
this.sortState.order = defaultSort.order;
|
|
62437
|
+
setTimeout(() => {
|
|
62438
|
+
if (this.$refs.xGrid) {
|
|
62439
|
+
this.$refs.xGrid.sort(defaultSort.field, defaultSort.order, {
|
|
62440
|
+
silent: true
|
|
62441
|
+
});
|
|
62442
|
+
}
|
|
62443
|
+
}, 150);
|
|
62444
|
+
}
|
|
62445
|
+
});
|
|
62429
62446
|
},
|
|
62430
62447
|
/**
|
|
62431
|
-
*
|
|
62448
|
+
* 初始化默认排序(支持前端分页和虚拟滚动)
|
|
62432
62449
|
*/
|
|
62433
62450
|
initDefaultSortForFrontendPagination() {
|
|
62434
|
-
var _this$gridOptions$pag7, _this$gridOptions$
|
|
62435
|
-
//
|
|
62436
|
-
|
|
62451
|
+
var _this$gridOptions$pag7, _this$gridOptions$sor4, _this$gridOptions$sor5;
|
|
62452
|
+
// 支持前端分页或前端排序模式(包括虚拟滚动)
|
|
62453
|
+
const shouldInitSort = ((_this$gridOptions$pag7 = this.gridOptions.pagerConfig) === null || _this$gridOptions$pag7 === void 0 ? void 0 : _this$gridOptions$pag7.frontendPagination) || ((_this$gridOptions$sor4 = this.gridOptions.sortConfig) === null || _this$gridOptions$sor4 === void 0 ? void 0 : _this$gridOptions$sor4.frontendSort);
|
|
62454
|
+
if (!shouldInitSort) {
|
|
62437
62455
|
return;
|
|
62438
62456
|
}
|
|
62439
|
-
const defaultSort = (_this$gridOptions$
|
|
62457
|
+
const defaultSort = (_this$gridOptions$sor5 = this.gridOptions.sortConfig) === null || _this$gridOptions$sor5 === void 0 ? void 0 : _this$gridOptions$sor5.defaultSort;
|
|
62440
62458
|
if (defaultSort && defaultSort.field && defaultSort.order) {
|
|
62441
62459
|
// 设置排序状态
|
|
62442
62460
|
this.sortState.field = defaultSort.field;
|
|
@@ -62456,14 +62474,16 @@ var custom_column_component = normalizeComponent(
|
|
|
62456
62474
|
}
|
|
62457
62475
|
},
|
|
62458
62476
|
/**
|
|
62459
|
-
*
|
|
62477
|
+
* 确保默认排序高亮(数据变化时调用,支持前端分页和虚拟滚动)
|
|
62460
62478
|
*/
|
|
62461
62479
|
ensureDefaultSortHighlight() {
|
|
62462
|
-
var _this$gridOptions$pag8, _this$gridOptions$
|
|
62463
|
-
|
|
62480
|
+
var _this$gridOptions$pag8, _this$gridOptions$sor6, _this$gridOptions$sor7;
|
|
62481
|
+
// 支持前端分页或前端排序模式(包括虚拟滚动)
|
|
62482
|
+
const shouldEnsureSort = ((_this$gridOptions$pag8 = this.gridOptions.pagerConfig) === null || _this$gridOptions$pag8 === void 0 ? void 0 : _this$gridOptions$pag8.frontendPagination) || ((_this$gridOptions$sor6 = this.gridOptions.sortConfig) === null || _this$gridOptions$sor6 === void 0 ? void 0 : _this$gridOptions$sor6.frontendSort);
|
|
62483
|
+
if (!shouldEnsureSort) {
|
|
62464
62484
|
return;
|
|
62465
62485
|
}
|
|
62466
|
-
const defaultSort = (_this$gridOptions$
|
|
62486
|
+
const defaultSort = (_this$gridOptions$sor7 = this.gridOptions.sortConfig) === null || _this$gridOptions$sor7 === void 0 ? void 0 : _this$gridOptions$sor7.defaultSort;
|
|
62467
62487
|
if (defaultSort && defaultSort.field && defaultSort.order) {
|
|
62468
62488
|
// 确保排序状态与默认排序一致
|
|
62469
62489
|
this.sortState.field = defaultSort.field;
|
|
@@ -62493,8 +62513,8 @@ var custom_column_component = normalizeComponent(
|
|
|
62493
62513
|
;
|
|
62494
62514
|
var table_component = normalizeComponent(
|
|
62495
62515
|
components_tablevue_type_script_lang_js,
|
|
62496
|
-
|
|
62497
|
-
|
|
62516
|
+
tablevue_type_template_id_5b90b233_render,
|
|
62517
|
+
tablevue_type_template_id_5b90b233_staticRenderFns,
|
|
62498
62518
|
false,
|
|
62499
62519
|
null,
|
|
62500
62520
|
null,
|
package/lib/by-components.umd.js
CHANGED
|
@@ -60761,8 +60761,8 @@ var component = normalizeComponent(
|
|
|
60761
60761
|
)
|
|
60762
60762
|
|
|
60763
60763
|
/* harmony default export */ var pager = (component.exports);
|
|
60764
|
-
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/table/index.vue?vue&type=template&id=
|
|
60765
|
-
var
|
|
60764
|
+
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/table/index.vue?vue&type=template&id=5b90b233
|
|
60765
|
+
var tablevue_type_template_id_5b90b233_render = function render() {
|
|
60766
60766
|
var _vm = this,
|
|
60767
60767
|
_c = _vm._self._c;
|
|
60768
60768
|
return _c('div', [_c('vxe-grid', _vm._g(_vm._b({
|
|
@@ -60836,7 +60836,7 @@ var tablevue_type_template_id_3aefd0b0_render = function render() {
|
|
|
60836
60836
|
}
|
|
60837
60837
|
}) : _vm._e()], 1);
|
|
60838
60838
|
};
|
|
60839
|
-
var
|
|
60839
|
+
var tablevue_type_template_id_5b90b233_staticRenderFns = [];
|
|
60840
60840
|
|
|
60841
60841
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
60842
60842
|
var es_array_push = __webpack_require__(4114);
|
|
@@ -61909,7 +61909,7 @@ var custom_column_component = normalizeComponent(
|
|
|
61909
61909
|
handler() {
|
|
61910
61910
|
this.$nextTick(() => {
|
|
61911
61911
|
setTimeout(() => {
|
|
61912
|
-
var _this$gridOptions$pag;
|
|
61912
|
+
var _this$gridOptions$pag, _this$gridOptions$sor;
|
|
61913
61913
|
if (this.$refs.xGrid && this.$refs.xGrid.refreshScroll) {
|
|
61914
61914
|
this.$refs.xGrid.refreshScroll(); // 刷新滚动布局
|
|
61915
61915
|
}
|
|
@@ -61920,11 +61920,11 @@ var custom_column_component = normalizeComponent(
|
|
|
61920
61920
|
});
|
|
61921
61921
|
}
|
|
61922
61922
|
|
|
61923
|
-
//
|
|
61924
|
-
if ((_this$gridOptions$pag = this.gridOptions.pagerConfig) !== null && _this$gridOptions$pag !== void 0 && _this$gridOptions$pag.frontendPagination) {
|
|
61923
|
+
// 前端分页或前端排序模式下,数据变化时确保默认排序高亮
|
|
61924
|
+
if ((_this$gridOptions$pag = this.gridOptions.pagerConfig) !== null && _this$gridOptions$pag !== void 0 && _this$gridOptions$pag.frontendPagination || (_this$gridOptions$sor = this.gridOptions.sortConfig) !== null && _this$gridOptions$sor !== void 0 && _this$gridOptions$sor.frontendSort) {
|
|
61925
61925
|
this.ensureDefaultSortHighlight();
|
|
61926
61926
|
} else {
|
|
61927
|
-
//
|
|
61927
|
+
// 后端模式,恢复之前的排序高亮
|
|
61928
61928
|
if (this.sortState.field && this.sortState.order && this.$refs.xGrid) {
|
|
61929
61929
|
setTimeout(() => {
|
|
61930
61930
|
this.$refs.xGrid.sort(this.sortState.field, this.sortState.order, {
|
|
@@ -62367,12 +62367,12 @@ var custom_column_component = normalizeComponent(
|
|
|
62367
62367
|
* @param event
|
|
62368
62368
|
*/
|
|
62369
62369
|
handleSortChange(event) {
|
|
62370
|
-
var _this$gridOptions$pag3, _this$gridOptions$
|
|
62370
|
+
var _this$gridOptions$pag3, _this$gridOptions$sor2;
|
|
62371
62371
|
const {
|
|
62372
62372
|
property,
|
|
62373
62373
|
order
|
|
62374
62374
|
} = event;
|
|
62375
|
-
const shouldHandleSort = ((_this$gridOptions$pag3 = this.gridOptions.pagerConfig) === null || _this$gridOptions$pag3 === void 0 ? void 0 : _this$gridOptions$pag3.frontendPagination) || ((_this$gridOptions$
|
|
62375
|
+
const shouldHandleSort = ((_this$gridOptions$pag3 = this.gridOptions.pagerConfig) === null || _this$gridOptions$pag3 === void 0 ? void 0 : _this$gridOptions$pag3.frontendPagination) || ((_this$gridOptions$sor2 = this.gridOptions.sortConfig) === null || _this$gridOptions$sor2 === void 0 ? void 0 : _this$gridOptions$sor2.frontendSort);
|
|
62376
62376
|
|
|
62377
62377
|
// 无论前端还是后端分页,都保存排序状态用于恢复箭头高亮
|
|
62378
62378
|
this.sortState.field = property;
|
|
@@ -62436,17 +62436,35 @@ var custom_column_component = normalizeComponent(
|
|
|
62436
62436
|
silent: true
|
|
62437
62437
|
});
|
|
62438
62438
|
}, 100);
|
|
62439
|
+
|
|
62440
|
+
// 🔧 修复:重置后自动应用默认排序(支持虚拟滚动和前端分页)
|
|
62441
|
+
this.$nextTick(() => {
|
|
62442
|
+
var _this$gridOptions$sor3;
|
|
62443
|
+
const defaultSort = (_this$gridOptions$sor3 = this.gridOptions.sortConfig) === null || _this$gridOptions$sor3 === void 0 ? void 0 : _this$gridOptions$sor3.defaultSort;
|
|
62444
|
+
if (defaultSort && defaultSort.field && defaultSort.order) {
|
|
62445
|
+
this.sortState.field = defaultSort.field;
|
|
62446
|
+
this.sortState.order = defaultSort.order;
|
|
62447
|
+
setTimeout(() => {
|
|
62448
|
+
if (this.$refs.xGrid) {
|
|
62449
|
+
this.$refs.xGrid.sort(defaultSort.field, defaultSort.order, {
|
|
62450
|
+
silent: true
|
|
62451
|
+
});
|
|
62452
|
+
}
|
|
62453
|
+
}, 150);
|
|
62454
|
+
}
|
|
62455
|
+
});
|
|
62439
62456
|
},
|
|
62440
62457
|
/**
|
|
62441
|
-
*
|
|
62458
|
+
* 初始化默认排序(支持前端分页和虚拟滚动)
|
|
62442
62459
|
*/
|
|
62443
62460
|
initDefaultSortForFrontendPagination() {
|
|
62444
|
-
var _this$gridOptions$pag7, _this$gridOptions$
|
|
62445
|
-
//
|
|
62446
|
-
|
|
62461
|
+
var _this$gridOptions$pag7, _this$gridOptions$sor4, _this$gridOptions$sor5;
|
|
62462
|
+
// 支持前端分页或前端排序模式(包括虚拟滚动)
|
|
62463
|
+
const shouldInitSort = ((_this$gridOptions$pag7 = this.gridOptions.pagerConfig) === null || _this$gridOptions$pag7 === void 0 ? void 0 : _this$gridOptions$pag7.frontendPagination) || ((_this$gridOptions$sor4 = this.gridOptions.sortConfig) === null || _this$gridOptions$sor4 === void 0 ? void 0 : _this$gridOptions$sor4.frontendSort);
|
|
62464
|
+
if (!shouldInitSort) {
|
|
62447
62465
|
return;
|
|
62448
62466
|
}
|
|
62449
|
-
const defaultSort = (_this$gridOptions$
|
|
62467
|
+
const defaultSort = (_this$gridOptions$sor5 = this.gridOptions.sortConfig) === null || _this$gridOptions$sor5 === void 0 ? void 0 : _this$gridOptions$sor5.defaultSort;
|
|
62450
62468
|
if (defaultSort && defaultSort.field && defaultSort.order) {
|
|
62451
62469
|
// 设置排序状态
|
|
62452
62470
|
this.sortState.field = defaultSort.field;
|
|
@@ -62466,14 +62484,16 @@ var custom_column_component = normalizeComponent(
|
|
|
62466
62484
|
}
|
|
62467
62485
|
},
|
|
62468
62486
|
/**
|
|
62469
|
-
*
|
|
62487
|
+
* 确保默认排序高亮(数据变化时调用,支持前端分页和虚拟滚动)
|
|
62470
62488
|
*/
|
|
62471
62489
|
ensureDefaultSortHighlight() {
|
|
62472
|
-
var _this$gridOptions$pag8, _this$gridOptions$
|
|
62473
|
-
|
|
62490
|
+
var _this$gridOptions$pag8, _this$gridOptions$sor6, _this$gridOptions$sor7;
|
|
62491
|
+
// 支持前端分页或前端排序模式(包括虚拟滚动)
|
|
62492
|
+
const shouldEnsureSort = ((_this$gridOptions$pag8 = this.gridOptions.pagerConfig) === null || _this$gridOptions$pag8 === void 0 ? void 0 : _this$gridOptions$pag8.frontendPagination) || ((_this$gridOptions$sor6 = this.gridOptions.sortConfig) === null || _this$gridOptions$sor6 === void 0 ? void 0 : _this$gridOptions$sor6.frontendSort);
|
|
62493
|
+
if (!shouldEnsureSort) {
|
|
62474
62494
|
return;
|
|
62475
62495
|
}
|
|
62476
|
-
const defaultSort = (_this$gridOptions$
|
|
62496
|
+
const defaultSort = (_this$gridOptions$sor7 = this.gridOptions.sortConfig) === null || _this$gridOptions$sor7 === void 0 ? void 0 : _this$gridOptions$sor7.defaultSort;
|
|
62477
62497
|
if (defaultSort && defaultSort.field && defaultSort.order) {
|
|
62478
62498
|
// 确保排序状态与默认排序一致
|
|
62479
62499
|
this.sortState.field = defaultSort.field;
|
|
@@ -62503,8 +62523,8 @@ var custom_column_component = normalizeComponent(
|
|
|
62503
62523
|
;
|
|
62504
62524
|
var table_component = normalizeComponent(
|
|
62505
62525
|
components_tablevue_type_script_lang_js,
|
|
62506
|
-
|
|
62507
|
-
|
|
62526
|
+
tablevue_type_template_id_5b90b233_render,
|
|
62527
|
+
tablevue_type_template_id_5b90b233_staticRenderFns,
|
|
62508
62528
|
false,
|
|
62509
62529
|
null,
|
|
62510
62530
|
null,
|