@weitutech/by-components 1.1.131 → 1.1.132

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.
@@ -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=5b90b233
60755
- var tablevue_type_template_id_5b90b233_render = function render() {
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=22f2fb85
60755
+ var tablevue_type_template_id_22f2fb85_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_5b90b233_render = function render() {
60826
60826
  }
60827
60827
  }) : _vm._e()], 1);
60828
60828
  };
60829
- var tablevue_type_template_id_5b90b233_staticRenderFns = [];
60829
+ var tablevue_type_template_id_22f2fb85_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);
@@ -61931,7 +61931,7 @@ var custom_column_component = normalizeComponent(
61931
61931
  },
61932
61932
  computed: {
61933
61933
  options() {
61934
- var _others$pagerConfig, _others$sortConfig, _others$pagerConfig2, _others$pagerConfig3, _others$sortConfig2, _sortConfig$remote;
61934
+ var _others$pagerConfig, _others$sortConfig, _others$pagerConfig2, _others$sortConfig2, _others$pagerConfig3, _others$sortConfig3, _sortConfig$remote;
61935
61935
  const {
61936
61936
  customColumnConfig,
61937
61937
  columns,
@@ -61950,15 +61950,18 @@ var custom_column_component = normalizeComponent(
61950
61950
  newColumns = this.removeFixedColumns(newColumns);
61951
61951
  }
61952
61952
 
61953
- // 处理前端分页
61953
+ // 处理前端分页和虚拟滚动
61954
61954
  let data = others.data || [];
61955
61955
  if ((_others$pagerConfig = others.pagerConfig) !== null && _others$pagerConfig !== void 0 && _others$pagerConfig.frontendPagination || (_others$sortConfig = others.sortConfig) !== null && _others$sortConfig !== void 0 && _others$sortConfig.frontendSort) {
61956
61956
  // 保存完整数据
61957
61957
  this.allData = [...data];
61958
61958
  }
61959
61959
  if ((_others$pagerConfig2 = others.pagerConfig) !== null && _others$pagerConfig2 !== void 0 && _others$pagerConfig2.frontendPagination) {
61960
- // 截取当前页数据
61960
+ // 前端分页:截取当前页数据
61961
61961
  data = this.spliteListData(this.allData, others.pagerConfig.currentPage, others.pagerConfig.pageSize);
61962
+ } else if ((_others$sortConfig2 = others.sortConfig) !== null && _others$sortConfig2 !== void 0 && _others$sortConfig2.frontendSort) {
61963
+ // 虚拟滚动:处理置顶行和默认排序
61964
+ data = this.spliteListData(this.allData, null, null);
61962
61965
  }
61963
61966
 
61964
61967
  // 移除 others 中的 data,避免覆盖
@@ -62010,9 +62013,12 @@ var custom_column_component = normalizeComponent(
62010
62013
  },
62011
62014
  sortConfig: {
62012
62015
  ...sortConfig,
62013
- // 只在前端排序/分页时强制 remote: true
62014
- // 其他情况保持外部配置,但确保后端分页时remotetrue
62015
- remote: (_others$pagerConfig3 = others.pagerConfig) !== null && _others$pagerConfig3 !== void 0 && _others$pagerConfig3.frontendPagination || (_others$sortConfig2 = others.sortConfig) !== null && _others$sortConfig2 !== void 0 && _others$sortConfig2.frontendSort ? true : (_sortConfig$remote = sortConfig === null || sortConfig === void 0 ? void 0 : sortConfig.remote) !== null && _sortConfig$remote !== void 0 ? _sortConfig$remote : false,
62016
+ // 🔧 排序模式配置:
62017
+ // - 前端分页:remote: true(数据已在 spliteListData 中排序)
62018
+ // - 虚拟滚动 + 前端排序:remote: true(手动处理置顶行,类似前端分页)
62019
+ // - 后端排序:remote: 外部配置或 false
62020
+ remote: (_others$pagerConfig3 = others.pagerConfig) !== null && _others$pagerConfig3 !== void 0 && _others$pagerConfig3.frontendPagination || (_others$sortConfig3 = others.sortConfig) !== null && _others$sortConfig3 !== void 0 && _others$sortConfig3.frontendSort ? true // 前端分页或虚拟滚动:都使用 remote: true,手动处理排序(支持置顶行)
62021
+ : (_sortConfig$remote = sortConfig === null || sortConfig === void 0 ? void 0 : sortConfig.remote) !== null && _sortConfig$remote !== void 0 ? _sortConfig$remote : false,
62016
62022
  trigger: 'cell',
62017
62023
  ...this.gridOptions.sortConfig
62018
62024
  },
@@ -62362,14 +62368,19 @@ var custom_column_component = normalizeComponent(
62362
62368
  property,
62363
62369
  order
62364
62370
  } = event;
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
62371
 
62367
- // 无论前端还是后端分页,都保存排序状态用于恢复箭头高亮
62372
+ // 🔧 区分前端分页和虚拟滚动:
62373
+ // - 前端分页(frontendPagination):手动排序 + 分页
62374
+ // - 虚拟滚动(frontendSort 但无 frontendPagination):手动排序 + 虚拟滚动(支持置顶行)
62375
+ const isFrontendPagination = (_this$gridOptions$pag3 = this.gridOptions.pagerConfig) === null || _this$gridOptions$pag3 === void 0 ? void 0 : _this$gridOptions$pag3.frontendPagination;
62376
+ const isVirtualScrollWithSort = ((_this$gridOptions$sor2 = this.gridOptions.sortConfig) === null || _this$gridOptions$sor2 === void 0 ? void 0 : _this$gridOptions$sor2.frontendSort) && !isFrontendPagination;
62377
+
62378
+ // 无论哪种模式,都保存排序状态用于恢复箭头高亮
62368
62379
  this.sortState.field = property;
62369
62380
  this.sortState.order = order;
62370
- if (shouldHandleSort) {
62371
- var _this$gridOptions$pag4, _this$gridOptions$pag5;
62372
- const newData = this.spliteListData(this.allData, (_this$gridOptions$pag4 = this.gridOptions.pagerConfig) !== null && _this$gridOptions$pag4 !== void 0 && _this$gridOptions$pag4.frontendPagination ? this.gridOptions.pagerConfig.currentPage : null, (_this$gridOptions$pag5 = this.gridOptions.pagerConfig) !== null && _this$gridOptions$pag5 !== void 0 && _this$gridOptions$pag5.frontendPagination ? this.gridOptions.pagerConfig.pageSize : null);
62381
+ if (isFrontendPagination) {
62382
+ // 前端分页模式:手动处理排序和分页
62383
+ const newData = this.spliteListData(this.allData, this.gridOptions.pagerConfig.currentPage, this.gridOptions.pagerConfig.pageSize);
62373
62384
  if (this.$refs.xGrid) {
62374
62385
  this.$refs.xGrid.reloadData(newData);
62375
62386
  this.$nextTick(() => {
@@ -62382,8 +62393,7 @@ var custom_column_component = normalizeComponent(
62382
62393
  }, 100);
62383
62394
  }
62384
62395
  setTimeout(() => {
62385
- var _this$gridOptions$pag6;
62386
- if ((_this$gridOptions$pag6 = this.gridOptions.pagerConfig) !== null && _this$gridOptions$pag6 !== void 0 && _this$gridOptions$pag6.frontendPagination && this.$refs.xGrid) {
62396
+ if (this.$refs.xGrid) {
62387
62397
  // 前端分页时,排序状态变化,回到第一页
62388
62398
  const currentPage = this.gridOptions.pagerConfig.currentPage;
62389
62399
  if (currentPage !== 1) {
@@ -62400,8 +62410,30 @@ var custom_column_component = normalizeComponent(
62400
62410
  }, 0);
62401
62411
  });
62402
62412
  }
62413
+ } else if (isVirtualScrollWithSort) {
62414
+ // 虚拟滚动模式:手动处理排序(支持置顶行)
62415
+ const newData = this.spliteListData(this.allData, null, null);
62416
+ if (this.$refs.xGrid) {
62417
+ this.$refs.xGrid.reloadData(newData);
62418
+ this.$nextTick(() => {
62419
+ if (property && order) {
62420
+ setTimeout(() => {
62421
+ // 只高亮箭头,表格内部不排序(因为数据已经排序好)
62422
+ this.$refs.xGrid.sort(property, order, {
62423
+ silent: true
62424
+ });
62425
+ }, 100);
62426
+ }
62427
+ setTimeout(() => {
62428
+ if (this.$refs.xGrid) {
62429
+ // 排序后滚动到顶部
62430
+ this.$refs.xGrid.scrollTo(0, 0);
62431
+ }
62432
+ }, 0);
62433
+ });
62434
+ }
62403
62435
  } else {
62404
- // 后端分页模式下,确保排序箭头高亮
62436
+ // 后端模式:确保排序箭头高亮
62405
62437
  this.$nextTick(() => {
62406
62438
  if (property && order && this.$refs.xGrid) {
62407
62439
  setTimeout(() => {
@@ -62436,6 +62468,7 @@ var custom_column_component = normalizeComponent(
62436
62468
  this.sortState.order = defaultSort.order;
62437
62469
  setTimeout(() => {
62438
62470
  if (this.$refs.xGrid) {
62471
+ // 🔧 两种模式都使用手动排序(支持置顶行)
62439
62472
  this.$refs.xGrid.sort(defaultSort.field, defaultSort.order, {
62440
62473
  silent: true
62441
62474
  });
@@ -62448,9 +62481,9 @@ var custom_column_component = normalizeComponent(
62448
62481
  * 初始化默认排序(支持前端分页和虚拟滚动)
62449
62482
  */
62450
62483
  initDefaultSortForFrontendPagination() {
62451
- var _this$gridOptions$pag7, _this$gridOptions$sor4, _this$gridOptions$sor5;
62484
+ var _this$gridOptions$pag4, _this$gridOptions$sor4, _this$gridOptions$sor5;
62452
62485
  // 支持前端分页或前端排序模式(包括虚拟滚动)
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);
62486
+ const shouldInitSort = ((_this$gridOptions$pag4 = this.gridOptions.pagerConfig) === null || _this$gridOptions$pag4 === void 0 ? void 0 : _this$gridOptions$pag4.frontendPagination) || ((_this$gridOptions$sor4 = this.gridOptions.sortConfig) === null || _this$gridOptions$sor4 === void 0 ? void 0 : _this$gridOptions$sor4.frontendSort);
62454
62487
  if (!shouldInitSort) {
62455
62488
  return;
62456
62489
  }
@@ -62460,11 +62493,13 @@ var custom_column_component = normalizeComponent(
62460
62493
  this.sortState.field = defaultSort.field;
62461
62494
  this.sortState.order = defaultSort.order;
62462
62495
 
62463
- // 在下一个tick中应用排序高亮
62496
+ // 在下一个tick中应用排序
62464
62497
  this.$nextTick(() => {
62465
62498
  if (this.$refs.xGrid) {
62466
62499
  setTimeout(() => {
62467
- // 只高亮排序图标,不触发排序事件
62500
+ // 🔧 两种模式都使用手动排序(支持置顶行):
62501
+ // - 前端分页:数据在 spliteListData 中排序,只需UI高亮
62502
+ // - 虚拟滚动:数据在 spliteListData 中排序,只需UI高亮
62468
62503
  this.$refs.xGrid.sort(defaultSort.field, defaultSort.order, {
62469
62504
  silent: true
62470
62505
  });
@@ -62477,9 +62512,9 @@ var custom_column_component = normalizeComponent(
62477
62512
  * 确保默认排序高亮(数据变化时调用,支持前端分页和虚拟滚动)
62478
62513
  */
62479
62514
  ensureDefaultSortHighlight() {
62480
- var _this$gridOptions$pag8, _this$gridOptions$sor6, _this$gridOptions$sor7;
62515
+ var _this$gridOptions$pag5, _this$gridOptions$sor6, _this$gridOptions$sor7;
62481
62516
  // 支持前端分页或前端排序模式(包括虚拟滚动)
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);
62517
+ const shouldEnsureSort = ((_this$gridOptions$pag5 = this.gridOptions.pagerConfig) === null || _this$gridOptions$pag5 === void 0 ? void 0 : _this$gridOptions$pag5.frontendPagination) || ((_this$gridOptions$sor6 = this.gridOptions.sortConfig) === null || _this$gridOptions$sor6 === void 0 ? void 0 : _this$gridOptions$sor6.frontendSort);
62483
62518
  if (!shouldEnsureSort) {
62484
62519
  return;
62485
62520
  }
@@ -62489,9 +62524,12 @@ var custom_column_component = normalizeComponent(
62489
62524
  this.sortState.field = defaultSort.field;
62490
62525
  this.sortState.order = defaultSort.order;
62491
62526
 
62492
- // 应用排序高亮
62527
+ // 应用排序
62493
62528
  if (this.$refs.xGrid) {
62494
62529
  setTimeout(() => {
62530
+ // 🔧 两种模式都使用手动排序(支持置顶行):
62531
+ // - 前端分页:数据已在 spliteListData 中排序,只需UI高亮(silent: true)
62532
+ // - 虚拟滚动:数据已在 spliteListData 中排序,只需UI高亮(silent: true)
62495
62533
  this.$refs.xGrid.sort(defaultSort.field, defaultSort.order, {
62496
62534
  silent: true
62497
62535
  });
@@ -62513,8 +62551,8 @@ var custom_column_component = normalizeComponent(
62513
62551
  ;
62514
62552
  var table_component = normalizeComponent(
62515
62553
  components_tablevue_type_script_lang_js,
62516
- tablevue_type_template_id_5b90b233_render,
62517
- tablevue_type_template_id_5b90b233_staticRenderFns,
62554
+ tablevue_type_template_id_22f2fb85_render,
62555
+ tablevue_type_template_id_22f2fb85_staticRenderFns,
62518
62556
  false,
62519
62557
  null,
62520
62558
  null,
@@ -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=5b90b233
60765
- var tablevue_type_template_id_5b90b233_render = function render() {
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=22f2fb85
60765
+ var tablevue_type_template_id_22f2fb85_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_5b90b233_render = function render() {
60836
60836
  }
60837
60837
  }) : _vm._e()], 1);
60838
60838
  };
60839
- var tablevue_type_template_id_5b90b233_staticRenderFns = [];
60839
+ var tablevue_type_template_id_22f2fb85_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);
@@ -61941,7 +61941,7 @@ var custom_column_component = normalizeComponent(
61941
61941
  },
61942
61942
  computed: {
61943
61943
  options() {
61944
- var _others$pagerConfig, _others$sortConfig, _others$pagerConfig2, _others$pagerConfig3, _others$sortConfig2, _sortConfig$remote;
61944
+ var _others$pagerConfig, _others$sortConfig, _others$pagerConfig2, _others$sortConfig2, _others$pagerConfig3, _others$sortConfig3, _sortConfig$remote;
61945
61945
  const {
61946
61946
  customColumnConfig,
61947
61947
  columns,
@@ -61960,15 +61960,18 @@ var custom_column_component = normalizeComponent(
61960
61960
  newColumns = this.removeFixedColumns(newColumns);
61961
61961
  }
61962
61962
 
61963
- // 处理前端分页
61963
+ // 处理前端分页和虚拟滚动
61964
61964
  let data = others.data || [];
61965
61965
  if ((_others$pagerConfig = others.pagerConfig) !== null && _others$pagerConfig !== void 0 && _others$pagerConfig.frontendPagination || (_others$sortConfig = others.sortConfig) !== null && _others$sortConfig !== void 0 && _others$sortConfig.frontendSort) {
61966
61966
  // 保存完整数据
61967
61967
  this.allData = [...data];
61968
61968
  }
61969
61969
  if ((_others$pagerConfig2 = others.pagerConfig) !== null && _others$pagerConfig2 !== void 0 && _others$pagerConfig2.frontendPagination) {
61970
- // 截取当前页数据
61970
+ // 前端分页:截取当前页数据
61971
61971
  data = this.spliteListData(this.allData, others.pagerConfig.currentPage, others.pagerConfig.pageSize);
61972
+ } else if ((_others$sortConfig2 = others.sortConfig) !== null && _others$sortConfig2 !== void 0 && _others$sortConfig2.frontendSort) {
61973
+ // 虚拟滚动:处理置顶行和默认排序
61974
+ data = this.spliteListData(this.allData, null, null);
61972
61975
  }
61973
61976
 
61974
61977
  // 移除 others 中的 data,避免覆盖
@@ -62020,9 +62023,12 @@ var custom_column_component = normalizeComponent(
62020
62023
  },
62021
62024
  sortConfig: {
62022
62025
  ...sortConfig,
62023
- // 只在前端排序/分页时强制 remote: true
62024
- // 其他情况保持外部配置,但确保后端分页时remotetrue
62025
- remote: (_others$pagerConfig3 = others.pagerConfig) !== null && _others$pagerConfig3 !== void 0 && _others$pagerConfig3.frontendPagination || (_others$sortConfig2 = others.sortConfig) !== null && _others$sortConfig2 !== void 0 && _others$sortConfig2.frontendSort ? true : (_sortConfig$remote = sortConfig === null || sortConfig === void 0 ? void 0 : sortConfig.remote) !== null && _sortConfig$remote !== void 0 ? _sortConfig$remote : false,
62026
+ // 🔧 排序模式配置:
62027
+ // - 前端分页:remote: true(数据已在 spliteListData 中排序)
62028
+ // - 虚拟滚动 + 前端排序:remote: true(手动处理置顶行,类似前端分页)
62029
+ // - 后端排序:remote: 外部配置或 false
62030
+ remote: (_others$pagerConfig3 = others.pagerConfig) !== null && _others$pagerConfig3 !== void 0 && _others$pagerConfig3.frontendPagination || (_others$sortConfig3 = others.sortConfig) !== null && _others$sortConfig3 !== void 0 && _others$sortConfig3.frontendSort ? true // 前端分页或虚拟滚动:都使用 remote: true,手动处理排序(支持置顶行)
62031
+ : (_sortConfig$remote = sortConfig === null || sortConfig === void 0 ? void 0 : sortConfig.remote) !== null && _sortConfig$remote !== void 0 ? _sortConfig$remote : false,
62026
62032
  trigger: 'cell',
62027
62033
  ...this.gridOptions.sortConfig
62028
62034
  },
@@ -62372,14 +62378,19 @@ var custom_column_component = normalizeComponent(
62372
62378
  property,
62373
62379
  order
62374
62380
  } = event;
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
62381
 
62377
- // 无论前端还是后端分页,都保存排序状态用于恢复箭头高亮
62382
+ // 🔧 区分前端分页和虚拟滚动:
62383
+ // - 前端分页(frontendPagination):手动排序 + 分页
62384
+ // - 虚拟滚动(frontendSort 但无 frontendPagination):手动排序 + 虚拟滚动(支持置顶行)
62385
+ const isFrontendPagination = (_this$gridOptions$pag3 = this.gridOptions.pagerConfig) === null || _this$gridOptions$pag3 === void 0 ? void 0 : _this$gridOptions$pag3.frontendPagination;
62386
+ const isVirtualScrollWithSort = ((_this$gridOptions$sor2 = this.gridOptions.sortConfig) === null || _this$gridOptions$sor2 === void 0 ? void 0 : _this$gridOptions$sor2.frontendSort) && !isFrontendPagination;
62387
+
62388
+ // 无论哪种模式,都保存排序状态用于恢复箭头高亮
62378
62389
  this.sortState.field = property;
62379
62390
  this.sortState.order = order;
62380
- if (shouldHandleSort) {
62381
- var _this$gridOptions$pag4, _this$gridOptions$pag5;
62382
- const newData = this.spliteListData(this.allData, (_this$gridOptions$pag4 = this.gridOptions.pagerConfig) !== null && _this$gridOptions$pag4 !== void 0 && _this$gridOptions$pag4.frontendPagination ? this.gridOptions.pagerConfig.currentPage : null, (_this$gridOptions$pag5 = this.gridOptions.pagerConfig) !== null && _this$gridOptions$pag5 !== void 0 && _this$gridOptions$pag5.frontendPagination ? this.gridOptions.pagerConfig.pageSize : null);
62391
+ if (isFrontendPagination) {
62392
+ // 前端分页模式:手动处理排序和分页
62393
+ const newData = this.spliteListData(this.allData, this.gridOptions.pagerConfig.currentPage, this.gridOptions.pagerConfig.pageSize);
62383
62394
  if (this.$refs.xGrid) {
62384
62395
  this.$refs.xGrid.reloadData(newData);
62385
62396
  this.$nextTick(() => {
@@ -62392,8 +62403,7 @@ var custom_column_component = normalizeComponent(
62392
62403
  }, 100);
62393
62404
  }
62394
62405
  setTimeout(() => {
62395
- var _this$gridOptions$pag6;
62396
- if ((_this$gridOptions$pag6 = this.gridOptions.pagerConfig) !== null && _this$gridOptions$pag6 !== void 0 && _this$gridOptions$pag6.frontendPagination && this.$refs.xGrid) {
62406
+ if (this.$refs.xGrid) {
62397
62407
  // 前端分页时,排序状态变化,回到第一页
62398
62408
  const currentPage = this.gridOptions.pagerConfig.currentPage;
62399
62409
  if (currentPage !== 1) {
@@ -62410,8 +62420,30 @@ var custom_column_component = normalizeComponent(
62410
62420
  }, 0);
62411
62421
  });
62412
62422
  }
62423
+ } else if (isVirtualScrollWithSort) {
62424
+ // 虚拟滚动模式:手动处理排序(支持置顶行)
62425
+ const newData = this.spliteListData(this.allData, null, null);
62426
+ if (this.$refs.xGrid) {
62427
+ this.$refs.xGrid.reloadData(newData);
62428
+ this.$nextTick(() => {
62429
+ if (property && order) {
62430
+ setTimeout(() => {
62431
+ // 只高亮箭头,表格内部不排序(因为数据已经排序好)
62432
+ this.$refs.xGrid.sort(property, order, {
62433
+ silent: true
62434
+ });
62435
+ }, 100);
62436
+ }
62437
+ setTimeout(() => {
62438
+ if (this.$refs.xGrid) {
62439
+ // 排序后滚动到顶部
62440
+ this.$refs.xGrid.scrollTo(0, 0);
62441
+ }
62442
+ }, 0);
62443
+ });
62444
+ }
62413
62445
  } else {
62414
- // 后端分页模式下,确保排序箭头高亮
62446
+ // 后端模式:确保排序箭头高亮
62415
62447
  this.$nextTick(() => {
62416
62448
  if (property && order && this.$refs.xGrid) {
62417
62449
  setTimeout(() => {
@@ -62446,6 +62478,7 @@ var custom_column_component = normalizeComponent(
62446
62478
  this.sortState.order = defaultSort.order;
62447
62479
  setTimeout(() => {
62448
62480
  if (this.$refs.xGrid) {
62481
+ // 🔧 两种模式都使用手动排序(支持置顶行)
62449
62482
  this.$refs.xGrid.sort(defaultSort.field, defaultSort.order, {
62450
62483
  silent: true
62451
62484
  });
@@ -62458,9 +62491,9 @@ var custom_column_component = normalizeComponent(
62458
62491
  * 初始化默认排序(支持前端分页和虚拟滚动)
62459
62492
  */
62460
62493
  initDefaultSortForFrontendPagination() {
62461
- var _this$gridOptions$pag7, _this$gridOptions$sor4, _this$gridOptions$sor5;
62494
+ var _this$gridOptions$pag4, _this$gridOptions$sor4, _this$gridOptions$sor5;
62462
62495
  // 支持前端分页或前端排序模式(包括虚拟滚动)
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);
62496
+ const shouldInitSort = ((_this$gridOptions$pag4 = this.gridOptions.pagerConfig) === null || _this$gridOptions$pag4 === void 0 ? void 0 : _this$gridOptions$pag4.frontendPagination) || ((_this$gridOptions$sor4 = this.gridOptions.sortConfig) === null || _this$gridOptions$sor4 === void 0 ? void 0 : _this$gridOptions$sor4.frontendSort);
62464
62497
  if (!shouldInitSort) {
62465
62498
  return;
62466
62499
  }
@@ -62470,11 +62503,13 @@ var custom_column_component = normalizeComponent(
62470
62503
  this.sortState.field = defaultSort.field;
62471
62504
  this.sortState.order = defaultSort.order;
62472
62505
 
62473
- // 在下一个tick中应用排序高亮
62506
+ // 在下一个tick中应用排序
62474
62507
  this.$nextTick(() => {
62475
62508
  if (this.$refs.xGrid) {
62476
62509
  setTimeout(() => {
62477
- // 只高亮排序图标,不触发排序事件
62510
+ // 🔧 两种模式都使用手动排序(支持置顶行):
62511
+ // - 前端分页:数据在 spliteListData 中排序,只需UI高亮
62512
+ // - 虚拟滚动:数据在 spliteListData 中排序,只需UI高亮
62478
62513
  this.$refs.xGrid.sort(defaultSort.field, defaultSort.order, {
62479
62514
  silent: true
62480
62515
  });
@@ -62487,9 +62522,9 @@ var custom_column_component = normalizeComponent(
62487
62522
  * 确保默认排序高亮(数据变化时调用,支持前端分页和虚拟滚动)
62488
62523
  */
62489
62524
  ensureDefaultSortHighlight() {
62490
- var _this$gridOptions$pag8, _this$gridOptions$sor6, _this$gridOptions$sor7;
62525
+ var _this$gridOptions$pag5, _this$gridOptions$sor6, _this$gridOptions$sor7;
62491
62526
  // 支持前端分页或前端排序模式(包括虚拟滚动)
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);
62527
+ const shouldEnsureSort = ((_this$gridOptions$pag5 = this.gridOptions.pagerConfig) === null || _this$gridOptions$pag5 === void 0 ? void 0 : _this$gridOptions$pag5.frontendPagination) || ((_this$gridOptions$sor6 = this.gridOptions.sortConfig) === null || _this$gridOptions$sor6 === void 0 ? void 0 : _this$gridOptions$sor6.frontendSort);
62493
62528
  if (!shouldEnsureSort) {
62494
62529
  return;
62495
62530
  }
@@ -62499,9 +62534,12 @@ var custom_column_component = normalizeComponent(
62499
62534
  this.sortState.field = defaultSort.field;
62500
62535
  this.sortState.order = defaultSort.order;
62501
62536
 
62502
- // 应用排序高亮
62537
+ // 应用排序
62503
62538
  if (this.$refs.xGrid) {
62504
62539
  setTimeout(() => {
62540
+ // 🔧 两种模式都使用手动排序(支持置顶行):
62541
+ // - 前端分页:数据已在 spliteListData 中排序,只需UI高亮(silent: true)
62542
+ // - 虚拟滚动:数据已在 spliteListData 中排序,只需UI高亮(silent: true)
62505
62543
  this.$refs.xGrid.sort(defaultSort.field, defaultSort.order, {
62506
62544
  silent: true
62507
62545
  });
@@ -62523,8 +62561,8 @@ var custom_column_component = normalizeComponent(
62523
62561
  ;
62524
62562
  var table_component = normalizeComponent(
62525
62563
  components_tablevue_type_script_lang_js,
62526
- tablevue_type_template_id_5b90b233_render,
62527
- tablevue_type_template_id_5b90b233_staticRenderFns,
62564
+ tablevue_type_template_id_22f2fb85_render,
62565
+ tablevue_type_template_id_22f2fb85_staticRenderFns,
62528
62566
  false,
62529
62567
  null,
62530
62568
  null,