@94ai/nf-table 5.0.37 → 6.1.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.
@@ -1,7 +1,8 @@
1
- import { defineComponent, getCurrentInstance, ref, computed, onMounted, onBeforeMount, watch, nextTick, set } from "vue-demi";
1
+ import { defineComponent, getCurrentInstance, ref, computed, onMounted, onBeforeMount, reactive, watch, nextTick, set } from "vue-demi";
2
2
  import { CachedManager, deepClone } from "@94ai/common-utils";
3
3
  import { normalizeComponent } from "@94ai/vue2-runtime-helpers";
4
4
  import { Loading } from "element-ui";
5
+ import { getCurrentInstance as getCurrentInstance$1, effectScope, shallowReactive } from "vue";
5
6
  import NfMessage from "@94ai/nf-message";
6
7
  const __sfc_main$2 = defineComponent({
7
8
  name: "NfColumnCheckDialog"
@@ -5772,6 +5773,32 @@ const _sfc_render$1 = null;
5772
5773
  const _sfc_staticRenderFns$1 = null;
5773
5774
  var __component__$1 = /* @__PURE__ */ normalizeComponent(_sfc_main, _sfc_render$1, _sfc_staticRenderFns$1, false, null, null, null, null);
5774
5775
  const RenderComponent = __component__$1.exports;
5776
+ /*!
5777
+ * vue-router v3.6.4
5778
+ * (c) 2022 Evan You
5779
+ * @license MIT
5780
+ */
5781
+ function throwNoCurrentInstance(method) {
5782
+ if (!getCurrentInstance$1()) {
5783
+ throw new Error("[vue-router]: Missing current instance. " + method + "() must be called inside <script setup> or setup().");
5784
+ }
5785
+ }
5786
+ function useRoute() {
5787
+ if (process.env.NODE_ENV !== "production") {
5788
+ throwNoCurrentInstance("useRoute");
5789
+ }
5790
+ var root = getCurrentInstance$1().proxy.$root;
5791
+ if (!root._$route) {
5792
+ var route = effectScope(true).run(function() {
5793
+ return shallowReactive(Object.assign({}, root.$router.currentRoute));
5794
+ });
5795
+ root._$route = route;
5796
+ root.$router.afterEach(function(to) {
5797
+ Object.assign(route, to);
5798
+ });
5799
+ }
5800
+ return root._$route;
5801
+ }
5775
5802
  const __sfc_main = defineComponent({
5776
5803
  name: "nf-table"
5777
5804
  });
@@ -5830,6 +5857,30 @@ __sfc_main.props = {
5830
5857
  type: Array,
5831
5858
  default: () => []
5832
5859
  },
5860
+ initSearchApi: {
5861
+ key: "initSearchApi",
5862
+ required: false,
5863
+ type: [Boolean, null],
5864
+ default: void 0
5865
+ },
5866
+ pageChangeSearchApi: {
5867
+ key: "pageChangeSearchApi",
5868
+ required: false,
5869
+ type: [Boolean, null],
5870
+ default: void 0
5871
+ },
5872
+ pageKeys: {
5873
+ key: "pageKeys",
5874
+ required: false,
5875
+ type: Array,
5876
+ default: () => ["pageNo", "pageSize"]
5877
+ },
5878
+ setEasyConf: {
5879
+ key: "setEasyConf",
5880
+ required: false,
5881
+ type: Boolean,
5882
+ default: false
5883
+ },
5833
5884
  dragCached: {
5834
5885
  key: "dragCached",
5835
5886
  required: false,
@@ -5882,13 +5933,13 @@ __sfc_main.props = {
5882
5933
  key: "storageKey",
5883
5934
  required: false,
5884
5935
  type: String,
5885
- default: "nf-table-columns-cached-key"
5936
+ default: ""
5886
5937
  },
5887
5938
  searchFormStorageKey: {
5888
5939
  key: "searchFormStorageKey",
5889
5940
  required: false,
5890
5941
  type: String,
5891
- default: "nf-search-form-columns-cached-key"
5942
+ default: ""
5892
5943
  },
5893
5944
  showColumn: {
5894
5945
  key: "showColumn",
@@ -6193,6 +6244,7 @@ __sfc_main.setup = (__props, __ctx) => {
6193
6244
  }
6194
6245
  return column.operationList || [];
6195
6246
  };
6247
+ const routeName = computed(() => useRoute().name);
6196
6248
  const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;
6197
6249
  const elTableRef = ref();
6198
6250
  const nfTableActionContainerRef = ref();
@@ -6206,6 +6258,28 @@ __sfc_main.setup = (__props, __ctx) => {
6206
6258
  const columnCheckNfDrawer = ref();
6207
6259
  const elTableHeight = ref();
6208
6260
  const nfColumCheckDialogVisible = ref(false);
6261
+ const preSearchFormData = ref({});
6262
+ const cPageChangeSearchApi = ref(props.pageChangeSearchApi ?? props.setEasyConf);
6263
+ const cInitSearchApi = ref(props.initSearchApi ?? props.setEasyConf);
6264
+ const cStorageKey = ref(props.storageKey || `nf-table-columns-cached-key-${routeName.value}`);
6265
+ const cPageAttrs = reactive({
6266
+ // 页码,没有props时 & 允许分页时;默认 = 1
6267
+ "current-page": props.pageAttrs["current-page"] || (props.alwaysShowPage ? 1 : void 0),
6268
+ "page-size": props.pageAttrs["page-size"] || 10,
6269
+ pageKeys: props.pageKeys
6270
+ });
6271
+ const tableLoading = ref(false);
6272
+ const isLoading = computed(() => props.loading || tableLoading.value);
6273
+ const handleSizeChange = (val) => {
6274
+ cPageAttrs["page-size"] = val;
6275
+ if (cPageChangeSearchApi.value)
6276
+ onNfSearchFormSearch();
6277
+ };
6278
+ const handleCurrentChange = (val, isSearch = true) => {
6279
+ cPageAttrs["current-page"] = val;
6280
+ if (isSearch && cPageChangeSearchApi.value)
6281
+ onNfSearchFormSearch();
6282
+ };
6209
6283
  const showData = computed(() => {
6210
6284
  const pageSize = props.pageAttrs["page-size"];
6211
6285
  const currentPage = props.pageAttrs["current-page"] || 1;
@@ -6226,10 +6300,10 @@ __sfc_main.setup = (__props, __ctx) => {
6226
6300
  });
6227
6301
  const loadingInstance = ref();
6228
6302
  watch(() => {
6229
- return props.loading;
6303
+ return props.loading || tableLoading.value;
6230
6304
  }, async () => {
6231
6305
  var _a2, _b;
6232
- if (props.loading) {
6306
+ if (props.loading || tableLoading.value) {
6233
6307
  await nextTick();
6234
6308
  const {
6235
6309
  target,
@@ -6305,7 +6379,7 @@ __sfc_main.setup = (__props, __ctx) => {
6305
6379
  index: index2
6306
6380
  };
6307
6381
  });
6308
- return CachedManager.syncCachedSet(props.storageKey, columnState);
6382
+ return CachedManager.syncCachedSet(cStorageKey.value, columnState);
6309
6383
  }
6310
6384
  };
6311
6385
  const syncShowItemToInitHidden = () => {
@@ -6326,9 +6400,9 @@ __sfc_main.setup = (__props, __ctx) => {
6326
6400
  const syncCookiesToLocalShowColumn = async () => {
6327
6401
  if (props.columnEdit) {
6328
6402
  try {
6329
- let columnState = CachedManager.syncCachedGet(props.storageKey);
6403
+ let columnState = CachedManager.syncCachedGet(cStorageKey.value);
6330
6404
  if (!columnState) {
6331
- columnState = await CachedManager.asyncCachedGet(props.storageKey);
6405
+ columnState = await CachedManager.asyncCachedGet(cStorageKey.value);
6332
6406
  }
6333
6407
  if (columnState) {
6334
6408
  if (typeof columnState === "string") {
@@ -6352,9 +6426,9 @@ __sfc_main.setup = (__props, __ctx) => {
6352
6426
  var _a2, _b;
6353
6427
  if (props.columnEdit) {
6354
6428
  try {
6355
- let cached = CachedManager.syncCachedGet(props.storageKey);
6429
+ let cached = CachedManager.syncCachedGet(cStorageKey.value);
6356
6430
  if (!cached) {
6357
- cached = await CachedManager.asyncCachedGet(props.storageKey);
6431
+ cached = await CachedManager.asyncCachedGet(cStorageKey.value);
6358
6432
  }
6359
6433
  const cachedPriority = props.priority === "cached";
6360
6434
  if (cachedPriority ? cached : (_a2 = localShowColumn.value) == null ? void 0 : _a2.length) {
@@ -6367,7 +6441,7 @@ __sfc_main.setup = (__props, __ctx) => {
6367
6441
  }
6368
6442
  }
6369
6443
  if (props.dragCached) {
6370
- await CachedManager.asyncCachedGet(`${props.storageKey}$drag-column-width`);
6444
+ await CachedManager.asyncCachedGet(`${cStorageKey.value}$drag-column-width`);
6371
6445
  }
6372
6446
  };
6373
6447
  const getMinWidth = (column) => {
@@ -6399,7 +6473,7 @@ __sfc_main.setup = (__props, __ctx) => {
6399
6473
  }
6400
6474
  if (props.dragCached) {
6401
6475
  const prop = item.prop || ((_a2 = item.attr) == null ? void 0 : _a2.prop);
6402
- let columnWidth = CachedManager.syncCachedGet(`${props.storageKey}$drag-column-width`) || {};
6476
+ let columnWidth = CachedManager.syncCachedGet(`${cStorageKey.value}$drag-column-width`) || {};
6403
6477
  if (columnWidth[prop]) {
6404
6478
  attr.width = columnWidth[prop];
6405
6479
  }
@@ -6414,13 +6488,29 @@ __sfc_main.setup = (__props, __ctx) => {
6414
6488
  set(item, "initHidden", item.initHidden);
6415
6489
  set(item, "destory", item.destory);
6416
6490
  item.__index = index2;
6491
+ set(item, "optionsTag", {});
6492
+ if (item.getOptions) {
6493
+ set(item, "optionsEnum", {});
6494
+ item.getOptions((list) => {
6495
+ list.forEach((o) => {
6496
+ item.optionsEnum[o.value] = o.label;
6497
+ item.optionsTag[o.value] = o.tagType;
6498
+ });
6499
+ });
6500
+ } else if (item.options) {
6501
+ set(item, "optionsEnum", {});
6502
+ item.options.forEach((o) => {
6503
+ item.optionsEnum[o.value] = o.label;
6504
+ item.optionsTag[o.value] = o.tagType;
6505
+ });
6506
+ }
6417
6507
  return item;
6418
6508
  });
6419
6509
  if (readCached && props.columnEdit) {
6420
6510
  try {
6421
- let columnState = CachedManager.syncCachedGet(props.storageKey);
6511
+ let columnState = CachedManager.syncCachedGet(cStorageKey.value);
6422
6512
  if (!columnState) {
6423
- columnState = await CachedManager.asyncCachedGet(props.storageKey);
6513
+ columnState = await CachedManager.asyncCachedGet(cStorageKey.value);
6424
6514
  }
6425
6515
  props.columns._skip = true;
6426
6516
  if (columnState) {
@@ -6469,6 +6559,31 @@ __sfc_main.setup = (__props, __ctx) => {
6469
6559
  }, {
6470
6560
  deep: true
6471
6561
  });
6562
+ watch(() => props.pageAttrs, (val) => {
6563
+ if ("current-page" in val) {
6564
+ cPageAttrs["current-page"] = Number(val["current-page"]);
6565
+ }
6566
+ if ("page-size" in val) {
6567
+ cPageAttrs["page-size"] = Number(val["page-size"]);
6568
+ }
6569
+ }, {
6570
+ deep: true
6571
+ });
6572
+ if (cInitSearchApi.value)
6573
+ onNfSearchFormSearch();
6574
+ });
6575
+ const searchFormAttrer = computed(() => {
6576
+ const obj = {
6577
+ ...props.setEasyConf ? {
6578
+ labelWidth: 80,
6579
+ columns: 4,
6580
+ btnModel: "inline",
6581
+ columnEdit: true
6582
+ } : {},
6583
+ storageKey: props.searchFormStorageKey,
6584
+ ...props.searchFormAttrs
6585
+ };
6586
+ return obj;
6472
6587
  });
6473
6588
  const tableAttrer = computed(() => {
6474
6589
  const obj = {
@@ -6484,6 +6599,10 @@ __sfc_main.setup = (__props, __ctx) => {
6484
6599
  },
6485
6600
  resizable: true,
6486
6601
  border: true,
6602
+ stripe: window.nfTableStripe,
6603
+ ...props.setEasyConf ? {
6604
+ "row-key": "id"
6605
+ } : {},
6487
6606
  ...props.tableAttrs
6488
6607
  };
6489
6608
  delete obj.data;
@@ -6512,13 +6631,16 @@ __sfc_main.setup = (__props, __ctx) => {
6512
6631
  initPageSizes();
6513
6632
  const pageAttrer = computed(() => {
6514
6633
  var _a2;
6515
- return {
6634
+ const map = {
6516
6635
  background: false,
6517
6636
  layout: "total, sizes, prev, pager, next, jumper",
6518
6637
  "page-sizes": pageSizes.value,
6519
6638
  total: typeof props.pageAttrs.total === "undefined" ? (_a2 = props.data) == null ? void 0 : _a2.length : void 0,
6520
6639
  ...props.pageAttrs
6521
6640
  };
6641
+ delete map["current-page"];
6642
+ delete map["page-size"];
6643
+ return map;
6522
6644
  });
6523
6645
  const isShow = (row) => {
6524
6646
  if (row.type) {
@@ -6578,6 +6700,14 @@ __sfc_main.setup = (__props, __ctx) => {
6578
6700
  var _a2;
6579
6701
  (_a2 = elTableRef.value) == null ? void 0 : _a2.sort(prop, order);
6580
6702
  };
6703
+ const getActionBarItemStyle = (item, additionStyle) => {
6704
+ return {
6705
+ // action默认右边距为8px
6706
+ marginRight: "8px",
6707
+ ...additionStyle || {},
6708
+ ...item.style || {}
6709
+ };
6710
+ };
6581
6711
  const headerDragend = async (newWidth, oldWidth, column, event) => {
6582
6712
  var _a2, _b;
6583
6713
  await nextTick();
@@ -6586,17 +6716,17 @@ __sfc_main.setup = (__props, __ctx) => {
6586
6716
  column.width = minWidth;
6587
6717
  }
6588
6718
  if (props.dragCached) {
6589
- const columnCachedData = await CachedManager.asyncCachedGet(`${props.storageKey}$drag-column-width`) || {};
6719
+ const columnCachedData = await CachedManager.asyncCachedGet(`${cStorageKey.value}$drag-column-width`) || {};
6590
6720
  columnCachedData[column.property] = column.width;
6591
- await CachedManager.asyncCachedSet(`${props.storageKey}$drag-column-width`, columnCachedData);
6721
+ await CachedManager.asyncCachedSet(`${cStorageKey.value}$drag-column-width`, columnCachedData);
6592
6722
  }
6593
6723
  await ((_b = (_a2 = props.tableEvents)["header-dragend"]) == null ? void 0 : _b.call(_a2, newWidth, oldWidth, column, event));
6594
6724
  };
6595
6725
  async function clearDragCached() {
6596
- await CachedManager.asyncCachedSet(`${props.storageKey}$drag-column-width`, null);
6726
+ await CachedManager.asyncCachedSet(`${cStorageKey.value}$drag-column-width`, null);
6597
6727
  }
6598
6728
  async function clearColumnEditCached() {
6599
- await CachedManager.asyncCachedSet(props.storageKey, null);
6729
+ await CachedManager.asyncCachedSet(cStorageKey.value, null);
6600
6730
  }
6601
6731
  const columnCheckConfirmFeedback = (value) => {
6602
6732
  if (!props.columnEdit) {
@@ -6642,6 +6772,30 @@ __sfc_main.setup = (__props, __ctx) => {
6642
6772
  elTableHeight.value = (_b = props.tableAttrs) == null ? void 0 : _b.height;
6643
6773
  }
6644
6774
  };
6775
+ const searchApi = async (formData = {}) => {
6776
+ var _a2, _b, _c;
6777
+ (_b = (_a2 = props.searchFormEvents) == null ? void 0 : _a2["onSearch"]) == null ? void 0 : _b.call(_a2, formData);
6778
+ if (!((_c = instance == null ? void 0 : instance.$listeners) == null ? void 0 : _c.searchApi))
6779
+ return;
6780
+ tableLoading.value = true;
6781
+ if (JSON.stringify(preSearchFormData.value) !== JSON.stringify(formData)) {
6782
+ handleCurrentChange(1, false);
6783
+ }
6784
+ preSearchFormData.value = formData;
6785
+ await nextTick();
6786
+ emit("searchApi", {
6787
+ data: {
6788
+ ...formData,
6789
+ ...props.alwaysShowPage ? {
6790
+ [cPageAttrs.pageKeys[0]]: cPageAttrs["current-page"],
6791
+ [cPageAttrs.pageKeys[1]]: cPageAttrs["page-size"]
6792
+ } : {}
6793
+ },
6794
+ callback: () => {
6795
+ tableLoading.value = false;
6796
+ }
6797
+ });
6798
+ };
6645
6799
  onMounted(() => {
6646
6800
  calcTableHeight();
6647
6801
  props.columns.forEach((i) => {
@@ -6650,6 +6804,7 @@ __sfc_main.setup = (__props, __ctx) => {
6650
6804
  }
6651
6805
  });
6652
6806
  });
6807
+ const nfTableBorder = window.nfTableBorder;
6653
6808
  return Object.assign({
6654
6809
  getOperationListLocal,
6655
6810
  elTableRef,
@@ -6664,18 +6819,26 @@ __sfc_main.setup = (__props, __ctx) => {
6664
6819
  columnCheckNfDrawer,
6665
6820
  elTableHeight,
6666
6821
  nfColumCheckDialogVisible,
6822
+ cStorageKey,
6823
+ cPageAttrs,
6824
+ handleSizeChange,
6825
+ handleCurrentChange,
6667
6826
  showData,
6668
6827
  hasOperationSlot,
6669
6828
  hasActionBarSlot,
6670
6829
  tableColumns,
6671
6830
  elTableRefKey,
6831
+ searchFormAttrer,
6672
6832
  tableAttrer,
6673
6833
  tableEventer,
6674
6834
  renderPage,
6675
6835
  pageAttrer,
6676
6836
  isShow,
6837
+ getActionBarItemStyle,
6677
6838
  fieldsConfirm,
6678
- columnCheckConfirm
6839
+ columnCheckConfirm,
6840
+ searchApi,
6841
+ nfTableBorder
6679
6842
  }, {
6680
6843
  /**
6681
6844
  * 表格clearFilter
@@ -6789,6 +6952,10 @@ __sfc_main.setup = (__props, __ctx) => {
6789
6952
  * 渲染表格项数据
6790
6953
  */
6791
6954
  tableColumns,
6955
+ /**
6956
+ * 表格loading
6957
+ */
6958
+ isLoading,
6792
6959
  /**
6793
6960
  * 计算表格高度
6794
6961
  */
@@ -6825,8 +6992,11 @@ var _sfc_render = function render3() {
6825
6992
  }, [_vm._t("searchBox", function() {
6826
6993
  var _a2;
6827
6994
  return [_c("nf-search-form", _vm._g(_vm._b({
6828
- ref: "nfSearchFormRef"
6829
- }, "nf-search-form", _vm.searchFormAttrs, false), _vm.searchFormEvents), [_vm._l(((_a2 = _vm.nfSearchFormRef) == null ? void 0 : _a2.renderSearchFormItemOptions) || [], function(item) {
6995
+ ref: "nfSearchFormRef",
6996
+ on: {
6997
+ "onSearch": _vm.searchApi
6998
+ }
6999
+ }, "nf-search-form", _vm.searchFormAttrer, false), _vm.searchFormEvents), [_vm._l(((_a2 = _vm.nfSearchFormRef) == null ? void 0 : _a2.renderSearchFormItemOptions) || [], function(item) {
6830
7000
  var _a3, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B;
6831
7001
  return [((_a3 = item.tooltip) == null ? void 0 : _a3.slot) ? _vm._t(item.tooltip.slot, null, {
6832
7002
  "slot": item.tooltip.slot
@@ -6887,7 +7057,7 @@ var _sfc_render = function render3() {
6887
7057
  ref: "elTableRef",
6888
7058
  class: {
6889
7059
  "nf-table-container": true,
6890
- "nf-default-table-border": !((_a = _vm.tableAttrs) == null ? void 0 : _a.border)
7060
+ "nf-default-table-border": !_vm.nfTableBorder && !((_a = _vm.tableAttrs) == null ? void 0 : _a.border)
6891
7061
  },
6892
7062
  attrs: {
6893
7063
  "data": _vm.showData,
@@ -6895,56 +7065,29 @@ var _sfc_render = function render3() {
6895
7065
  "height": _vm.elTableHeight
6896
7066
  }
6897
7067
  }, "el-table", _vm.tableAttrer, false), _vm.tableEventer), [_vm._l(_vm.tableColumns, function(column) {
6898
- return [_vm.isShow(column) ? [column.type ? [column.type !== "expand" ? _c("el-table-column", _vm._b({
7068
+ return [column.type && _vm.isShow(column) ? _c("el-table-column", _vm._b({
6899
7069
  key: column.key || column.prop || column.type,
6900
7070
  attrs: {
6901
7071
  "type": column.type,
7072
+ "prop": column.prop,
6902
7073
  "label": column.label
6903
7074
  }
6904
- }, "el-table-column", column.attr, false)) : _c("el-table-column", _vm._b({
7075
+ }, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2) : !column.type && _vm.isShow(column) ? _c("el-table-column", _vm._b({
6905
7076
  key: column.key || column.prop || column.type,
6906
7077
  attrs: {
6907
7078
  "type": column.type,
6908
- "label": column.label
6909
- },
6910
- scopedSlots: _vm._u([{
6911
- key: "default",
6912
- fn: function(scope) {
6913
- return column.slot ? [_vm._t(column.slot, null, {
6914
- "row": scope.row,
6915
- "index": scope.$index
6916
- })] : void 0;
6917
- }
6918
- }], null, true)
6919
- }, "el-table-column", column.attr, false))] : [column.attr && column.attr.formatter ? _c("el-table-column", _vm._b({
6920
- key: column.key || column.prop,
6921
- attrs: {
6922
- "prop": column.prop,
6923
- "label": column.label
6924
- },
6925
- scopedSlots: _vm._u([{
6926
- key: "header",
6927
- fn: function(scope) {
6928
- return [column.headerSlot ? [_vm._t(column.headerSlot, null, {
6929
- "$index": scope.$index,
6930
- "column": scope.column
6931
- })] : _c("span", [_vm._v(" " + _vm._s(column.label) + " ")])];
6932
- }
6933
- }], null, true)
6934
- }, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2) : _c("el-table-column", _vm._b({
6935
- key: column.key || column.prop,
6936
- attrs: {
6937
7079
  "prop": column.prop,
6938
7080
  "label": column.label
6939
7081
  },
6940
7082
  scopedSlots: _vm._u([{
6941
7083
  key: "header",
6942
7084
  fn: function(scope) {
6943
- return [column.headerSlot ? [_vm._t(column.headerSlot, null, {
6944
- "$index": scope.$index,
6945
- "column": scope.column
6946
- })] : _c("span", [_vm._v(" " + _vm._s(column.label) + " ")]), column.prop === _vm.operationPropKey && _vm.columnEdit && _vm.columnPosition === "embed" ? _vm._t("operationIconColumnCheck", function() {
6947
- return [_c("el-tooltip", {
7085
+ return [_vm.columnEdit && column.prop === _vm.operationPropKey && _vm.columnPosition === "embed" ? _vm._t("operationIconColumnCheck", function() {
7086
+ return [_c("span", {
7087
+ staticStyle: {
7088
+ "white-space": "nowrap"
7089
+ }
7090
+ }, [_vm._v(" " + _vm._s(column.label) + " ")]), _c("el-tooltip", {
6948
7091
  attrs: {
6949
7092
  "popper-class": "actionTooltipRef",
6950
7093
  "placement": "top",
@@ -6961,20 +7104,43 @@ var _sfc_render = function render3() {
6961
7104
  })])];
6962
7105
  }, {
6963
7106
  "column": column
6964
- }) : _vm._e()];
7107
+ }) : column.labelTooltip ? [_c("span", {
7108
+ staticStyle: {
7109
+ "white-space": "nowrap"
7110
+ }
7111
+ }, [_vm._v(" " + _vm._s(column.label) + " ")]), _c("el-tooltip", {
7112
+ attrs: {
7113
+ "placement": "right",
7114
+ "effect": "light"
7115
+ }
7116
+ }, [_c("div", {
7117
+ attrs: {
7118
+ "slot": "content"
7119
+ },
7120
+ slot: "content"
7121
+ }, [_vm._v(_vm._s(column.labelTooltip))]), _c("i", {
7122
+ staticClass: "iconfont icon-bangzhuzhongxin",
7123
+ staticStyle: {
7124
+ "font-weight": "normal"
7125
+ }
7126
+ })])] : column.headerSlot ? [_vm._t(column.headerSlot, null, {
7127
+ "$index": scope.$index,
7128
+ "column": scope.column
7129
+ })] : _c("span", [_vm._v(" " + _vm._s(column.label) + " ")])];
6965
7130
  }
6966
7131
  }, {
6967
7132
  key: "default",
6968
7133
  fn: function(scope) {
6969
- return [column.render ? _c("render-component", {
7134
+ var _a2;
7135
+ return [column.slot ? _vm._t(column.slot, null, {
7136
+ "row": scope.row,
7137
+ "index": scope.$index
7138
+ }) : column.render ? _c("render-component", {
6970
7139
  attrs: {
6971
7140
  "render": column.render,
6972
7141
  "row": scope.row
6973
7142
  }
6974
- }) : [column.slot ? _vm._t(column.slot, null, {
6975
- "row": scope.row,
6976
- "index": scope.$index
6977
- }) : [column.prop === _vm.operationPropKey && !_vm.hasOperationSlot ? _vm._l(_vm.getOperationListLocal(column, scope), function(item, index2) {
7143
+ }) : column.prop === _vm.operationPropKey && !_vm.hasOperationSlot ? _vm._l(_vm.getOperationListLocal(column, scope), function(item, index2) {
6978
7144
  return _c("nf-button", _vm._g({
6979
7145
  key: item.key || index2,
6980
7146
  class: item.class,
@@ -6990,10 +7156,14 @@ var _sfc_render = function render3() {
6990
7156
  "circle": item.circle
6991
7157
  }
6992
7158
  }, item.events), [_vm._v(_vm._s(item.text) + " ")]);
6993
- }) : _c("span", [_vm._v(_vm._s(scope.row[column.prop]))])]]];
7159
+ }) : ((_a2 = column.attr) == null ? void 0 : _a2.formatter) ? _c("span", [_vm._v(" " + _vm._s(column.attr.formatter(scope.row, column, scope.row[column.prop], scope.$index)) + " ")]) : column.optionsEnum ? [column.optionsTag[scope.row[column.prop]] ? _c("nf-tag", {
7160
+ attrs: {
7161
+ "type": column.optionsTag[scope.row[column.prop]]
7162
+ }
7163
+ }, [_vm._v(_vm._s(column.optionsEnum[scope.row[column.prop]]))]) : _c("span", [_vm._v(" " + _vm._s(column.optionsEnum[scope.row[column.prop]]) + " ")])] : _c("span", [_vm._v(" " + _vm._s(scope.row[column.prop]) + _vm._s(column.unit) + " ")])];
6994
7164
  }
6995
7165
  }], null, true)
6996
- }, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2)]] : _vm._e()];
7166
+ }, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2) : _vm._e()];
6997
7167
  }), _vm._t("append", null, {
6998
7168
  "slot": "append"
6999
7169
  }), _vm._t("empty", function() {
@@ -7017,11 +7187,9 @@ var _sfc_render = function render3() {
7017
7187
  return [item.element === "el-button" ? _c("nf-button", _vm._g({
7018
7188
  key: item.key || index2,
7019
7189
  class: item.class,
7020
- style: {
7021
- ...item.style || {},
7022
- marginRight: "16px",
7190
+ style: _vm.getActionBarItemStyle(item, {
7023
7191
  marginLeft: "0px"
7024
- },
7192
+ }),
7025
7193
  attrs: {
7026
7194
  "size": item.size || "mini",
7027
7195
  "type": item.type || "text",
@@ -7035,10 +7203,7 @@ var _sfc_render = function render3() {
7035
7203
  }, item.events), [_vm._v(_vm._s(item.value) + " ")]) : _vm._e(), item.element === "el-checkbox" ? _c("el-checkbox", _vm._g({
7036
7204
  key: item.key || index2,
7037
7205
  class: item.class,
7038
- style: {
7039
- ...item.style || {},
7040
- marginRight: "16px"
7041
- },
7206
+ style: _vm.getActionBarItemStyle(item),
7042
7207
  attrs: {
7043
7208
  "label": item.label,
7044
7209
  "true-label": item["true-label"],
@@ -7060,10 +7225,7 @@ var _sfc_render = function render3() {
7060
7225
  }, item.events), [_vm._v(_vm._s(item.text) + " ")]) : _vm._e(), item.element === "el-checkbox-group" ? _c("el-checkbox-group", _vm._g({
7061
7226
  key: item.key || index2,
7062
7227
  class: item.class,
7063
- style: {
7064
- ...item.style || {},
7065
- marginRight: "16px"
7066
- },
7228
+ style: _vm.getActionBarItemStyle(item),
7067
7229
  attrs: {
7068
7230
  "label": item.label,
7069
7231
  "true-label": item["true-label"],
@@ -7137,10 +7299,7 @@ var _sfc_render = function render3() {
7137
7299
  })] : _vm._e()], 2) : _vm._e(), item.element === "el-checkbox-button" ? _c("el-checkbox-button", _vm._g({
7138
7300
  key: item.key || index2,
7139
7301
  class: item.class,
7140
- style: {
7141
- ...item.style || {},
7142
- marginRight: "16px"
7143
- },
7302
+ style: _vm.getActionBarItemStyle(item),
7144
7303
  attrs: {
7145
7304
  "label": item.label,
7146
7305
  "true-label": item["true-label"],
@@ -7162,10 +7321,7 @@ var _sfc_render = function render3() {
7162
7321
  }, item.events), [_vm._v(_vm._s(item.text) + " ")]) : _vm._e(), item.element === "el-radio" ? _c("el-radio", _vm._g({
7163
7322
  key: item.key || index2,
7164
7323
  class: item.class,
7165
- style: {
7166
- ...item.style || {},
7167
- marginRight: "16px"
7168
- },
7324
+ style: _vm.getActionBarItemStyle(item),
7169
7325
  attrs: {
7170
7326
  "label": item.label,
7171
7327
  "disabled": item.disabled,
@@ -7183,10 +7339,7 @@ var _sfc_render = function render3() {
7183
7339
  }, item.events), [_vm._v(_vm._s(item.text) + " ")]) : _vm._e(), item.element === "el-radio-group" ? _c("el-radio-group", _vm._g({
7184
7340
  key: item.key || index2,
7185
7341
  class: item.class,
7186
- style: {
7187
- ...item.style || {},
7188
- marginRight: "16px"
7189
- },
7342
+ style: _vm.getActionBarItemStyle(item),
7190
7343
  attrs: {
7191
7344
  "disabled": item.disabled,
7192
7345
  "size": item.size,
@@ -7247,10 +7400,7 @@ var _sfc_render = function render3() {
7247
7400
  })] : _vm._e()], 2) : _vm._e(), item.element === "el-radio-button" ? _c("el-radio-button", _vm._g({
7248
7401
  key: item.key || index2,
7249
7402
  class: item.class,
7250
- style: {
7251
- ...item.style || {},
7252
- marginRight: "16px"
7253
- },
7403
+ style: _vm.getActionBarItemStyle(item),
7254
7404
  attrs: {
7255
7405
  "label": item.label,
7256
7406
  "disabled": item.disabled,
@@ -7268,10 +7418,7 @@ var _sfc_render = function render3() {
7268
7418
  }, item.events), [_vm._v(_vm._s(item.text) + " ")]) : _vm._e(), item.element === "el-input" ? _c("el-input", _vm._g({
7269
7419
  key: item.key || index2,
7270
7420
  class: item.class,
7271
- style: {
7272
- ...item.style || {},
7273
- marginRight: "16px"
7274
- },
7421
+ style: _vm.getActionBarItemStyle(item),
7275
7422
  attrs: {
7276
7423
  "show-word-limit": item["show-word-limit"],
7277
7424
  "show-password": item["show-password"],
@@ -7317,10 +7464,7 @@ var _sfc_render = function render3() {
7317
7464
  }) : _vm._e()], 2) : _vm._e(), item.element === "el-autocomplete" ? _c("el-autocomplete", _vm._g({
7318
7465
  key: item.key || index2,
7319
7466
  class: item.class,
7320
- style: {
7321
- ...item.style || {},
7322
- marginRight: "16px"
7323
- },
7467
+ style: _vm.getActionBarItemStyle(item),
7324
7468
  attrs: {
7325
7469
  "value-key": item["value-key"],
7326
7470
  "fetch-suggestions": item["fetch-suggestions"],
@@ -7357,10 +7501,7 @@ var _sfc_render = function render3() {
7357
7501
  }) : _vm._e()], 2) : _vm._e(), item.element === "el-switch" ? _c("el-switch", _vm._g({
7358
7502
  key: item.key || index2,
7359
7503
  class: item.class,
7360
- style: {
7361
- ...item.style || {},
7362
- marginRight: "16px"
7363
- },
7504
+ style: _vm.getActionBarItemStyle(item),
7364
7505
  attrs: {
7365
7506
  "disabled": item.disabled,
7366
7507
  "width": item.width,
@@ -7385,10 +7526,7 @@ var _sfc_render = function render3() {
7385
7526
  }, item.events), [_vm._v(_vm._s(item.text) + " ")]) : _vm._e(), item.element === "el-input-number" ? _c("el-input-number", _vm._g({
7386
7527
  key: item.key || index2,
7387
7528
  class: item.class,
7388
- style: {
7389
- ...item.style || {},
7390
- marginRight: "16px"
7391
- },
7529
+ style: _vm.getActionBarItemStyle(item),
7392
7530
  attrs: {
7393
7531
  "min": item.min,
7394
7532
  "max": item.max,
@@ -7413,16 +7551,21 @@ var _sfc_render = function render3() {
7413
7551
  }, item.events)) : _vm._e(), item.element === "text" ? _c("span", _vm._g(_vm._b({
7414
7552
  key: item.key || index2,
7415
7553
  class: item.class,
7416
- style: {
7417
- ...item.style || {},
7418
- marginRight: "16px"
7419
- }
7554
+ style: _vm.getActionBarItemStyle(item)
7420
7555
  }, "span", item.attr, false), item.events), [_vm._v(" " + _vm._s(item.value) + " ")]) : _vm._e()];
7421
7556
  })] : _vm._e()];
7422
7557
  }), _vm._t("pagination", function() {
7423
7558
  return [_vm.renderPage ? _c("el-pagination", _vm._g(_vm._b({
7424
7559
  ref: "nfTablePaginationRef",
7425
- staticClass: "nf-pagination-box nf-fr"
7560
+ staticClass: "nf-pagination-box nf-fr",
7561
+ attrs: {
7562
+ "current-page": _vm.cPageAttrs["current-page"],
7563
+ "page-size": _vm.cPageAttrs["page-size"]
7564
+ },
7565
+ on: {
7566
+ "size-change": _vm.handleSizeChange,
7567
+ "current-change": _vm.handleCurrentChange
7568
+ }
7426
7569
  }, "el-pagination", _vm.pageAttrer, false), _vm.pageEvents)) : _vm._e()];
7427
7570
  })], 2)], 2), _vm.nfColumCheckDialogVisible && _vm.checkMode === "dialog" ? _c("column-check-dialog", {
7428
7571
  ref: "columnCheckDialog",
@@ -7434,7 +7577,7 @@ var _sfc_render = function render3() {
7434
7577
  "show": _vm.nfColumCheckDialogVisible,
7435
7578
  "table-columns": _vm.columns,
7436
7579
  "column-edit": _vm.columnEdit,
7437
- "storage-key": _vm.storageKey,
7580
+ "storage-key": _vm.cStorageKey,
7438
7581
  "width": _vm.columnCheckWidth,
7439
7582
  "modal-append-to-body": _vm.columnCheckModalAppendToBody,
7440
7583
  "modal": _vm.columnCheckModal,
@@ -7498,7 +7641,7 @@ var _sfc_render = function render3() {
7498
7641
  "get-all-check-desc": _vm.columnCheckGetAllCheckDesc,
7499
7642
  "column-edit": _vm.columnEdit,
7500
7643
  "operation-prop-key": _vm.operationPropKey,
7501
- "storage-key": _vm.storageKey,
7644
+ "storage-key": _vm.cStorageKey,
7502
7645
  "table-columns": _vm.columns
7503
7646
  }
7504
7647
  })], 2) : _vm._e()], 2);