mooho-base-admin-plus 2.8.0 → 2.8.2

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
@@ -140,3 +140,6 @@ mooho-base-admin-plus@2.7.4 - 修复全选的bug
140
140
  mooho-base-admin-plus@2.7.5 - 将List组件改为后端分页
141
141
  mooho-base-admin-plus@2.7.6 - 修复审批后没有刷新的bug
142
142
  mooho-base-admin-plus@2.7.7 - 增加自定义显示格式
143
+ mooho-base-admin-plus@2.8.0 - 表格增加只返回所需字段的选项
144
+ mooho-base-admin-plus@2.8.1 - 表格增加必须返回的字段属性
145
+ mooho-base-admin-plus@2.8.2 - 优化树结构显示方式
@@ -20263,7 +20263,7 @@ function _sfc_render$15(r, a, o, s, l, u) {
20263
20263
  column: withCtx(({ row: y, column: _, code: S }) => [
20264
20264
  S == "name" ? (openBlock(), createElementBlock("div", {
20265
20265
  key: 0,
20266
- style: normalizeStyle$1({ "font-weight": y.hasChildren ? "bold" : "", "text-indent": y._depth * 12 + "px" })
20266
+ style: normalizeStyle$1({ "font-weight": y.hasChildren ? "bold" : "" })
20267
20267
  }, toDisplayString$2(r.showData(y, _)), 5)) : createCommentVNode("", !0)
20268
20268
  ]),
20269
20269
  _: 1
@@ -37971,6 +37971,12 @@ const modalForm = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_rend
37971
37971
  highlightRow: {
37972
37972
  type: Boolean,
37973
37973
  default: !1
37974
+ },
37975
+ /**
37976
+ * 必须返回的字段
37977
+ */
37978
+ returnColumns: {
37979
+ type: Array
37974
37980
  }
37975
37981
  },
37976
37982
  computed: {
@@ -38229,6 +38235,7 @@ function _sfc_render$r(r, a, o, s, l, u) {
38229
38235
  "load-data-enable": o.loadDataEnable,
38230
38236
  "row-class-name": o.rowClassName,
38231
38237
  "highlight-row": o.highlightRow,
38238
+ returnColumns: o.returnColumns,
38232
38239
  onCreate: u.create,
38233
38240
  onEdit: u.edit,
38234
38241
  onShow: u.show,
@@ -38282,7 +38289,7 @@ function _sfc_render$r(r, a, o, s, l, u) {
38282
38289
  })
38283
38290
  ]),
38284
38291
  _: 3
38285
- }, 8, ["view-code", "static", "setting-enable", "select-enable", "check-cross-page", "tree-enable", "tree-load", "has-children", "create-enable", "edit-enable", "show-enable", "remove-enable", "draggable", "filter-enable", "page-enable", "embedded", "before-load-data", "on-search", "summary-method", "page-size-opts", "span-method", "load-data-enable", "row-class-name", "highlight-row", "onCreate", "onEdit", "onShow", "onOnReady", "onOnLoadData", "onAfterInit"])
38292
+ }, 8, ["view-code", "static", "setting-enable", "select-enable", "check-cross-page", "tree-enable", "tree-load", "has-children", "create-enable", "edit-enable", "show-enable", "remove-enable", "draggable", "filter-enable", "page-enable", "embedded", "before-load-data", "on-search", "summary-method", "page-size-opts", "span-method", "load-data-enable", "row-class-name", "highlight-row", "returnColumns", "onCreate", "onEdit", "onShow", "onOnReady", "onOnLoadData", "onAfterInit"])
38286
38293
  ])
38287
38294
  ]),
38288
38295
  _: 3
@@ -40911,6 +40918,12 @@ const _sfc_main$n = {
40911
40918
  highlightRow: {
40912
40919
  type: Boolean,
40913
40920
  default: !1
40921
+ },
40922
+ /**
40923
+ * 必须返回的字段
40924
+ */
40925
+ returnColumns: {
40926
+ type: Array
40914
40927
  }
40915
40928
  },
