mooho-base-admin-plus 2.4.4 → 2.4.6

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mooho-base-admin-plus",
3
3
  "description": "MOOHO basic framework for admin by Vue3",
4
- "version": "2.4.4",
4
+ "version": "2.4.6",
5
5
  "author": "jinyifan <jinyifan@mooho.com.cn>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -423,7 +423,7 @@
423
423
  </template>
424
424
  </template>
425
425
  <template v-else-if="column.controlType === 'Image'">
426
- <div class="image-group" :style="{ 'justify-content': column.align ? column.align.toLowerCase() : 'center' }">
426
+ <div v-if="parseData(row, column.code)" class="image-group" :style="{ 'justify-content': column.align ? column.align.toLowerCase() : 'center' }">
427
427
  <div class="image" v-for="(item, index) in parseData(row, column.code).split(',')" :key="index">
428
428
  <img v-if="item" @click="previewImage(item)" :src="getImgUrl(item)" />
429
429
  </div>
@@ -470,7 +470,7 @@
470
470
  -->
471
471
  <slot name="commandBefore" :row="rowData(row, index)" :index="index"></slot>
472
472
  <Button
473
- v-if="judge(tableView.editEnable, tableView.editEnableJson, rowData(row, index)) && editEnable && !readonly"
473
+ v-if="judge(tableView.editEnable, tableView.editEnableJson, rowData(row, index)) && (typeof editEnable === 'function' ? editEnable(row) : editEnable) && !readonly"
474
474
  size="small"
475
475
  :title="$t('Front_Btn_Edit')"
476
476
  type="primary"
@@ -478,7 +478,7 @@
478
478
  @click="edit(rowData(row, index), index)"
479
479
  ></Button>
480
480
  <Button
481
- v-if="judge(tableView.showEnable, tableView.showEnableJson, rowData(row, index)) && showEnable"
481
+ v-if="judge(tableView.showEnable, tableView.showEnableJson, rowData(row, index)) && (typeof showEnable === 'function' ? showEnable(row) : showEnable)"
482
482
  size="small"
483
483
  :title="$t('Front_Btn_Detail')"
484
484
  type="info"
@@ -486,7 +486,11 @@
486
486
  @click="show(rowData(row, index), index)"
487
487
  ></Button>
488
488
  <Button
489
- v-if="judge(tableView.removeEnable, tableView.removeEnableJson, rowData(row, index)) && removeEnable && !readonly"
489
+ v-if="
490
+ judge(tableView.removeEnable, tableView.removeEnableJson, rowData(row, index)) &&
491
+ (typeof removeEnable === 'function' ? removeEnable(row) : removeEnable) &&
492
+ !readonly
493
+ "
490
494
  size="small"
491
495
  :title="$t('Front_Btn_Remove')"
492
496
  type="warning"
@@ -834,21 +838,21 @@
834
838
  * 允许编辑
835
839
  */
836
840
  editEnable: {
837
- type: Boolean,
841
+ type: [Boolean, Function],
838
842
  default: true
839
843
  },
840
844
  /**
841
845
  * 允许查看
842
846
  */
843
847
  showEnable: {
844
- type: Boolean,
848
+ type: [Boolean, Function],
845
849
  default: true
846
850
  },
847
851
  /**
848
852
  * 允许删除
849
853
  */
850
854
  removeEnable: {
851
- type: Boolean,
855
+ type: [Boolean, Function],
852
856
  default: true
853
857
  },
854
858
  /**