@newview/ui 1.1.90 → 1.1.92

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/README.md CHANGED
@@ -1,3 +1,12 @@
1
+ ### 1.1.92
2
+ 1、分页组件支持:分页尺寸选择、快速跳转
3
+
4
+ ### 1.1.91
5
+ 1、修复lucksheet编辑模式下删除行列单元格别名被清除问题
6
+
7
+ ### 1.1.90
8
+ 1、修改lucksheet影响移动端触摸事件问题
9
+
1
10
  ### 1.1.81
2
11
  1、select框增加getIsEnableSw优化
3
12
 
@@ -58486,9 +58486,16 @@ let GridInstance$1 = class GridInstance2 extends BaseInstance {
58486
58486
  __publicField2(this, "crudTable", ref());
58487
58487
  __publicField2(this, "getPageSize", () => {
58488
58488
  let pagesize = 25;
58489
- if (this.crudTable.value && this.crudTable.value.clientHeight > 0) {
58490
- let height = this.crudTable.value.clientHeight / 40;
58491
- pagesize = parseInt(height);
58489
+ if (this.getPageConfig("showSizer", false)) {
58490
+ const pageSizeOpts = this.getPageConfig("pageSizeOpts", [25, 50, 100]);
58491
+ if (Array.isArray(pageSizeOpts) && pageSizeOpts.length > 0) {
58492
+ pagesize = pageSizeOpts[0];
58493
+ }
58494
+ } else {
58495
+ if (this.crudTable.value && this.crudTable.value.clientHeight > 0) {
58496
+ let height = this.crudTable.value.clientHeight / 40;
58497
+ pagesize = parseInt(height);
58498
+ }
58492
58499
  }
58493
58500
  return this.utilities.isNull(this.props.option.setting) || this.utilities.isNull(this.props.option.setting.pageSize) ? pagesize : this.props.option.setting.pageSize;
58494
58501
  });
@@ -58725,6 +58732,23 @@ let GridInstance$1 = class GridInstance2 extends BaseInstance {
58725
58732
  }
58726
58733
  });
58727
58734
  });
58735
+ __publicField2(this, "doPageSizeChange", async (data2) => {
58736
+ nextTick(async () => {
58737
+ if (this.props.option.event && this.props.option.event.event_pageChangeBefore) {
58738
+ if (!this.props.option.event.event_pageChangeBefore()) {
58739
+ this.setPageIndex(this.pageIndexBefore.value);
58740
+ return;
58741
+ }
58742
+ }
58743
+ this.setPageSize(data2);
58744
+ this.setPageIndex(1);
58745
+ if (!this.utilities.isNull(this.readFunction)) {
58746
+ this.loadDataing.value = true;
58747
+ await this.readFunction(this.getLoadDataOptions());
58748
+ this.loadDataing.value = false;
58749
+ }
58750
+ });
58751
+ });
58728
58752
  //#endregion 加载数据 End
58729
58753
  //#region 工具栏及默认事件
