mooho-base-admin-plus 2.4.5 → 2.4.7

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/history.md CHANGED
@@ -37,3 +37,5 @@
37
37
  2.4.3 - 附件下载改为弹出新页,为了兼容 某些文件下载时直接打开,无法回退。如 pdf
38
38
  2.4.4 - 附件下载 div 改为 span,解决点击空白处也会下载的问题
39
39
  2.4.5 - 修复表格中显示图片报错的 bug
40
+ 2.4.6 - 表格允许查看、允许编辑、允许删除属性增加函数类型
41
+ 2.4.7 - 计算列触发条件优化
@@ -23115,7 +23115,11 @@ var mixinPage = {
23115
23115
  }
23116
23116
  }
23117
23117
  if (!!(expression2 || "").trim()) {
23118
- triggers.push(expression2);
23118
+ if (expression2.indexOf(".") >= 0) {
23119
+ triggers.push(expression2.split(".")[0] + "ID");
23120
+ } else {
23121
+ triggers.push(expression2);
23122
+ }
23119
23123
  }
23120
23124
  return triggers;
23121
23125
  },
@@ -37386,11 +37390,13 @@ const _sfc_main$w = {
37386
37390
  calculate = this.calcStat("avg", calculate);
37387
37391
  let triggers = this.getTriggers(calculate);
37388
37392
  if (!sender || triggers.some((item) => item == sender.code) || column.calculate != calculate) {
37389
- let result2 = this.calculate(calculate, this.data);
37390
- if (column.digit != null) {
37391
- result2 = this.keepDecimal(result2, column.digit, column.fixedDigit);
37392
- }
37393
- this.setData(this.data, column.code, result2);
37393
+ setTimeout(() => {
37394
+ let result2 = this.calculate(calculate, this.data);
37395
+ if (column.digit != null) {
37396
+ result2 = this.keepDecimal(result2, column.digit, column.fixedDigit);
37397
+ }
37398
+ this.setData(this.data, column.code, result2);
37399
+ });
37394
37400
  }
37395
37401
  }
37396
37402
  }
@@ -42631,15 +42637,15 @@ const _sfc_main$q = {
42631
42637
  default: true
42632
42638
  },
42633
42639
  editEnable: {
42634
- type: Boolean,
42640
+ type: [Boolean, Function],
42635
42641
  default: true
42636
42642
  },
42637
42643
  showEnable: {
42638
- type: Boolean,
42644
+ type: [Boolean, Function],
42639
42645
  default: true
42640
42646
  },
42641
42647
  removeEnable: {
42642
- type: Boolean,
42648
+ type: [Boolean, Function],
42643
42649
  default: true
42644
42650
  },
42645
42651
  draggable: {
@@ -44623,7 +44629,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
44623
44629
  row: $options.rowData(row, index2),
44624
44630
  index: index2
44625
44631
  }, void 0, true),
44626
- $options.judge($data.tableView.editEnable, $data.tableView.editEnableJson, $options.rowData(row, index2)) && $props.editEnable && !$props.readonly ? (openBlock(), createBlock(_component_Button, {
44632
+ $options.judge($data.tableView.editEnable, $data.tableView.editEnableJson, $options.rowData(row, index2)) && (typeof $props.editEnable === "function" ? $props.editEnable(row) : $props.editEnable) && !$props.readonly ? (openBlock(), createBlock(_component_Button, {
44627
44633
  key: 0,
44628
44634
  size: "small",
44629
44635
  title: _ctx.$t("Front_Btn_Edit"),
@@ -44631,7 +44637,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
44631
44637
  "custom-icon": "fa fa-edit",
44632
44638
  onClick: ($event) => $options.edit($options.rowData(row, index2), index2)
44633
44639
  }, null, 8, ["title", "onClick"])) : createCommentVNode("v-if", true),
44634
- $options.judge($data.tableView.showEnable, $data.tableView.showEnableJson, $options.rowData(row, index2)) && $props.showEnable ? (openBlock(), createBlock(_component_Button, {
44640
+ $options.judge($data.tableView.showEnable, $data.tableView.showEnableJson, $options.rowData(row, index2)) && (typeof $props.showEnable === "function" ? $props.showEnable(row) : $props.showEnable) ? (openBlock(), createBlock(_component_Button, {
44635
44641
  key: 1,
44636
44642
  size: "small",
44637
44643
  title: _ctx.$t("Front_Btn_Detail"),
@@ -44639,7 +44645,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
44639
44645
  "custom-icon": "fa fa-file-alt",
44640
44646
  onClick: ($event) => $options.show($options.rowData(row, index2), index2)
44641
44647
  }, null, 8, ["title", "onClick"])) : createCommentVNode("v-if", true),
44642
- $options.judge($data.tableView.removeEnable, $data.tableView.removeEnableJson, $options.rowData(row, index2)) && $props.removeEnable && !$props.readonly ? (openBlock(), createBlock(_component_Button, {
44648
+ $options.judge($data.tableView.removeEnable, $data.tableView.removeEnableJson, $options.rowData(row, index2)) && (typeof $props.removeEnable === "function" ? $props.removeEnable(row) : $props.removeEnable) && !$props.readonly ? (openBlock(), createBlock(_component_Button, {
44643
44649
  key: 2,
44644
44650
  size: "small",
44645
44651
  title: _ctx.$t("Front_Btn_Remove"),