@airpower/web 0.3.1 → 0.3.3

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/dist/main.js CHANGED
@@ -541,7 +541,7 @@ var zhCn = {
541
541
  close: "关闭此对话框"
542
542
  },
543
543
  upload: {
544
- deleteTip: "按 delete 键可删除",
544
+ deleteTip: "按 Delete 键可删除",
545
545
  delete: "删除",
546
546
  preview: "查看图片",
547
547
  continue: "继续上传"
@@ -9870,7 +9870,7 @@ const _hoisted_5$6 = {
9870
9870
  class: "footer"
9871
9871
  };
9872
9872
  const _hoisted_6$4 = { class: "status" };
9873
- const _hoisted_7$3 = {
9873
+ const _hoisted_7$2 = {
9874
9874
  key: 0,
9875
9875
  class: "control"
9876
9876
  };
@@ -10209,7 +10209,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
10209
10209
  createElementVNode("div", _hoisted_6$4, [
10210
10210
  renderSlot(_ctx.$slots, "status", {}, void 0, true)
10211
10211
  ]),
10212
- !__props.hideButtons ? (openBlock(), createElementBlock("div", _hoisted_7$3, [
10212
+ !__props.hideButtons ? (openBlock(), createElementBlock("div", _hoisted_7$2, [
10213
10213
  renderSlot(_ctx.$slots, "leftCtrl", {}, void 0, true),
10214
10214
  !__props.hideConfirm ? (openBlock(), createBlock(unref(_sfc_main$v), {
10215
10215
  key: 0,
@@ -14415,7 +14415,7 @@ const _hoisted_3$6 = { class: "web-page-panel-box" };
14415
14415
  const _hoisted_4$4 = { class: "web-page-header" };
14416
14416
  const _hoisted_5$3 = { class: "web-page-title" };
14417
14417
  const _hoisted_6$2 = { class: "web-page-goto" };
14418
- const _hoisted_7$2 = { class: "web-page-jumper" };
14418
+ const _hoisted_7$1 = { class: "web-page-jumper" };
14419
14419
  const _hoisted_8$1 = {
14420
14420
  key: 1,
14421
14421
  class: "web-page-total"
@@ -14575,7 +14575,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
14575
14575
  }, 1032, ["disabled", "style", "type", "onClick"]);
14576
14576
  }), 128))
14577
14577
  ]),
14578
- createElementVNode("div", _hoisted_7$2, [
14578
+ createElementVNode("div", _hoisted_7$1, [
14579
14579
  createVNode(unref(ElInput), {
14580
14580
  modelValue: currentPage.value,
14581
14581
  "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => currentPage.value = $event),
@@ -14626,12 +14626,6 @@ const _hoisted_4$3 = {
14626
14626
  };
14627
14627
  const _hoisted_5$2 = { class: "panel-right" };
14628
14628
  const _hoisted_6$1 = { class: "panel-body" };
14629
- const _hoisted_7$1 = {
14630
- key: 1,
14631
- class: "panel-footer"
14632
- };
14633
- const _hoisted_8 = { class: "panel-footer-left" };
14634
- const _hoisted_9 = { class: "panel-footer-right" };
14635
14629
  const _sfc_main$g = /* @__PURE__ */ defineComponent({
14636
14630
  __name: "Panel",
14637
14631
  props: {
@@ -14657,13 +14651,6 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
14657
14651
  type: Boolean,
14658
14652
  default: true
14659
14653
  },
14660
- /**
14661
- * # 是否隐藏底部
14662
- */
14663
- hideFooter: {
14664
- type: Boolean,
14665
- default: false
14666
- },
14667
14654
  /**
14668
14655
  * # 是否显示图标
14669
14656
  */
@@ -14715,20 +14702,12 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
14715
14702
  ])) : createCommentVNode("", true),
14716
14703
  createElementVNode("div", _hoisted_6$1, [
14717
14704
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
14718
- ]),
14719
- !__props.hideFooter ? (openBlock(), createElementBlock("div", _hoisted_7$1, [
14720
- createElementVNode("div", _hoisted_8, [
14721
- renderSlot(_ctx.$slots, "footerLeft", {}, void 0, true)
14722
- ]),
14723
- createElementVNode("div", _hoisted_9, [
14724
- renderSlot(_ctx.$slots, "footerRight", {}, void 0, true)
14725
- ])
14726
- ])) : createCommentVNode("", true)
14705
+ ])
14727
14706
  ], 2);
14728
14707
  };
14729
14708
  }
14730
14709
  });
14731
- const APanel = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-b3608452"]]);
14710
+ const APanel = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-212156a1"]]);
14732
14711
  class DialogProps {
14733
14712
  /**
14734
14713
  * ### 使用无参 `DialogProps` 配置
@@ -17007,6 +16986,7 @@ function useBaseTable(serviceClass, option = {}) {
17007
16986
  return {
17008
16987
  entity,
17009
16988
  service,
16989
+ serviceClass,
17010
16990
  isLoading,
17011
16991
  response,
17012
16992
  request,
@@ -17480,9 +17460,34 @@ const _hoisted_6 = {
17480
17460
  style: { "color": "#aaa" }
17481
17461
  };
17482
17462
  const _hoisted_7 = { class: "ctrlRow" };
17463
+ const _hoisted_8 = { class: "a-table-footer" };
17464
+ const _hoisted_9 = { class: "left" };
17465
+ const _hoisted_10 = { class: "right" };
17483
17466
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
17484
17467
  __name: "Table",
17485
17468
  props: {
17469
+ /**
17470
+ * # 直接使用表格Hook
17471
+ * 请注意,将不会再触发一些事件,请使用 Hook 的前后置等拦截方法处理
17472
+ */
17473
+ useHook: {
17474
+ type: Object,
17475
+ default: void 0
17476
+ },
17477
+ /**
17478
+ * # 是否禁用分页
17479
+ */
17480
+ disablePage: {
17481
+ type: Boolean,
17482
+ default: false
17483
+ },
17484
+ /**
17485
+ * # 表格加载中
17486
+ */
17487
+ loading: {
17488
+ type: Boolean,
17489
+ default: false
17490
+ },
17486
17491
  /**
17487
17492
  * # 隐藏添加按钮
17488
17493
  */
@@ -17558,7 +17563,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
17558
17563
  */
17559
17564
  dataList: {
17560
17565
  type: Array,
17561
- required: true
17566
+ default: () => []
17562
17567
  },
17563
17568
  /**
17564
17569
  * # 默认选中的数据数组
@@ -17744,7 +17749,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
17744
17749
  */
17745
17750
  entity: {
17746
17751
  type: Function,
17747
- required: true
17752
+ default: void 0
17748
17753
  },
17749
17754
  /**
17750
17755
  * # 是否显示导入按钮
@@ -17822,27 +17827,115 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
17822
17827
  fileEntity: {
17823
17828
  type: Function,
17824
17829
  default: void 0
17830
+ },
17831
+ /**
17832
+ * # 自定义添加事件
17833
+ */
17834
+ onAdd: {
17835
+ type: Function,
17836
+ default: void 0
17837
+ },
17838
+ /**
17839
+ * # 自定义详情事件
17840
+ */
17841
+ onDetail: {
17842
+ type: Function,
17843
+ default: void 0
17844
+ },
17845
+ /**
17846
+ * # 自定义删除事件
17847
+ */
17848
+ onDelete: {
17849
+ type: Function,
17850
+ default: void 0
17851
+ },
17852
+ /**
17853
+ * # 自定义编辑事件
17854
+ */
17855
+ onEdit: {
17856
+ type: Function,
17857
+ default: void 0
17858
+ },
17859
+ /**
17860
+ * # 选择变更事件
17861
+ */
17862
+ onSelected: {
17863
+ type: Function,
17864
+ default: void 0
17865
+ },
17866
+ /**
17867
+ * # 行添加事件
17868
+ */
17869
+ onAddRow: {
17870
+ type: Function,
17871
+ default: void 0
17872
+ },
17873
+ /**
17874
+ * # 排序变更事件
17875
+ */
17876
+ onSortChange: {
17877
+ type: Function,
17878
+ default: void 0
17879
+ },
17880
+ /**
17881
+ * # 禁用事件
17882
+ */
17883
+ onDisable: {
17884
+ type: Function,
17885
+ default: void 0
17886
+ },
17887
+ /**
17888
+ * # 启用事件
17889
+ */
17890
+ onEnable: {
17891
+ type: Function,
17892
+ default: void 0
17893
+ },
17894
+ /**
17895
+ * # 搜索事件
17896
+ */
17897
+ onSearch: {
17898
+ type: Function,
17899
+ default: void 0
17825
17900
  }
17826
17901
  },
17827
- emits: ["add", "detail", "delete", "edit", "selectChanged", "addRow", "sortChanged", "disable", "enable", "search"],
17828
- setup(__props, { expose: __expose, emit: __emit }) {
17902
+ setup(__props, { expose: __expose }) {
17829
17903
  const props = __props;
17830
- const emits = __emit;
17831
17904
  __expose({
17832
17905
  resetSearch: onReset,
17833
17906
  search: onSearch
17834
17907
  });
17835
17908
  const airTableRef = ref();
17836
17909
  const tableId = `table_${Math.random()}`;
17837
- const entityInstance = Transformer.newInstance(props.entity);
17838
- const modelConfig = getModelConfig(props.entity);
17910
+ const hook = props.useHook;
17911
+ const ServiceClass = props.service || (hook == null ? void 0 : hook.serviceClass);
17912
+ let EntityClass;
17913
+ if (ServiceClass) {
17914
+ EntityClass = Transformer.newInstance(ServiceClass).entityClass;
17915
+ } else {
17916
+ EntityClass = props.entity;
17917
+ }
17918
+ if (!EntityClass) {
17919
+ throw new Error("[ATable] entity/service/useHook 三者必须传入一个");
17920
+ }
17921
+ const entityInstance = Transformer.newInstance(EntityClass);
17922
+ const modelConfig = getModelConfig(EntityClass);
17923
+ const dataListRef = computed(() => {
17924
+ return hook ? hook.response.value.list : props.dataList;
17925
+ });
17926
+ const selectListRef = computed(() => {
17927
+ return hook ? hook.selectList.value : props.selectList;
17928
+ });
17929
+ const isLoadingRef = computed(() => {
17930
+ return hook ? hook.isLoading.value : props.loading;
17931
+ });
17839
17932
  const {
17840
17933
  allColumnList,
17841
17934
  isColumnSelectorEnabled,
17842
17935
  updateSelectKeys,
17843
17936
  showColumnList
17844
17937
  } = useTableColumn({
17845
- entityClass: props.entity,
17938
+ entityClass: EntityClass,
17846
17939
  customColumns: props.columnList,
17847
17940
  hideColumnSelector: props.hideColumnSelector,
17848
17941
  modelConfig
@@ -17851,7 +17944,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
17851
17944
  var _a, _b;
17852
17945
  for (const row of list) {
17853
17946
  (_a = airTableRef.value) == null ? void 0 : _a.toggleRowSelection(row, false);
17854
- for (const selectedRow of props.selectList) {
17947
+ for (const selectedRow of selectListRef.value) {
17855
17948
  if (selectedRow.id === row.id) {
17856
17949
  (_b = airTableRef.value) == null ? void 0 : _b.toggleRowSelection(row, true);
17857
17950
  }
@@ -17862,7 +17955,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
17862
17955
  }
17863
17956
  }
17864
17957
  function toggleSelection() {
17865
- selectRow(props.dataList);
17958
+ selectRow(dataListRef.value);
17866
17959
  }
17867
17960
  const {
17868
17961
  isAddRowDisabled,
@@ -17872,7 +17965,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
17872
17965
  isDisableChangeStatus,
17873
17966
  isDeleteDisabled
17874
17967
  } = useTableButton({
17875
- entityClass: props.entity,
17968
+ entityClass: EntityClass,
17876
17969
  editPermission: props.editPermission,
17877
17970
  deletePermission: props.deletePermission,
17878
17971
  addRowPermission: props.addRowPermission,
@@ -17887,14 +17980,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
17887
17980
  selectable: props.selectable,
17888
17981
  isAddDisabled: props.disableAddRow
17889
17982
  });
17890
- const searchFieldList = computed(() => props.searchParams || getSearchConfigList(props.entity));
17983
+ const searchFieldList = computed(() => props.searchParams || getSearchConfigList(EntityClass));
17891
17984
  function getStringValue(data) {
17892
17985
  if (data === void 0 || data === null) {
17893
17986
  return "";
17894
17987
  }
17895
17988
  return data.toString();
17896
17989
  }
17897
- const request = ref(new QueryRequestPage(props.entity));
17990
+ const request = ref(new QueryRequestPage(EntityClass));
17898
17991
  function onExport() {
17899
17992
  if (!props.service) {
17900
17993
  FeedbackUtil.toastError("请先传入 service 参数");
@@ -17909,7 +18002,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
17909
18002
  }
17910
18003
  async function handleDelete(item) {
17911
18004
  if (props.customDelete) {
17912
- emits("delete", item);
18005
+ if (props.onDelete) {
18006
+ props.onDelete(item);
18007
+ } else if (hook) {
18008
+ hook.onDelete(item);
18009
+ }
17913
18010
  return;
17914
18011
  }
17915
18012
  try {
@@ -17929,7 +18026,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
17929
18026
  cancelButtonText: WebI18n.get().Cancel,
17930
18027
  type: "warning"
17931
18028
  });
17932
- emits("delete", item);
18029
+ if (props.onDelete) {
18030
+ props.onDelete(item);
18031
+ } else if (hook) {
18032
+ hook.onDelete(item);
18033
+ }
17933
18034
  } catch (e) {
17934
18035
  console.error(e);
17935
18036
  }
@@ -17950,7 +18051,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
17950
18051
  function handleSelectChanged(list) {
17951
18052
  const selectAll = list.map((item) => item.copy());
17952
18053
  list.forEach((find) => {
17953
- if (inCurrentPage(props.dataList, find)) {
18054
+ if (inCurrentPage(dataListRef.value, find)) {
17954
18055
  return;
17955
18056
  }
17956
18057
  const exist = selectAll.find((item) => item.id === find.id);
@@ -17958,16 +18059,24 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
17958
18059
  selectAll.push(find);
17959
18060
  }
17960
18061
  });
17961
- emits("selectChanged", selectAll);
18062
+ if (props.onSelected) {
18063
+ props.onSelected(selectAll);
18064
+ } else if (hook) {
18065
+ hook.onSelected(selectAll);
18066
+ }
17962
18067
  }
17963
18068
  function handleSortChanged(data) {
18069
+ let callback;
17964
18070
  if (data.prop && data.order) {
17965
18071
  const sort = new QuerySort();
17966
18072
  sort.field = data.prop;
17967
18073
  sort.direction = data.order === "descending" ? "desc" : "asc";
17968
- emits("sortChanged", sort);
17969
- } else {
17970
- emits("sortChanged", void 0);
18074
+ callback = sort;
18075
+ }
18076
+ if (props.onSortChange) {
18077
+ props.onSortChange(callback);
18078
+ } else if (hook) {
18079
+ hook.onSortChanged(callback);
17971
18080
  }
17972
18081
  }
17973
18082
  function getRowEntity(scope) {
@@ -17987,7 +18096,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
17987
18096
  return "";
17988
18097
  }
17989
18098
  watch(
17990
- () => props.dataList,
18099
+ () => dataListRef,
17991
18100
  () => {
17992
18101
  nextTick(() => {
17993
18102
  toggleSelection();
@@ -17998,7 +18107,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
17998
18107
  }
17999
18108
  );
18000
18109
  watch(
18001
- () => props.selectList,
18110
+ () => selectListRef,
18002
18111
  () => {
18003
18112
  nextTick(() => {
18004
18113
  if (airTableRef.value) {
@@ -18014,6 +18123,48 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
18014
18123
  }
18015
18124
  return WebConfig.apiUrl + url;
18016
18125
  }
18126
+ function handleAdd() {
18127
+ if (props.onAdd) {
18128
+ props.onAdd();
18129
+ } else if (hook) {
18130
+ hook.onAdd();
18131
+ }
18132
+ }
18133
+ function handleAddRow(row) {
18134
+ if (props.onAddRow) {
18135
+ props.onAddRow(row);
18136
+ } else if (hook && hook.onAddRow) {
18137
+ hook.onAddRow(row);
18138
+ }
18139
+ }
18140
+ function handleEdit(row) {
18141
+ if (props.onEdit) {
18142
+ props.onEdit(row);
18143
+ } else if (hook) {
18144
+ hook.onEdit(row);
18145
+ }
18146
+ }
18147
+ function handleDetail(row) {
18148
+ if (props.onDetail) {
18149
+ props.onDetail(row);
18150
+ } else if (hook) {
18151
+ hook.onDetail(row);
18152
+ }
18153
+ }
18154
+ function handleDisable(row) {
18155
+ if (props.onDisable) {
18156
+ props.onDisable(row);
18157
+ } else if (hook) {
18158
+ hook.onDisable(row);
18159
+ }
18160
+ }
18161
+ function handleEnable(row) {
18162
+ if (props.onEnable) {
18163
+ props.onEnable(row);
18164
+ } else if (hook) {
18165
+ hook.onEnable(row);
18166
+ }
18167
+ }
18017
18168
  async function onImport() {
18018
18169
  let url = props.importUrl;
18019
18170
  if (!url) {
@@ -18077,11 +18228,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
18077
18228
  } else {
18078
18229
  searchFilter.value = entityInstance.copy();
18079
18230
  }
18080
- request.value = new QueryRequestPage(props.entity);
18231
+ request.value = new QueryRequestPage(EntityClass);
18081
18232
  request.value.exclude("filter");
18082
18233
  }
18083
18234
  function onSearch() {
18084
- request.value = new QueryRequestPage(props.entity);
18235
+ request.value = new QueryRequestPage(EntityClass);
18085
18236
  const keys = Object.keys(searchFilter.value);
18086
18237
  keys.forEach((key) => {
18087
18238
  if (searchFilter.value[key] === "") {
@@ -18092,316 +18243,340 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
18092
18243
  if (request.value.page) {
18093
18244
  request.value.page.pageNum = 1;
18094
18245
  }
18095
- emits("search", request.value);
18246
+ if (props.onSearch) {
18247
+ props.onSearch(request.value);
18248
+ } else if (hook) {
18249
+ hook.onSearch(request.value);
18250
+ }
18096
18251
  }
18097
18252
  return (_ctx, _cache) => {
18098
- return openBlock(), createElementBlock("div", {
18099
- style: normalizeStyle({ height: __props.autoHeight ? "auto" : "0px" }),
18100
- class: "a-table-container"
18101
- }, [
18102
- createElementVNode("div", _hoisted_1$2, [
18103
- createElementVNode("div", _hoisted_2$2, [
18104
- renderSlot(_ctx.$slots, "left", {}, () => [
18105
- renderSlot(_ctx.$slots, "beforeButton"),
18106
- renderSlot(_ctx.$slots, "addButton", {}, () => [
18107
- props.entity && !__props.hideAdd ? (openBlock(), createBlock(unref(_sfc_main$v), {
18253
+ const _directive_loading = resolveDirective("loading");
18254
+ return openBlock(), createElementBlock(Fragment, null, [
18255
+ createElementVNode("div", {
18256
+ style: normalizeStyle({ height: __props.autoHeight ? "auto" : "0px" }),
18257
+ class: "a-table-container"
18258
+ }, [
18259
+ createElementVNode("div", _hoisted_1$2, [
18260
+ createElementVNode("div", _hoisted_2$2, [
18261
+ renderSlot(_ctx.$slots, "left", {}, () => [
18262
+ renderSlot(_ctx.$slots, "beforeButton"),
18263
+ renderSlot(_ctx.$slots, "addButton", {}, () => [
18264
+ !__props.hideAdd ? (openBlock(), createBlock(unref(_sfc_main$v), {
18265
+ key: 0,
18266
+ permission: __props.addPermission || unref(PermissionUtil).get(unref(EntityClass), unref(PermissionAction).ADD),
18267
+ icon: "ADD",
18268
+ primary: "",
18269
+ onClick: _cache[0] || (_cache[0] = ($event) => handleAdd())
18270
+ }, {
18271
+ default: withCtx(() => [
18272
+ createTextVNode(toDisplayString(unref(modelConfig).addTitle || unref(WebI18n).get().Add), 1)
18273
+ ]),
18274
+ _: 1
18275
+ }, 8, ["permission"])) : createCommentVNode("", true)
18276
+ ]),
18277
+ __props.showImport ? (openBlock(), createBlock(unref(_sfc_main$v), {
18108
18278
  key: 0,
18109
- permission: __props.addPermission || unref(PermissionUtil).get(__props.entity, unref(PermissionAction).ADD),
18110
- icon: "ADD",
18111
- primary: "",
18112
- onClick: _cache[0] || (_cache[0] = ($event) => emits("add"))
18279
+ permission: __props.importPermission || unref(PermissionUtil).get(unref(EntityClass), unref(PermissionAction).IMPORT),
18280
+ icon: "IMPORT",
18281
+ onClick: _cache[1] || (_cache[1] = ($event) => onImport())
18113
18282
  }, {
18114
18283
  default: withCtx(() => [
18115
- createTextVNode(toDisplayString(unref(modelConfig).addTitle || unref(WebI18n).get().Add), 1)
18284
+ createTextVNode(toDisplayString(unref(WebI18n).get().Import), 1)
18116
18285
  ]),
18117
18286
  _: 1
18118
- }, 8, ["permission"])) : createCommentVNode("", true)
18287
+ }, 8, ["permission"])) : createCommentVNode("", true),
18288
+ renderSlot(_ctx.$slots, "afterButton")
18289
+ ])
18290
+ ]),
18291
+ createElementVNode("div", _hoisted_3$2, [
18292
+ renderSlot(_ctx.$slots, "beforeSearch"),
18293
+ createElementVNode("div", _hoisted_4$1, [
18294
+ (openBlock(true), createElementBlock(Fragment, null, renderList(searchFieldList.value, (item) => {
18295
+ return openBlock(), createElementBlock(Fragment, {
18296
+ key: item.key
18297
+ }, [
18298
+ !item.hide ? (openBlock(), createElementBlock("div", {
18299
+ key: 0,
18300
+ style: normalizeStyle({ width: `${item.width || 150}px` }),
18301
+ class: "a-table-toolbar-search-item"
18302
+ }, [
18303
+ renderSlot(_ctx.$slots, item.key, { data: searchFilter.value }, () => [
18304
+ unref(getDictionary)(unref(EntityClass), item.key) ? (openBlock(), createBlock(unref(ElSelect), {
18305
+ key: 0,
18306
+ modelValue: searchFilter.value[item.key],
18307
+ "onUpdate:modelValue": ($event) => searchFilter.value[item.key] = $event,
18308
+ clearable: item.clearable !== false,
18309
+ filterable: item.filterable,
18310
+ placeholder: `${unref(getFieldLabel)(unref(EntityClass), item.key)}...`,
18311
+ onChange: _cache[2] || (_cache[2] = ($event) => onSearch()),
18312
+ onClear: ($event) => searchFilter.value[item.key] = void 0
18313
+ }, {
18314
+ default: withCtx(() => {
18315
+ var _a;
18316
+ return [
18317
+ (openBlock(true), createElementBlock(Fragment, null, renderList((_a = unref(getDictionary)(unref(EntityClass), item.key)) == null ? void 0 : _a.toArray(), (enumItem) => {
18318
+ return openBlock(), createElementBlock(Fragment, null, [
18319
+ !enumItem.disabled ? (openBlock(), createBlock(unref(ElOption), {
18320
+ key: enumItem.key.toString(),
18321
+ label: enumItem.label,
18322
+ value: enumItem.key
18323
+ }, null, 8, ["label", "value"])) : createCommentVNode("", true)
18324
+ ], 64);
18325
+ }), 256))
18326
+ ];
18327
+ }),
18328
+ _: 2
18329
+ }, 1032, ["modelValue", "onUpdate:modelValue", "clearable", "filterable", "placeholder", "onClear"])) : (openBlock(), createBlock(unref(ElInput), {
18330
+ key: 1,
18331
+ modelValue: searchFilter.value[item.key],
18332
+ "onUpdate:modelValue": ($event) => searchFilter.value[item.key] = $event,
18333
+ clearable: item.clearable !== false,
18334
+ placeholder: `${unref(getFieldLabel)(unref(EntityClass), item.key)}...`,
18335
+ onBlur: _cache[3] || (_cache[3] = ($event) => onSearch()),
18336
+ onClear: onSearch,
18337
+ onKeydown: withKeys(onSearch, ["enter"])
18338
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "clearable", "placeholder"]))
18339
+ ])
18340
+ ], 4)) : createCommentVNode("", true)
18341
+ ], 64);
18342
+ }), 128))
18119
18343
  ]),
18120
- __props.showImport ? (openBlock(), createBlock(unref(_sfc_main$v), {
18344
+ __props.showExport ? (openBlock(), createBlock(unref(_sfc_main$v), {
18121
18345
  key: 0,
18122
- permission: __props.importPermission || unref(PermissionUtil).get(__props.entity, unref(PermissionAction).IMPORT),
18123
- icon: "IMPORT",
18124
- onClick: _cache[1] || (_cache[1] = ($event) => onImport())
18346
+ permission: __props.exportPermission || unref(PermissionUtil).get(unref(EntityClass), unref(PermissionAction).EXPORT),
18347
+ icon: "EXPORT",
18348
+ onClick: _cache[4] || (_cache[4] = ($event) => onExport())
18125
18349
  }, {
18126
18350
  default: withCtx(() => [
18127
- createTextVNode(toDisplayString(unref(WebI18n).get().Import), 1)
18351
+ createTextVNode(toDisplayString(unref(WebI18n).get().Export) + ": ", 1)
18128
18352
  ]),
18129
18353
  _: 1
18130
18354
  }, 8, ["permission"])) : createCommentVNode("", true),
18131
- renderSlot(_ctx.$slots, "afterButton")
18355
+ renderSlot(_ctx.$slots, "afterSearch"),
18356
+ unref(isColumnSelectorEnabled) ? (openBlock(), createBlock(unref(ColumnSelector), {
18357
+ key: 1,
18358
+ "column-list": unref(allColumnList),
18359
+ "entity-class": unref(EntityClass),
18360
+ onChanged: _cache[5] || (_cache[5] = ($event) => unref(updateSelectKeys)($event))
18361
+ }, null, 8, ["column-list", "entity-class"])) : createCommentVNode("", true)
18132
18362
  ])
18133
18363
  ]),
18134
- createElementVNode("div", _hoisted_3$2, [
18135
- renderSlot(_ctx.$slots, "beforeSearch"),
18136
- createElementVNode("div", _hoisted_4$1, [
18137
- (openBlock(true), createElementBlock(Fragment, null, renderList(searchFieldList.value, (item) => {
18138
- return openBlock(), createElementBlock(Fragment, {
18139
- key: item.key
18140
- }, [
18141
- !item.hide ? (openBlock(), createElementBlock("div", {
18142
- key: 0,
18143
- style: normalizeStyle({ width: `${item.width || 150}px` }),
18144
- class: "a-table-toolbar-search-item"
18145
- }, [
18146
- renderSlot(_ctx.$slots, item.key, { data: searchFilter.value }, () => [
18147
- unref(getDictionary)(__props.entity, item.key) ? (openBlock(), createBlock(unref(ElSelect), {
18148
- key: 0,
18149
- modelValue: searchFilter.value[item.key],
18150
- "onUpdate:modelValue": ($event) => searchFilter.value[item.key] = $event,
18151
- clearable: item.clearable !== false,
18152
- filterable: item.filterable,
18153
- placeholder: `${unref(getFieldLabel)(__props.entity, item.key)}...`,
18154
- onChange: _cache[2] || (_cache[2] = ($event) => onSearch()),
18155
- onClear: ($event) => searchFilter.value[item.key] = void 0
18156
- }, {
18157
- default: withCtx(() => {
18158
- var _a;
18159
- return [
18160
- (openBlock(true), createElementBlock(Fragment, null, renderList((_a = unref(getDictionary)(__props.entity, item.key)) == null ? void 0 : _a.toArray(), (enumItem) => {
18161
- return openBlock(), createElementBlock(Fragment, null, [
18162
- !enumItem.disabled ? (openBlock(), createBlock(unref(ElOption), {
18163
- key: enumItem.key.toString(),
18164
- label: enumItem.label,
18165
- value: enumItem.key
18166
- }, null, 8, ["label", "value"])) : createCommentVNode("", true)
18167
- ], 64);
18168
- }), 256))
18169
- ];
18170
- }),
18171
- _: 2
18172
- }, 1032, ["modelValue", "onUpdate:modelValue", "clearable", "filterable", "placeholder", "onClear"])) : (openBlock(), createBlock(unref(ElInput), {
18173
- key: 1,
18174
- modelValue: searchFilter.value[item.key],
18175
- "onUpdate:modelValue": ($event) => searchFilter.value[item.key] = $event,
18176
- clearable: item.clearable !== false,
18177
- placeholder: `${unref(getFieldLabel)(__props.entity, item.key)}...`,
18178
- onBlur: _cache[3] || (_cache[3] = ($event) => onSearch()),
18179
- onClear: onSearch,
18180
- onKeydown: withKeys(onSearch, ["enter"])
18181
- }, null, 8, ["modelValue", "onUpdate:modelValue", "clearable", "placeholder"]))
18182
- ])
18183
- ], 4)) : createCommentVNode("", true)
18184
- ], 64);
18185
- }), 128))
18364
+ unref(allColumnList) ? withDirectives((openBlock(), createBlock(unref(ElTable), {
18365
+ key: 0,
18366
+ id: tableId,
18367
+ ref_key: "airTableRef",
18368
+ ref: airTableRef,
18369
+ data: dataListRef.value,
18370
+ "row-class-name": tableRowClassName,
18371
+ "row-key": (row) => `${row.id}`,
18372
+ class: "a-table",
18373
+ flexible: "",
18374
+ height: "100%",
18375
+ onSelect: handleSelectChanged,
18376
+ onSelectAll: handleSelectChanged,
18377
+ onSortChange: handleSortChanged
18378
+ }, {
18379
+ empty: withCtx(() => [
18380
+ _cache[7] || (_cache[7] = createElementVNode("img", {
18381
+ alt: "",
18382
+ src: _imports_0,
18383
+ style: { "width": "80px" }
18384
+ }, null, -1)),
18385
+ createElementVNode("div", null, toDisplayString(__props.emptyText || unref(modelConfig).tableEmptyText || unref(WebI18n).get().NoData), 1)
18186
18386
  ]),
18187
- __props.showExport ? (openBlock(), createBlock(unref(_sfc_main$v), {
18188
- key: 0,
18189
- permission: __props.exportPermission || unref(PermissionUtil).get(__props.entity, unref(PermissionAction).EXPORT),
18190
- icon: "EXPORT",
18191
- onClick: _cache[4] || (_cache[4] = ($event) => onExport())
18192
- }, {
18193
- default: withCtx(() => [
18194
- createTextVNode(toDisplayString(unref(WebI18n).get().Export) + ": ", 1)
18195
- ]),
18196
- _: 1
18197
- }, 8, ["permission"])) : createCommentVNode("", true),
18198
- renderSlot(_ctx.$slots, "afterSearch"),
18199
- unref(isColumnSelectorEnabled) ? (openBlock(), createBlock(unref(ColumnSelector), {
18200
- key: 1,
18201
- "column-list": unref(allColumnList),
18202
- "entity-class": __props.entity,
18203
- onChanged: _cache[5] || (_cache[5] = ($event) => unref(updateSelectKeys)($event))
18204
- }, null, 8, ["column-list", "entity-class"])) : createCommentVNode("", true)
18205
- ])
18206
- ]),
18207
- unref(allColumnList) ? (openBlock(), createBlock(unref(ElTable), {
18208
- key: 0,
18209
- id: tableId,
18210
- ref_key: "airTableRef",
18211
- ref: airTableRef,
18212
- data: __props.dataList,
18213
- "row-class-name": tableRowClassName,
18214
- "row-key": (row) => `${row.id}`,
18215
- class: "a-table",
18216
- flexible: "",
18217
- height: "100%",
18218
- onSelect: handleSelectChanged,
18219
- onSelectAll: handleSelectChanged,
18220
- onSortChange: handleSortChanged
18221
- }, {
18222
- empty: withCtx(() => [
18223
- _cache[6] || (_cache[6] = createElementVNode("img", {
18224
- alt: "",
18225
- src: _imports_0,
18226
- style: { "width": "80px" }
18227
- }, null, -1)),
18228
- createElementVNode("div", null, toDisplayString(__props.emptyText || unref(modelConfig).tableEmptyText || unref(WebI18n).get().NoData), 1)
18229
- ]),
18230
- default: withCtx(() => [
18231
- __props.showSelect ? (openBlock(), createBlock(unref(ElTableColumn), {
18232
- key: 0,
18233
- "reserve-selection": true,
18234
- selectable: unref(isSelectable),
18235
- fixed: "left",
18236
- type: "selection",
18237
- width: "40"
18238
- }, null, 8, ["selectable"])) : createCommentVNode("", true),
18239
- !__props.hideIndex ? (openBlock(), createBlock(unref(ElTableColumn), {
18240
- key: 1,
18241
- label: unref(WebI18n).get().ID || "序号",
18242
- fixed: "left",
18243
- type: "index",
18244
- width: "60"
18245
- }, null, 8, ["label"])) : createCommentVNode("", true),
18246
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(showColumnList), (item) => {
18247
- return openBlock(), createBlock(unref(ElTableColumn), {
18248
- key: item.key,
18249
- align: item.align,
18250
- fixed: item.fixed,
18251
- label: unref(getFieldLabel)(__props.entity, item.key),
18252
- "min-width": item.minWidth || "auto",
18253
- prop: item.key,
18254
- sortable: item.sortable,
18255
- width: item.width || "auto"
18256
- }, {
18257
- default: withCtx((scope) => [
18258
- scope.$index >= 0 ? renderSlot(_ctx.$slots, item.key, {
18259
- key: 0,
18260
- data: getRowEntity(scope),
18261
- index: scope.$index
18262
- }, () => [
18263
- item.prefixText ? (openBlock(), createElementBlock("span", _hoisted_5$1, toDisplayString(item.prefixText), 1)) : createCommentVNode("", true),
18264
- unref(getDictionary)(__props.entity, item.key) ? (openBlock(), createBlock(unref(EnumColumn), {
18265
- key: 1,
18266
- column: item,
18267
- data: scope.row,
18268
- dictionary: unref(getDictionary)(__props.entity, item.key)
18269
- }, null, 8, ["column", "data", "dictionary"])) : item.phone ? (openBlock(), createBlock(unref(APhone), {
18270
- key: 2,
18271
- desensitize: item.desensitize,
18272
- phone: getValue(scope, item.key)
18273
- }, null, 8, ["desensitize", "phone"])) : item.datetime ? (openBlock(), createBlock(unref(ADateTime), {
18274
- key: 3,
18275
- formatter: item.datetime === true ? unref(DateTimeFormatter).FULL_DATE_TIME : item.datetime,
18276
- "milli-second": getValue(scope, item.key)
18277
- }, null, 8, ["formatter", "milli-second"])) : item.money ? (openBlock(), createBlock(unref(AMoney), {
18278
- key: 4,
18279
- money: getValue(scope, item.key)
18280
- }, null, 8, ["money"])) : item.payload ? (openBlock(), createElementBlock(Fragment, { key: 5 }, [
18281
- item.array ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
18282
- createTextVNode(toDisplayString(getPayloadArray(scope, item.key).map((payload) => payload.getPayloadLabel()).join(",")), 1)
18283
- ], 64)) : (openBlock(), createBlock(unref(APayload), {
18387
+ default: withCtx(() => [
18388
+ __props.showSelect ? (openBlock(), createBlock(unref(ElTableColumn), {
18389
+ key: 0,
18390
+ "reserve-selection": true,
18391
+ selectable: unref(isSelectable),
18392
+ fixed: "left",
18393
+ type: "selection",
18394
+ width: "40"
18395
+ }, null, 8, ["selectable"])) : createCommentVNode("", true),
18396
+ !__props.hideIndex ? (openBlock(), createBlock(unref(ElTableColumn), {
18397
+ key: 1,
18398
+ label: unref(WebI18n).get().ID || "序号",
18399
+ fixed: "left",
18400
+ type: "index",
18401
+ width: "60"
18402
+ }, null, 8, ["label"])) : createCommentVNode("", true),
18403
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(showColumnList), (item) => {
18404
+ return openBlock(), createBlock(unref(ElTableColumn), {
18405
+ key: item.key,
18406
+ align: item.align,
18407
+ fixed: item.fixed,
18408
+ label: unref(getFieldLabel)(unref(EntityClass), item.key),
18409
+ "min-width": item.minWidth || "auto",
18410
+ prop: item.key,
18411
+ sortable: item.sortable,
18412
+ width: item.width || "auto"
18413
+ }, {
18414
+ default: withCtx((scope) => [
18415
+ scope.$index >= 0 ? renderSlot(_ctx.$slots, item.key, {
18416
+ key: 0,
18417
+ data: getRowEntity(scope),
18418
+ index: scope.$index
18419
+ }, () => [
18420
+ item.prefixText ? (openBlock(), createElementBlock("span", _hoisted_5$1, toDisplayString(item.prefixText), 1)) : createCommentVNode("", true),
18421
+ unref(getDictionary)(unref(EntityClass), item.key) ? (openBlock(), createBlock(unref(EnumColumn), {
18284
18422
  key: 1,
18285
- payload: getValue(scope, item.key)
18286
- }, null, 8, ["payload"]))
18287
- ], 64)) : item.desensitize ? (openBlock(), createBlock(unref(ADesensitize), {
18288
- key: 6,
18289
- content: getValue(scope, item.key),
18290
- type: item.desensitize
18291
- }, null, 8, ["content", "type"])) : item.copy ? (openBlock(), createBlock(unref(_sfc_main$4), {
18292
- key: 7,
18293
- column: item,
18294
- data: scope.row
18295
- }, null, 8, ["column", "data"])) : (openBlock(), createElementBlock("div", {
18296
- key: 8,
18297
- class: normalizeClass([item.wrap ? "" : "nowrap", "a-table-column"])
18298
- }, toDisplayString(getStringValue(getValue(scope, item.key)) ?? item.emptyValue), 3)),
18299
- item.suffixText ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(item.suffixText), 1)) : createCommentVNode("", true)
18300
- ]) : createCommentVNode("", true)
18423
+ column: item,
18424
+ data: scope.row,
18425
+ dictionary: unref(getDictionary)(unref(EntityClass), item.key)
18426
+ }, null, 8, ["column", "data", "dictionary"])) : item.phone ? (openBlock(), createBlock(unref(APhone), {
18427
+ key: 2,
18428
+ desensitize: item.desensitize,
18429
+ phone: getValue(scope, item.key)
18430
+ }, null, 8, ["desensitize", "phone"])) : item.datetime ? (openBlock(), createBlock(unref(ADateTime), {
18431
+ key: 3,
18432
+ formatter: item.datetime === true ? unref(DateTimeFormatter).FULL_DATE_TIME : item.datetime,
18433
+ "milli-second": getValue(scope, item.key)
18434
+ }, null, 8, ["formatter", "milli-second"])) : item.money ? (openBlock(), createBlock(unref(AMoney), {
18435
+ key: 4,
18436
+ money: getValue(scope, item.key)
18437
+ }, null, 8, ["money"])) : item.payload ? (openBlock(), createElementBlock(Fragment, { key: 5 }, [
18438
+ item.array ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
18439
+ createTextVNode(toDisplayString(getPayloadArray(scope, item.key).map((payload) => payload.getPayloadLabel()).join(",")), 1)
18440
+ ], 64)) : (openBlock(), createBlock(unref(APayload), {
18441
+ key: 1,
18442
+ payload: getValue(scope, item.key)
18443
+ }, null, 8, ["payload"]))
18444
+ ], 64)) : item.desensitize ? (openBlock(), createBlock(unref(ADesensitize), {
18445
+ key: 6,
18446
+ content: getValue(scope, item.key),
18447
+ type: item.desensitize
18448
+ }, null, 8, ["content", "type"])) : item.copy ? (openBlock(), createBlock(unref(_sfc_main$4), {
18449
+ key: 7,
18450
+ column: item,
18451
+ data: scope.row
18452
+ }, null, 8, ["column", "data"])) : (openBlock(), createElementBlock("div", {
18453
+ key: 8,
18454
+ class: normalizeClass([item.wrap ? "" : "nowrap", "a-table-column"])
18455
+ }, toDisplayString(getStringValue(getValue(scope, item.key)) ?? item.emptyValue), 3)),
18456
+ item.suffixText ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(item.suffixText), 1)) : createCommentVNode("", true)
18457
+ ]) : createCommentVNode("", true)
18458
+ ]),
18459
+ _: 2
18460
+ }, 1032, ["align", "fixed", "label", "min-width", "prop", "sortable", "width"]);
18461
+ }), 128)),
18462
+ !__props.hideCtrl ? (openBlock(), createBlock(unref(ElTableColumn), {
18463
+ key: 2,
18464
+ width: __props.ctrlWidth || "90px",
18465
+ align: "right",
18466
+ fixed: "right"
18467
+ }, {
18468
+ header: withCtx(() => [
18469
+ createTextVNode(toDisplayString(unref(WebI18n).get().Operation), 1)
18301
18470
  ]),
18302
- _: 2
18303
- }, 1032, ["align", "fixed", "label", "min-width", "prop", "sortable", "width"]);
18304
- }), 128)),
18305
- !__props.hideCtrl ? (openBlock(), createBlock(unref(ElTableColumn), {
18306
- key: 2,
18307
- width: __props.ctrlWidth || "90px",
18308
- align: "right",
18309
- fixed: "right"
18310
- }, {
18311
- header: withCtx(() => [
18312
- createTextVNode(toDisplayString(unref(WebI18n).get().Operation), 1)
18313
- ]),
18314
- default: withCtx((scope) => [
18315
- createElementVNode("div", _hoisted_7, [
18316
- scope.$index >= 0 ? renderSlot(_ctx.$slots, "customRow", {
18317
- key: 0,
18318
- data: getRowEntity(scope),
18319
- index: scope.$index
18320
- }) : createCommentVNode("", true),
18321
- !__props.hideCtrl ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
18322
- __props.showAddRow ? (openBlock(), createBlock(unref(ElLink), {
18471
+ default: withCtx((scope) => [
18472
+ createElementVNode("div", _hoisted_7, [
18473
+ scope.$index >= 0 ? renderSlot(_ctx.$slots, "customRow", {
18323
18474
  key: 0,
18324
- disabled: unref(isAddRowDisabled)(getRowEntity(scope)),
18325
- underline: false,
18326
- onClick: ($event) => emits("addRow", getRowEntity(scope))
18327
- }, {
18328
- default: withCtx(() => [
18329
- createTextVNode(toDisplayString(unref(WebI18n).get().Add), 1)
18330
- ]),
18331
- _: 2
18332
- }, 1032, ["disabled", "onClick"])) : createCommentVNode("", true),
18333
- !props.hideEdit ? (openBlock(), createBlock(unref(ElLink), {
18334
- key: 1,
18335
- disabled: unref(isEditDisabled)(getRowEntity(scope)),
18336
- underline: false,
18337
- onClick: ($event) => emits("edit", getRowEntity(scope))
18338
- }, {
18339
- default: withCtx(() => [
18340
- createTextVNode(toDisplayString(unref(WebI18n).get().Update), 1)
18341
- ]),
18342
- _: 2
18343
- }, 1032, ["disabled", "onClick"])) : createCommentVNode("", true),
18344
- __props.showDetail ? (openBlock(), createBlock(unref(ElLink), {
18345
- key: 2,
18346
- disabled: unref(isDetailDisabled)(getRowEntity(scope)),
18347
- underline: false,
18348
- onClick: ($event) => emits("detail", getRowEntity(scope))
18349
- }, {
18350
- default: withCtx(() => [
18351
- createTextVNode(toDisplayString(unref(WebI18n).get().Detail), 1)
18352
- ]),
18353
- _: 2
18354
- }, 1032, ["disabled", "onClick"])) : createCommentVNode("", true),
18355
- __props.showEnableAndDisable ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
18356
- getRowEntity(scope).isDisabled ? (openBlock(), createBlock(unref(ElLink), {
18475
+ data: getRowEntity(scope),
18476
+ index: scope.$index
18477
+ }) : createCommentVNode("", true),
18478
+ !__props.hideCtrl ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
18479
+ __props.showAddRow ? (openBlock(), createBlock(unref(ElLink), {
18357
18480
  key: 0,
18358
- disabled: unref(isDisableChangeStatus)(getRowEntity(scope)),
18481
+ disabled: unref(isAddRowDisabled)(getRowEntity(scope)),
18359
18482
  underline: false,
18360
- onClick: ($event) => emits("enable", getRowEntity(scope))
18483
+ onClick: ($event) => handleAddRow(getRowEntity(scope))
18361
18484
  }, {
18362
18485
  default: withCtx(() => [
18363
- createTextVNode(toDisplayString(unref(WebI18n).get().Enable), 1)
18486
+ createTextVNode(toDisplayString(unref(WebI18n).get().Add), 1)
18364
18487
  ]),
18365
18488
  _: 2
18366
- }, 1032, ["disabled", "onClick"])) : (openBlock(), createBlock(unref(ElLink), {
18489
+ }, 1032, ["disabled", "onClick"])) : createCommentVNode("", true),
18490
+ !props.hideEdit ? (openBlock(), createBlock(unref(ElLink), {
18367
18491
  key: 1,
18368
- disabled: unref(isDisableChangeStatus)(getRowEntity(scope)),
18492
+ disabled: unref(isEditDisabled)(getRowEntity(scope)),
18369
18493
  underline: false,
18370
- type: "warning",
18371
- onClick: ($event) => emits("disable", getRowEntity(scope))
18494
+ onClick: ($event) => handleEdit(getRowEntity(scope))
18372
18495
  }, {
18373
18496
  default: withCtx(() => [
18374
- createTextVNode(toDisplayString(unref(WebI18n).get().Disable), 1)
18497
+ createTextVNode(toDisplayString(unref(WebI18n).get().Update), 1)
18375
18498
  ]),
18376
18499
  _: 2
18377
- }, 1032, ["disabled", "onClick"]))
18500
+ }, 1032, ["disabled", "onClick"])) : createCommentVNode("", true),
18501
+ __props.showDetail ? (openBlock(), createBlock(unref(ElLink), {
18502
+ key: 2,
18503
+ disabled: unref(isDetailDisabled)(getRowEntity(scope)),
18504
+ underline: false,
18505
+ onClick: ($event) => handleDetail(getRowEntity(scope))
18506
+ }, {
18507
+ default: withCtx(() => [
18508
+ createTextVNode(toDisplayString(unref(WebI18n).get().Detail), 1)
18509
+ ]),
18510
+ _: 2
18511
+ }, 1032, ["disabled", "onClick"])) : createCommentVNode("", true),
18512
+ __props.showEnableAndDisable ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
18513
+ getRowEntity(scope).isDisabled ? (openBlock(), createBlock(unref(ElLink), {
18514
+ key: 0,
18515
+ disabled: unref(isDisableChangeStatus)(getRowEntity(scope)),
18516
+ underline: false,
18517
+ onClick: ($event) => handleEnable(getRowEntity(scope))
18518
+ }, {
18519
+ default: withCtx(() => [
18520
+ createTextVNode(toDisplayString(unref(WebI18n).get().Enable), 1)
18521
+ ]),
18522
+ _: 2
18523
+ }, 1032, ["disabled", "onClick"])) : (openBlock(), createBlock(unref(ElLink), {
18524
+ key: 1,
18525
+ disabled: unref(isDisableChangeStatus)(getRowEntity(scope)),
18526
+ underline: false,
18527
+ type: "warning",
18528
+ onClick: ($event) => handleDisable(getRowEntity(scope))
18529
+ }, {
18530
+ default: withCtx(() => [
18531
+ createTextVNode(toDisplayString(unref(WebI18n).get().Disable), 1)
18532
+ ]),
18533
+ _: 2
18534
+ }, 1032, ["disabled", "onClick"]))
18535
+ ], 64)) : createCommentVNode("", true),
18536
+ !__props.hideDelete ? (openBlock(), createBlock(unref(ElLink), {
18537
+ key: 4,
18538
+ disabled: unref(isDeleteDisabled)(getRowEntity(scope)),
18539
+ underline: false,
18540
+ type: "danger",
18541
+ onClick: ($event) => handleDelete(getRowEntity(scope))
18542
+ }, {
18543
+ default: withCtx(() => [
18544
+ createTextVNode(toDisplayString(unref(WebI18n).get().Delete), 1)
18545
+ ]),
18546
+ _: 2
18547
+ }, 1032, ["disabled", "onClick"])) : createCommentVNode("", true)
18378
18548
  ], 64)) : createCommentVNode("", true),
18379
- !__props.hideDelete ? (openBlock(), createBlock(unref(ElLink), {
18380
- key: 4,
18381
- disabled: unref(isDeleteDisabled)(getRowEntity(scope)),
18382
- underline: false,
18383
- type: "danger",
18384
- onClick: ($event) => handleDelete(getRowEntity(scope))
18385
- }, {
18386
- default: withCtx(() => [
18387
- createTextVNode(toDisplayString(unref(WebI18n).get().Delete), 1)
18388
- ]),
18389
- _: 2
18390
- }, 1032, ["disabled", "onClick"])) : createCommentVNode("", true)
18391
- ], 64)) : createCommentVNode("", true),
18392
- scope.index >= 0 ? renderSlot(_ctx.$slots, "endRow", {
18393
- key: 2,
18394
- data: getRowEntity(scope),
18395
- index: scope.$index
18396
- }) : createCommentVNode("", true)
18397
- ])
18398
- ]),
18399
- _: 3
18400
- }, 8, ["width"])) : createCommentVNode("", true)
18549
+ scope.index >= 0 ? renderSlot(_ctx.$slots, "endRow", {
18550
+ key: 2,
18551
+ data: getRowEntity(scope),
18552
+ index: scope.$index
18553
+ }) : createCommentVNode("", true)
18554
+ ])
18555
+ ]),
18556
+ _: 3
18557
+ }, 8, ["width"])) : createCommentVNode("", true)
18558
+ ]),
18559
+ _: 3
18560
+ }, 8, ["data", "row-key"])), [
18561
+ [_directive_loading, isLoadingRef.value]
18562
+ ]) : createCommentVNode("", true)
18563
+ ], 4),
18564
+ createElementVNode("div", _hoisted_8, [
18565
+ createElementVNode("div", _hoisted_9, [
18566
+ renderSlot(_ctx.$slots, "beforePage"),
18567
+ !__props.disablePage && unref(hook) ? (openBlock(), createBlock(unref(_sfc_main$h), {
18568
+ key: 0,
18569
+ response: unref(hook).response.value,
18570
+ class: "a-table-page",
18571
+ onChanged: _cache[6] || (_cache[6] = ($event) => unref(hook).onPageChanged($event))
18572
+ }, null, 8, ["response"])) : createCommentVNode("", true),
18573
+ renderSlot(_ctx.$slots, "afterPage")
18401
18574
  ]),
18402
- _: 3
18403
- }, 8, ["data", "row-key"])) : createCommentVNode("", true)
18404
- ], 4);
18575
+ createElementVNode("div", _hoisted_10, [
18576
+ renderSlot(_ctx.$slots, "footerRight")
18577
+ ])
18578
+ ])
18579
+ ], 64);
18405
18580
  };
18406
18581
  }
18407
18582
  });