@newview/ui 1.1.91 → 1.1.93
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 +6 -0
- package/dist/newview-ui.js +72 -14
- package/dist/newview-ui.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/types/Grid.d.ts +30 -1
package/README.md
CHANGED
package/dist/newview-ui.js
CHANGED
|
@@ -33229,7 +33229,7 @@ let GridColumnInstance$1 = class GridColumnInstance2 extends BaseInstance {
|
|
|
33229
33229
|
}
|
|
33230
33230
|
};
|
|
33231
33231
|
const GridColumn_vue_vue_type_style_index_0_lang$1 = "";
|
|
33232
|
-
const
|
|
33232
|
+
const GridColumn_vue_vue_type_style_index_1_scoped_acb5bdbf_lang = "";
|
|
33233
33233
|
const _hoisted_1$h = { class: "gridColumn" };
|
|
33234
33234
|
const _hoisted_2$e = {
|
|
33235
33235
|
key: 3,
|
|
@@ -33468,10 +33468,15 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
33468
33468
|
class: "nvgridcell-color",
|
|
33469
33469
|
modelValue: scope.row[_ctx.getField(column)],
|
|
33470
33470
|
"onUpdate:modelValue": ($event) => scope.row[_ctx.getField(column)] = $event,
|
|
33471
|
+
alpha: column.color && column.color.alpha ? column.color.alpha : false,
|
|
33472
|
+
format: column.color && column.color.format ? column.color.format : "hex",
|
|
33473
|
+
disabled: column.color && column.color.disabled ? column.color.disabled : false,
|
|
33474
|
+
recommend: column.color && column.color.recommend ? column.color.recommend : false,
|
|
33475
|
+
colors: column.color && column.color.colors ? column.color.colors : [],
|
|
33471
33476
|
transfer: "",
|
|
33472
33477
|
"transfer-class-name": "nvgridcell-color-transfer",
|
|
33473
33478
|
onOnChange: ($event) => _ctx.doChange(column, scope.row)
|
|
33474
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "onOnChange"])) : column.colType == "mile" ? (openBlock(), createBlock(_component_MileEdit, {
|
|
33479
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "alpha", "format", "disabled", "recommend", "colors", "onOnChange"])) : column.colType == "mile" ? (openBlock(), createBlock(_component_MileEdit, {
|
|
33475
33480
|
key: 11,
|
|
33476
33481
|
dataValue: scope.row[_ctx.getField(column)],
|
|
33477
33482
|
prefix: (_a = column.mileConfig) == null ? void 0 : _a.prefix,
|
|
@@ -33590,7 +33595,7 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
33590
33595
|
}), 256))
|
|
33591
33596
|
]);
|
|
33592
33597
|
}
|
|
33593
|
-
const GridColumn$1 = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$m], ["__scopeId", "data-v-
|
|
33598
|
+
const GridColumn$1 = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$m], ["__scopeId", "data-v-acb5bdbf"]]);
|
|
33594
33599
|
const _sfc_main$l = defineComponent({
|
|
33595
33600
|
name: "FilterDaterange",
|
|
33596
33601
|
props: {
|
|
@@ -58486,9 +58491,16 @@ let GridInstance$1 = class GridInstance2 extends BaseInstance {
|
|
|
58486
58491
|
__publicField2(this, "crudTable", ref());
|
|
58487
58492
|
__publicField2(this, "getPageSize", () => {
|
|
58488
58493
|
let pagesize = 25;
|
|
58489
|
-
if (this.
|
|
58490
|
-
|
|
58491
|
-
|
|
58494
|
+
if (this.getPageConfig("showSizer", false)) {
|
|
58495
|
+
const pageSizeOpts = this.getPageConfig("pageSizeOpts", [25, 50, 100]);
|
|
58496
|
+
if (Array.isArray(pageSizeOpts) && pageSizeOpts.length > 0) {
|
|
58497
|
+
pagesize = pageSizeOpts[0];
|
|
58498
|
+
}
|
|
58499
|
+
} else {
|
|
58500
|
+
if (this.crudTable.value && this.crudTable.value.clientHeight > 0) {
|
|
58501
|
+
let height = this.crudTable.value.clientHeight / 40;
|
|
58502
|
+
pagesize = parseInt(height);
|
|
58503
|
+
}
|
|
58492
58504
|
}
|
|
58493
58505
|
return this.utilities.isNull(this.props.option.setting) || this.utilities.isNull(this.props.option.setting.pageSize) ? pagesize : this.props.option.setting.pageSize;
|
|
58494
58506
|
});
|
|
@@ -58725,6 +58737,23 @@ let GridInstance$1 = class GridInstance2 extends BaseInstance {
|
|
|
58725
58737
|
}
|
|
58726
58738
|
});
|
|
58727
58739
|
});
|
|
58740
|
+
__publicField2(this, "doPageSizeChange", async (data2) => {
|
|
58741
|
+
nextTick(async () => {
|
|
58742
|
+
if (this.props.option.event && this.props.option.event.event_pageChangeBefore) {
|
|
58743
|
+
if (!this.props.option.event.event_pageChangeBefore()) {
|
|
58744
|
+
this.setPageIndex(this.pageIndexBefore.value);
|
|
58745
|
+
return;
|
|
58746
|
+
}
|
|
58747
|
+
}
|
|
58748
|
+
this.setPageSize(data2);
|
|
58749
|
+
this.setPageIndex(1);
|
|
58750
|
+
if (!this.utilities.isNull(this.readFunction)) {
|
|
58751
|
+
this.loadDataing.value = true;
|
|
58752
|
+
await this.readFunction(this.getLoadDataOptions());
|
|
58753
|
+
this.loadDataing.value = false;
|
|
58754
|
+
}
|
|
58755
|
+
});
|
|
58756
|
+
});
|
|
58728
58757
|
//#endregion 加载数据 End
|
|
58729
58758
|
//#region 工具栏及默认事件
|
|
58730
58759
|
/**
|
|
@@ -59401,8 +59430,8 @@ let GridInstance$1 = class GridInstance2 extends BaseInstance {
|
|
|
59401
59430
|
}
|
|
59402
59431
|
//#endregion 公开方法 END
|
|
59403
59432
|
};
|
|
59404
|
-
const
|
|
59405
|
-
const _withScopeId$3 = (n) => (pushScopeId("data-v-
|
|
59433
|
+
const Grid_vue_vue_type_style_index_0_scoped_1b3fc6d2_lang = "";
|
|
59434
|
+
const _withScopeId$3 = (n) => (pushScopeId("data-v-1b3fc6d2"), n = n(), popScopeId(), n);
|
|
59406
59435
|
const _hoisted_1$e = { class: "nv-crud nv-pos-r" };
|
|
59407
59436
|
const _hoisted_2$b = { class: "grid-msg" };
|
|
59408
59437
|
const _hoisted_3$9 = { class: "nv-crud-body" };
|
|
@@ -59620,16 +59649,21 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
59620
59649
|
createVNode(_component_Page, {
|
|
59621
59650
|
modelValue: _ctx.pageIndex,
|
|
59622
59651
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.pageIndex = $event),
|
|
59652
|
+
transfer: true,
|
|
59623
59653
|
total: _ctx.total,
|
|
59624
59654
|
"page-size": _ctx.getPageSize(),
|
|
59625
59655
|
simple: _ctx.getPageConfig("simple", false),
|
|
59626
59656
|
"show-total": "",
|
|
59627
|
-
|
|
59628
|
-
|
|
59657
|
+
"show-elevator": _ctx.getPageConfig("showElevator", false),
|
|
59658
|
+
"show-sizer": _ctx.getPageConfig("showSizer", false),
|
|
59659
|
+
"page-size-opts": _ctx.getPageConfig("pageSizeOpts", [25, 50, 100]),
|
|
59660
|
+
onOnChange: _ctx.doPageChange,
|
|
59661
|
+
onOnPageSizeChange: _ctx.doPageSizeChange
|
|
59662
|
+
}, null, 8, ["modelValue", "total", "page-size", "simple", "show-elevator", "show-sizer", "page-size-opts", "onOnChange", "onOnPageSizeChange"])
|
|
59629
59663
|
])) : createCommentVNode("", true)
|
|
59630
59664
|
]);
|
|
59631
59665
|
}
|
|
59632
|
-
const Grid = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$j], ["__scopeId", "data-v-
|
|
59666
|
+
const Grid = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$j], ["__scopeId", "data-v-1b3fc6d2"]]);
|
|
59633
59667
|
const GridCellContent = defineComponent({
|
|
59634
59668
|
name: "GridCellContent",
|
|
59635
59669
|
props: {
|
|
@@ -241036,9 +241070,16 @@ class GridInstance extends BaseInstance {
|
|
|
241036
241070
|
__publicField2(this, "crudTable", ref());
|
|
241037
241071
|
__publicField2(this, "getPageSize", () => {
|
|
241038
241072
|
let pagesize = 25;
|
|
241039
|
-
if (this.
|
|
241040
|
-
|
|
241041
|
-
|
|
241073
|
+
if (this.getPageConfig("showSizer", false)) {
|
|
241074
|
+
const pageSizeOpts = this.getPageConfig("pageSizeOpts", [25, 50, 100]);
|
|
241075
|
+
if (Array.isArray(pageSizeOpts) && pageSizeOpts.length > 0) {
|
|
241076
|
+
pagesize = pageSizeOpts[0];
|
|
241077
|
+
}
|
|
241078
|
+
} else {
|
|
241079
|
+
if (this.crudTable.value && this.crudTable.value.clientHeight > 0) {
|
|
241080
|
+
let height = this.crudTable.value.clientHeight / 40;
|
|
241081
|
+
pagesize = parseInt(height);
|
|
241082
|
+
}
|
|
241042
241083
|
}
|
|
241043
241084
|
return this.utilities.isNull(this.props.option.setting) || this.utilities.isNull(this.props.option.setting.pageSize) ? pagesize : this.props.option.setting.pageSize;
|
|
241044
241085
|
});
|
|
@@ -241275,6 +241316,23 @@ class GridInstance extends BaseInstance {
|
|
|
241275
241316
|
}
|
|
241276
241317
|
});
|
|
241277
241318
|
});
|
|
241319
|
+
__publicField2(this, "doPageSizeChange", async (data2) => {
|
|
241320
|
+
nextTick(async () => {
|
|
241321
|
+
if (this.props.option.event && this.props.option.event.event_pageChangeBefore) {
|
|
241322
|
+
if (!this.props.option.event.event_pageChangeBefore()) {
|
|
241323
|
+
this.setPageIndex(this.pageIndexBefore.value);
|
|
241324
|
+
return;
|
|
241325
|
+
}
|
|
241326
|
+
}
|
|
241327
|
+
this.setPageSize(data2);
|
|
241328
|
+
this.setPageIndex(1);
|
|
241329
|
+
if (!this.utilities.isNull(this.readFunction)) {
|
|
241330
|
+
this.loadDataing.value = true;
|
|
241331
|
+
await this.readFunction(this.getLoadDataOptions());
|
|
241332
|
+
this.loadDataing.value = false;
|
|
241333
|
+
}
|
|
241334
|
+
});
|
|
241335
|
+
});
|
|
241278
241336
|
//#endregion 加载数据 End
|
|
241279
241337
|
//#region 工具栏及默认事件
|
|
241280
241338
|
/**
|