40916
40929
  computed: {
@@ -40969,7 +40982,12 @@ const _sfc_main$n = {
40969
40982
  }
40970
40983
  if (this.tableView = s.dataView, this.tableView.columns = s.viewColumns, this.tableView.filterColumns = s.filterColumns, this.filterColumns = s.filterColumns, (this.tableView.commandButton || "").trim() ? this.commandButtons = JSON.parse(this.tableView.commandButton) : this.commandButtons = [], this.$emit("on-ready", this.tableView), this.columns = s.viewColumns.filter((l) => !(l.parentCode || "").trim()).map((l) => getColumns(s, l)), this.columns.forEach((l) => {
40971
40984
  l.name = this.getNameI18n(l) + (l.isRequired ? ' <font color="red">*</font>' : ""), l.fixed = l.isFixed ? "left" : null;
40972
- }), this.tableView.snEnable && this.columns.unshift({
40985
+ }), this.treeEnable && (this.columns.length > 0 ? (this.columns[0].tree = !0, this.columns[0].display = "inline-block") : this.columns.unshift({
40986
+ tree: !0,
40987
+ display: "inline",
40988
+ align: "left",
40989
+ width: 100
40990
+ })), this.tableView.snEnable && this.columns.unshift({
40973
40991
  title: this.$t("Front_Label_Sn"),
40974
40992
  slot: "sn",
40975
40993
  align: "center",
@@ -41020,11 +41038,6 @@ const _sfc_main$n = {
41020
41038
  type: "selection",
41021
41039
  align: "center",
41022
41040
  width: 60
41023
- }), this.treeEnable && this.columns.unshift({
41024
- tree: !0,
41025
- display: "inline",
41026
- align: "left",
41027
- width: 100
41028
41041
  }), this.tableView.size ? this.size = this.tableView.size : this.tableView.pageEnable && this.pageEnable ? this.size = Setting.layout.pageSize : this.size = 1e3, this.tableView.sorting) {
41029
41042
  let l = JSON.parse(this.tableView.sorting), u = [];
41030
41043
  for (let c in l)
@@ -41068,7 +41081,7 @@ const _sfc_main$n = {
41068
41081
  orderBy: this.orderBy
41069
41082
  };
41070
41083
  if (this.tableView.isGroupBy && (a.isGroupBy = !0, a.groupColumn = JSON.parse(this.tableView.groupColumn), a.groupMethod = JSON.parse(this.tableView.groupMethod)), this.tableView.isCustom) {
41071
- let o = await customModelApi.query(this.tableView.model, a, null, this.tableView.isReturnSimple ? this.tableView : null);
41084
+ let o = await customModelApi.query(this.tableView.model, a, this.returnColumns, this.tableView.isReturnSimple ? this.tableView : null);
41072
41085
  this.total = o.totalCount, this.data = o.data;
41073
41086
  } else if (this.tableView.isDataSource) {
41074
41087
  let o = await dataSourceApi.query(this.tableView.dataSource, a);
@@ -41077,7 +41090,7 @@ const _sfc_main$n = {
41077
41090
  let o = await modelApi.query(
41078
41091
  this.tableView.model,
41079
41092
  a,
41080
- null,
41093
+ this.returnColumns,
41081
41094
  this.tableView.isReturnSimple ? this.tableView : null,
41082
41095
  this.tableView.functionName,
41083
41096
  this.tableView.functionType
@@ -41981,7 +41994,6 @@ function _sfc_render$n(r, a, o, s, l, u) {
41981
41994
  size: "small",
41982
41995
  stripe: "",
41983
41996
  "row-key": "id",
41984
- "indent-size": 18,
41985
41997
  "update-show-children": o.treeEnable,
41986
41998
  columns: l.columns,
41987
41999
  data: l.data,
@@ -42549,7 +42561,7 @@ function _sfc_render$n(r, a, o, s, l, u) {
42549
42561
  ], 2)
42550
42562
  ], 2);
42551
42563
  }
42552
- const viewTable = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-da194f9d"]]), __vite_glob_1_32 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42564
+ const viewTable = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-b814884b"]]), __vite_glob_1_32 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42553
42565
  __proto__: null,
42554
42566
  default: viewTable
42555
42567
  }, Symbol.toStringTag, { value: "Module" })), _sfc_main$m = {