@newview/ui 1.1.98 → 1.2.0
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 +5 -0
- package/dist/newview-ui.js +53 -15
- package/dist/newview-ui.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/types/Grid.d.ts +3 -3
package/README.md
CHANGED
package/dist/newview-ui.js
CHANGED
|
@@ -32470,7 +32470,7 @@ let ToolbarInstance$1 = class ToolbarInstance2 extends BaseInstance {
|
|
|
32470
32470
|
this.setShowOptions();
|
|
32471
32471
|
}
|
|
32472
32472
|
}
|
|
32473
|
-
return isShow;
|
|
32473
|
+
return isShow && this.otherCommon.btnIsShowForOp(item2.name);
|
|
32474
32474
|
});
|
|
32475
32475
|
/**
|
|
32476
32476
|
* 获取Icon
|
|
@@ -32739,13 +32739,23 @@ let GridColumnInstance$1 = class GridColumnInstance2 extends BaseInstance {
|
|
|
32739
32739
|
return !this.utilities.isNull(column.rowButtons) && column.rowButtons.length > 0;
|
|
32740
32740
|
});
|
|
32741
32741
|
__publicField2(this, "getIsShowRowButton", (btn, row) => {
|
|
32742
|
+
let isshow = true;
|
|
32742
32743
|
if (this.utilities.isNull(btn.isShow)) {
|
|
32743
|
-
|
|
32744
|
+
isshow = true;
|
|
32745
|
+
} else {
|
|
32746
|
+
if (typeof btn.isShow == "boolean") {
|
|
32747
|
+
isshow = btn.isShow;
|
|
32748
|
+
} else {
|
|
32749
|
+
isshow = btn.isShow(row);
|
|
32750
|
+
}
|
|
32744
32751
|
}
|
|
32745
|
-
|
|
32746
|
-
|
|
32752
|
+
let code = btn.name;
|
|
32753
|
+
if (btn.text == "编辑") {
|
|
32754
|
+
code = "edit";
|
|
32755
|
+
} else if (btn.text == "删除" || btn.text == "移除" || btn.text == "清除") {
|
|
32756
|
+
code = "delete";
|
|
32747
32757
|
}
|
|
32748
|
-
return
|
|
32758
|
+
return isshow && this.otherCommon.btnIsShowForOp(code);
|
|
32749
32759
|
});
|
|
32750
32760
|
/**
|
|
32751
32761
|
* 获取行按钮
|
|
@@ -33002,7 +33012,6 @@ let GridColumnInstance$1 = class GridColumnInstance2 extends BaseInstance {
|
|
|
33002
33012
|
//#endregion 事件 END
|
|
33003
33013
|
//#region 表头筛选
|
|
33004
33014
|
__publicField2(this, "getColumFilters", (filter3) => {
|
|
33005
|
-
debugger;
|
|
33006
33015
|
if (filter3) {
|
|
33007
33016
|
if (filter3.type == "select") {
|
|
33008
33017
|
return filter3.options.map((e) => {
|
|
@@ -33010,8 +33019,8 @@ let GridColumnInstance$1 = class GridColumnInstance2 extends BaseInstance {
|
|
|
33010
33019
|
return e;
|
|
33011
33020
|
});
|
|
33012
33021
|
} else if (filter3.type == "daterange") {
|
|
33013
|
-
if ((filter3 == null ? void 0 : filter3.
|
|
33014
|
-
return [{ data: filter3.
|
|
33022
|
+
if ((filter3 == null ? void 0 : filter3.defaultFilteringTimeRange) && (filter3 == null ? void 0 : filter3.defaultFilteringTimeRange.length) >= 2) {
|
|
33023
|
+
return [{ data: filter3.defaultFilteringTimeRange }];
|
|
33015
33024
|
} else {
|
|
33016
33025
|
return [{ data: ["", ""] }];
|
|
33017
33026
|
}
|
|
@@ -57994,7 +58003,7 @@ let GridInstance$1 = class GridInstance2 extends BaseInstance {
|
|
|
57994
58003
|
super();
|
|
57995
58004
|
__publicField2(this, "props");
|
|
57996
58005
|
__publicField2(this, "ctx");
|
|
57997
|
-
// API实例化
|
|
58006
|
+
// API实例化
|
|
57998
58007
|
// 全局属性
|
|
57999
58008
|
__publicField2(this, "xTable", ref());
|
|
58000
58009
|
//#region 查询面板
|
|
@@ -58840,6 +58849,7 @@ let GridInstance$1 = class GridInstance2 extends BaseInstance {
|
|
|
58840
58849
|
return;
|
|
58841
58850
|
}
|
|
58842
58851
|
for (const item2 of toolbars) {
|
|
58852
|
+
item2.isShow = this.getIsShowButton(item2) && this.otherCommon.btnIsShowForOp(item2.name);
|
|
58843
58853
|
switch (item2.name) {
|
|
58844
58854
|
case "add":
|
|
58845
58855
|
if (this.utilities.isNull(item2.onclick)) {
|
|
@@ -58887,6 +58897,7 @@ let GridInstance$1 = class GridInstance2 extends BaseInstance {
|
|
|
58887
58897
|
}
|
|
58888
58898
|
break;
|
|
58889
58899
|
case "exportexcel":
|
|
58900
|
+
item2.isShow = this.getIsShowButton(item2) && this.otherCommon.btnIsShowForOp("export");
|
|
58890
58901
|
if (this.utilities.isNull(item2.onclick)) {
|
|
58891
58902
|
item2.onclick = () => {
|
|
58892
58903
|
this.doExportExcel();
|
|
@@ -58905,6 +58916,19 @@ let GridInstance$1 = class GridInstance2 extends BaseInstance {
|
|
|
58905
58916
|
}
|
|
58906
58917
|
}
|
|
58907
58918
|
});
|
|
58919
|
+
__publicField2(this, "getIsShowButton", (btn) => {
|
|
58920
|
+
let isshow = true;
|
|
58921
|
+
if (this.utilities.isNull(btn.isShow)) {
|
|
58922
|
+
isshow = true;
|
|
58923
|
+
} else {
|
|
58924
|
+
if (typeof btn.isShow == "boolean") {
|
|
58925
|
+
isshow = btn.isShow;
|
|
58926
|
+
} else {
|
|
58927
|
+
isshow = btn.isShow();
|
|
58928
|
+
}
|
|
58929
|
+
}
|
|
58930
|
+
return isshow;
|
|
58931
|
+
});
|
|
58908
58932
|
/**
|
|
58909
58933
|
* 获取添加的数据
|
|
58910
58934
|
* @param row
|
|
@@ -59455,8 +59479,8 @@ let GridInstance$1 = class GridInstance2 extends BaseInstance {
|
|
|
59455
59479
|
}
|
|
59456
59480
|
//#endregion 公开方法 END
|
|
59457
59481
|
};
|
|
59458
|
-
const
|
|
59459
|
-
const _withScopeId$3 = (n) => (pushScopeId("data-v-
|
|
59482
|
+
const Grid_vue_vue_type_style_index_0_scoped_1b3fc6d2_lang = "";
|
|
59483
|
+
const _withScopeId$3 = (n) => (pushScopeId("data-v-1b3fc6d2"), n = n(), popScopeId(), n);
|
|
59460
59484
|
const _hoisted_1$e = { class: "nv-crud nv-pos-r" };
|
|
59461
59485
|
const _hoisted_2$b = { class: "grid-msg" };
|
|
59462
59486
|
const _hoisted_3$9 = { class: "nv-crud-body" };
|
|
@@ -59493,7 +59517,6 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
59493
59517
|
const _component_vxe_table = resolveComponent("vxe-table");
|
|
59494
59518
|
const _component_Page = resolveComponent("Page");
|
|
59495
59519
|
return openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
59496
|
-
createTextVNode(" 123 "),
|
|
59497
59520
|
createVNode(_component_Spin, {
|
|
59498
59521
|
fix: "",
|
|
59499
59522
|
show: _ctx.doMethodLoading.show,
|
|
@@ -59689,7 +59712,7 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
59689
59712
|
])) : createCommentVNode("", true)
|
|
59690
59713
|
]);
|
|
59691
59714
|
}
|
|
59692
|
-
const Grid = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$j], ["__scopeId", "data-v-
|
|
59715
|
+
const Grid = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$j], ["__scopeId", "data-v-1b3fc6d2"]]);
|
|
59693
59716
|
const GridCellContent = defineComponent({
|
|
59694
59717
|
name: "GridCellContent",
|
|
59695
59718
|
props: {
|
|
@@ -240579,7 +240602,7 @@ class GridInstance extends BaseInstance {
|
|
|
240579
240602
|
super();
|
|
240580
240603
|
__publicField2(this, "props");
|
|
240581
240604
|
__publicField2(this, "ctx");
|
|
240582
|
-
// API实例化
|
|
240605
|
+
// API实例化
|
|
240583
240606
|
// 全局属性
|
|
240584
240607
|
__publicField2(this, "xTable", ref());
|
|
240585
240608
|
//#region 查询面板
|
|
@@ -241425,6 +241448,7 @@ class GridInstance extends BaseInstance {
|
|
|
241425
241448
|
return;
|
|
241426
241449
|
}
|
|
241427
241450
|
for (const item2 of toolbars) {
|
|
241451
|
+
item2.isShow = this.getIsShowButton(item2) && this.otherCommon.btnIsShowForOp(item2.name);
|
|
241428
241452
|
switch (item2.name) {
|
|
241429
241453
|
case "add":
|
|
241430
241454
|
if (this.utilities.isNull(item2.onclick)) {
|
|
@@ -241472,6 +241496,7 @@ class GridInstance extends BaseInstance {
|
|
|
241472
241496
|
}
|
|
241473
241497
|
break;
|
|
241474
241498
|
case "exportexcel":
|
|
241499
|
+
item2.isShow = this.getIsShowButton(item2) && this.otherCommon.btnIsShowForOp("export");
|
|
241475
241500
|
if (this.utilities.isNull(item2.onclick)) {
|
|
241476
241501
|
item2.onclick = () => {
|
|
241477
241502
|
this.doExportExcel();
|
|
@@ -241490,6 +241515,19 @@ class GridInstance extends BaseInstance {
|
|
|
241490
241515
|
}
|
|
241491
241516
|
}
|
|
241492
241517
|
});
|
|
241518
|
+
__publicField2(this, "getIsShowButton", (btn) => {
|
|
241519
|
+
let isshow = true;
|
|
241520
|
+
if (this.utilities.isNull(btn.isShow)) {
|
|
241521
|
+
isshow = true;
|
|
241522
|
+
} else {
|
|
241523
|
+
if (typeof btn.isShow == "boolean") {
|
|
241524
|
+
isshow = btn.isShow;
|
|
241525
|
+
} else {
|
|
241526
|
+
isshow = btn.isShow();
|
|
241527
|
+
}
|
|
241528
|
+
}
|
|
241529
|
+
return isshow;
|
|
241530
|
+
});
|
|
241493
241531
|
/**
|
|
241494
241532
|
* 获取添加的数据
|
|
241495
241533
|
* @param row
|
|
@@ -243910,7 +243948,7 @@ class ToolbarInstance extends BaseInstance {
|
|
|
243910
243948
|
this.setShowOptions();
|
|
243911
243949
|
}
|
|
243912
243950
|
}
|
|
243913
|
-
return isShow;
|
|
243951
|
+
return isShow && this.otherCommon.btnIsShowForOp(item2.name);
|
|
243914
243952
|
});
|
|
243915
243953
|
/**
|
|
243916
243954
|
* 获取Icon
|