58730
58754
  /**
@@ -59401,8 +59425,8 @@ let GridInstance$1 = class GridInstance2 extends BaseInstance {
59401
59425
  }
59402
59426
  //#endregion 公开方法 END
59403
59427
  };
59404
- const Grid_vue_vue_type_style_index_0_scoped_d80176c1_lang = "";
59405
- const _withScopeId$3 = (n) => (pushScopeId("data-v-d80176c1"), n = n(), popScopeId(), n);
59428
+ const Grid_vue_vue_type_style_index_0_scoped_1b3fc6d2_lang = "";
59429
+ const _withScopeId$3 = (n) => (pushScopeId("data-v-1b3fc6d2"), n = n(), popScopeId(), n);
59406
59430
  const _hoisted_1$e = { class: "nv-crud nv-pos-r" };
59407
59431
  const _hoisted_2$b = { class: "grid-msg" };
59408
59432
  const _hoisted_3$9 = { class: "nv-crud-body" };
@@ -59620,16 +59644,21 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
59620
59644
  createVNode(_component_Page, {
59621
59645
  modelValue: _ctx.pageIndex,
59622
59646
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.pageIndex = $event),
59647
+ transfer: true,
59623
59648
  total: _ctx.total,
59624
59649
  "page-size": _ctx.getPageSize(),
59625
59650
  simple: _ctx.getPageConfig("simple", false),
59626
59651
  "show-total": "",
59627
- onOnChange: _ctx.doPageChange
59628
- }, null, 8, ["modelValue", "total", "page-size", "simple", "onOnChange"])
59652
+ "show-elevator": _ctx.getPageConfig("showElevator", false),
59653
+ "show-sizer": _ctx.getPageConfig("showSizer", false),
59654
+ "page-size-opts": _ctx.getPageConfig("pageSizeOpts", [25, 50, 100]),
59655
+ onOnChange: _ctx.doPageChange,
59656
+ onOnPageSizeChange: _ctx.doPageSizeChange
59657
+ }, null, 8, ["modelValue", "total", "page-size", "simple", "show-elevator", "show-sizer", "page-size-opts", "onOnChange", "onOnPageSizeChange"])
59629
59658
  ])) : createCommentVNode("", true)
59630
59659
  ]);
59631
59660
  }
59632
- const Grid = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$j], ["__scopeId", "data-v-d80176c1"]]);
59661
+ const Grid = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$j], ["__scopeId", "data-v-1b3fc6d2"]]);
59633
59662
  const GridCellContent = defineComponent({
59634
59663
  name: "GridCellContent",
59635
59664
  props: {
@@ -126105,13 +126134,13 @@ function luckysheetdeletetable(type, st, ed, sheetIndex) {
126105
126134
  if (type == "row") {
126106
126135
  if (Number(sk.r) > ed) {
126107
126136
  cfg["alias"]["".concat(ky)].r -= Number(rehang);
126108
- } else if (Number(sk.r) < ed && Number(sk.r) < st) {
126137
+ } else if (Number(sk.r) <= ed && Number(sk.r) >= st) {
126109
126138
  delete cfg["alias"]["".concat(ky)];
126110
126139
  }
126111
126140
  } else {
126112
126141
  if (Number(sk.c) > ed) {
126113
126142
  cfg["alias"]["".concat(ky)].c -= Number(rehang);
126114
- } else if (Number(sk.c) < ed && Number(sk.c) < st) {
126143
+ } else if (Number(sk.c) <= ed && Number(sk.c) >= st) {
126115
126144
  delete cfg["alias"]["".concat(ky)];
126116
126145
  }
126117
126146
  }
@@ -241036,9 +241065,16 @@ class GridInstance extends BaseInstance {
241036
241065
  __publicField2(this, "crudTable", ref());
241037
241066
  __publicField2(this, "getPageSize", () => {
241038
241067
  let pagesize = 25;
241039
- if (this.crudTable.value && this.crudTable.value.clientHeight > 0) {
241040
- let height = this.crudTable.value.clientHeight / 40;
241041
- pagesize = parseInt(height);
241068
+ if (this.getPageConfig("showSizer", false)) {
241069
+ const pageSizeOpts = this.getPageConfig("pageSizeOpts", [25, 50, 100]);
241070
+ if (Array.isArray(pageSizeOpts) && pageSizeOpts.length > 0) {
241071
+ pagesize = pageSizeOpts[0];
241072
+ }
241073
+ } else {
241074
+ if (this.crudTable.value && this.crudTable.value.clientHeight > 0) {
241075
+ let height = this.crudTable.value.clientHeight / 40;
241076
+ pagesize = parseInt(height);
241077
+ }
241042
241078
  }
241043
241079
  return this.utilities.isNull(this.props.option.setting) || this.utilities.isNull(this.props.option.setting.pageSize) ? pagesize : this.props.option.setting.pageSize;
241044
241080
  });
@@ -241275,6 +241311,23 @@ class GridInstance extends BaseInstance {
241275
241311
  }
241276
241312
  });
241277
241313
  });
241314
+ __publicField2(this, "doPageSizeChange", async (data2) => {
241315
+ nextTick(async () => {
241316
+ if (this.props.option.event && this.props.option.event.event_pageChangeBefore) {
241317
+ if (!this.props.option.event.event_pageChangeBefore()) {
241318
+ this.setPageIndex(this.pageIndexBefore.value);
241319
+ return;
241320
+ }
241321
+ }
241322
+ this.setPageSize(data2);
241323
+ this.setPageIndex(1);
241324
+ if (!this.utilities.isNull(this.readFunction)) {
241325
+ this.loadDataing.value = true;
241326
+ await this.readFunction(this.getLoadDataOptions());
241327
+ this.loadDataing.value = false;
241328
+ }
241329
+ });
241330
+ });
241278
241331
  //#endregion 加载数据 End
241279
241332
  //#region 工具栏及默认事件
241280
241333
  /**