@94ai/nf-table 5.0.38 → 6.1.1

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.
@@ -4,6 +4,7 @@ const vueDemi = require("vue-demi");
4
4
  const commonUtils = require("@94ai/common-utils");
5
5
  const vue2RuntimeHelpers = require("@94ai/vue2-runtime-helpers");
6
6
  const elementUi = require("element-ui");
7
+ const vue = require("vue");
7
8
  const NfMessage = require("@94ai/nf-message");
8
9
  const __sfc_main$2 = vueDemi.defineComponent({
9
10
  name: "NfColumnCheckDialog"
@@ -5056,13 +5057,13 @@ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
5056
5057
  };
5057
5058
  },
5058
5059
  getUnderlyingPotencialDraggableComponent: function getUnderlyingPotencialDraggableComponent(_ref) {
5059
- var vue = _ref.__vue__;
5060
- if (!vue || !vue.$options || !isTransitionName(vue.$options._componentTag)) {
5061
- if (!("realList" in vue) && vue.$children.length === 1 && "realList" in vue.$children[0])
5062
- return vue.$children[0];
5063
- return vue;
5060
+ var vue2 = _ref.__vue__;
5061
+ if (!vue2 || !vue2.$options || !isTransitionName(vue2.$options._componentTag)) {
5062
+ if (!("realList" in vue2) && vue2.$children.length === 1 && "realList" in vue2.$children[0])
5063
+ return vue2.$children[0];
5064
+ return vue2;
5064
5065
  }
5065
- return vue.$parent;
5066
+ return vue2.$parent;
5066
5067
  },
5067
5068
  emitChanges: function emitChanges(evt) {
5068
5069
  var _this5 = this;
@@ -5774,6 +5775,32 @@ const _sfc_render$1 = null;
5774
5775
  const _sfc_staticRenderFns$1 = null;
5775
5776
  var __component__$1 = /* @__PURE__ */ vue2RuntimeHelpers.normalizeComponent(_sfc_main, _sfc_render$1, _sfc_staticRenderFns$1, false, null, null, null, null);
5776
5777
  const RenderComponent = __component__$1.exports;
5778
+ /*!
5779
+ * vue-router v3.6.4
5780
+ * (c) 2022 Evan You
5781
+ * @license MIT
5782
+ */
5783
+ function throwNoCurrentInstance(method) {
5784
+ if (!vue.getCurrentInstance()) {
5785
+ throw new Error("[vue-router]: Missing current instance. " + method + "() must be called inside <script setup> or setup().");
5786
+ }
5787
+ }
5788
+ function useRoute() {
5789
+ if (process.env.NODE_ENV !== "production") {
5790
+ throwNoCurrentInstance("useRoute");
5791
+ }
5792
+ var root = vue.getCurrentInstance().proxy.$root;
5793
+ if (!root._$route) {
5794
+ var route = vue.effectScope(true).run(function() {
5795
+ return vue.shallowReactive(Object.assign({}, root.$router.currentRoute));
5796
+ });
5797
+ root._$route = route;
5798
+ root.$router.afterEach(function(to) {
5799
+ Object.assign(route, to);
5800
+ });
5801
+ }
5802
+ return root._$route;
5803
+ }
5777
5804
  const __sfc_main = vueDemi.defineComponent({
5778
5805
  name: "nf-table"
5779
5806
  });
@@ -5832,6 +5859,30 @@ __sfc_main.props = {
5832
5859
  type: Array,
5833
5860
  default: () => []
5834
5861
  },
5862
+ initSearchApi: {
5863
+ key: "initSearchApi",
5864
+ required: false,
5865
+ type: [Boolean, null],
5866
+ default: void 0
5867
+ },
5868
+ pageChangeSearchApi: {
5869
+ key: "pageChangeSearchApi",
5870
+ required: false,
5871
+ type: [Boolean, null],
5872
+ default: void 0
5873
+ },
5874
+ pageKeys: {
5875
+ key: "pageKeys",
5876
+ required: false,
5877
+ type: Array,
5878
+ default: () => ["pageNo", "pageSize"]
5879
+ },
5880
+ setEasyConf: {
5881
+ key: "setEasyConf",
5882
+ required: false,
5883
+ type: Boolean,
5884
+ default: false
5885
+ },
5835
5886
  dragCached: {
5836
5887
  key: "dragCached",
5837
5888
  required: false,
@@ -5884,13 +5935,13 @@ __sfc_main.props = {
5884
5935
  key: "storageKey",
5885
5936
  required: false,
5886
5937
  type: String,
5887
- default: "nf-table-columns-cached-key"
5938
+ default: ""
5888
5939
  },
5889
5940
  searchFormStorageKey: {
5890
5941
  key: "searchFormStorageKey",
5891
5942
  required: false,
5892
5943
  type: String,
5893
- default: "nf-search-form-columns-cached-key"
5944
+ default: ""
5894
5945
  },
5895
5946
  showColumn: {
5896
5947
  key: "showColumn",
@@ -6195,6 +6246,7 @@ __sfc_main.setup = (__props, __ctx) => {
6195
6246
  }
6196
6247
  return column.operationList || [];
6197
6248
  };
6249
+ const routeName = vueDemi.computed(() => useRoute().name);
6198
6250
  const instance = (_a = vueDemi.getCurrentInstance()) == null ? void 0 : _a.proxy;
6199
6251
  const elTableRef = vueDemi.ref();
6200
6252
  const nfTableActionContainerRef = vueDemi.ref();
@@ -6208,6 +6260,28 @@ __sfc_main.setup = (__props, __ctx) => {
6208
6260
  const columnCheckNfDrawer = vueDemi.ref();
6209
6261
  const elTableHeight = vueDemi.ref();
6210
6262
  const nfColumCheckDialogVisible = vueDemi.ref(false);
6263
+ const preSearchFormData = vueDemi.ref({});
6264
+ const cPageChangeSearchApi = vueDemi.ref(props.pageChangeSearchApi ?? props.setEasyConf);
6265
+ const cInitSearchApi = vueDemi.ref(props.initSearchApi ?? props.setEasyConf);
6266
+ const cStorageKey = vueDemi.ref(props.storageKey || `nf-table-columns-cached-key-${routeName.value}`);
6267
+ const cPageAttrs = vueDemi.reactive({
6268
+ // 页码,没有props时 & 允许分页时;默认 = 1
6269
+ "current-page": props.pageAttrs["current-page"] || (props.alwaysShowPage ? 1 : void 0),
6270
+ "page-size": props.pageAttrs["page-size"] || 10,
6271
+ pageKeys: props.pageKeys
6272
+ });
6273
+ const tableLoading = vueDemi.ref(false);
6274
+ const isLoading = vueDemi.computed(() => props.loading || tableLoading.value);
6275
+ const handleSizeChange = (val) => {
6276
+ cPageAttrs["page-size"] = val;
6277
+ if (cPageChangeSearchApi.value)
6278
+ onNfSearchFormSearch();
6279
+ };
6280
+ const handleCurrentChange = (val, isSearch = true) => {
6281
+ cPageAttrs["current-page"] = val;
6282
+ if (isSearch && cPageChangeSearchApi.value)
6283
+ onNfSearchFormSearch();
6284
+ };
6211
6285
  const showData = vueDemi.computed(() => {
6212
6286
  const pageSize = props.pageAttrs["page-size"];
6213
6287
  const currentPage = props.pageAttrs["current-page"] || 1;
@@ -6228,10 +6302,10 @@ __sfc_main.setup = (__props, __ctx) => {
6228
6302
  });
6229
6303
  const loadingInstance = vueDemi.ref();
6230
6304
  vueDemi.watch(() => {
6231
- return props.loading;
6305
+ return props.loading || tableLoading.value;
6232
6306
  }, async () => {
6233
6307
  var _a2, _b;
6234
- if (props.loading) {
6308
+ if (props.loading || tableLoading.value) {
6235
6309
  await vueDemi.nextTick();
6236
6310
  const {
6237
6311
  target,
@@ -6307,7 +6381,7 @@ __sfc_main.setup = (__props, __ctx) => {
6307
6381
  index: index2
6308
6382
  };
6309
6383
  });
6310
- return commonUtils.CachedManager.syncCachedSet(props.storageKey, columnState);
6384
+ return commonUtils.CachedManager.syncCachedSet(cStorageKey.value, columnState);
6311
6385
  }
6312
6386
  };
6313
6387
  const syncShowItemToInitHidden = () => {
@@ -6328,9 +6402,9 @@ __sfc_main.setup = (__props, __ctx) => {
6328
6402
  const syncCookiesToLocalShowColumn = async () => {
6329
6403
  if (props.columnEdit) {
6330
6404
  try {
6331
- let columnState = commonUtils.CachedManager.syncCachedGet(props.storageKey);
6405
+ let columnState = commonUtils.CachedManager.syncCachedGet(cStorageKey.value);
6332
6406
  if (!columnState) {
6333
- columnState = await commonUtils.CachedManager.asyncCachedGet(props.storageKey);
6407
+ columnState = await commonUtils.CachedManager.asyncCachedGet(cStorageKey.value);
6334
6408
  }
6335
6409
  if (columnState) {
6336
6410
  if (typeof columnState === "string") {
@@ -6354,9 +6428,9 @@ __sfc_main.setup = (__props, __ctx) => {
6354
6428
  var _a2, _b;
6355
6429
  if (props.columnEdit) {
6356
6430
  try {
6357
- let cached = commonUtils.CachedManager.syncCachedGet(props.storageKey);
6431
+ let cached = commonUtils.CachedManager.syncCachedGet(cStorageKey.value);
6358
6432
  if (!cached) {
6359
- cached = await commonUtils.CachedManager.asyncCachedGet(props.storageKey);
6433
+ cached = await commonUtils.CachedManager.asyncCachedGet(cStorageKey.value);
6360
6434
  }
6361
6435
  const cachedPriority = props.priority === "cached";
6362
6436
  if (cachedPriority ? cached : (_a2 = localShowColumn.value) == null ? void 0 : _a2.length) {
@@ -6369,7 +6443,7 @@ __sfc_main.setup = (__props, __ctx) => {
6369
6443
  }
6370
6444
  }
6371
6445
  if (props.dragCached) {
6372
- await commonUtils.CachedManager.asyncCachedGet(`${props.storageKey}$drag-column-width`);
6446
+ await commonUtils.CachedManager.asyncCachedGet(`${cStorageKey.value}$drag-column-width`);
6373
6447
  }
6374
6448
  };
6375
6449
  const getMinWidth = (column) => {
@@ -6401,7 +6475,7 @@ __sfc_main.setup = (__props, __ctx) => {
6401
6475
  }
6402
6476
  if (props.dragCached) {
6403
6477
  const prop = item.prop || ((_a2 = item.attr) == null ? void 0 : _a2.prop);
6404
- let columnWidth = commonUtils.CachedManager.syncCachedGet(`${props.storageKey}$drag-column-width`) || {};
6478
+ let columnWidth = commonUtils.CachedManager.syncCachedGet(`${cStorageKey.value}$drag-column-width`) || {};
6405
6479
  if (columnWidth[prop]) {
6406
6480
  attr.width = columnWidth[prop];
6407
6481
  }
@@ -6416,13 +6490,29 @@ __sfc_main.setup = (__props, __ctx) => {
6416
6490
  vueDemi.set(item, "initHidden", item.initHidden);
6417
6491
  vueDemi.set(item, "destory", item.destory);
6418
6492
  item.__index = index2;
6493
+ vueDemi.set(item, "optionsTag", {});
6494
+ if (item.getOptions) {
6495
+ vueDemi.set(item, "optionsEnum", {});
6496
+ item.getOptions((list) => {
6497
+ list.forEach((o) => {
6498
+ item.optionsEnum[o.value] = o.label;
6499
+ item.optionsTag[o.value] = o.tagType;
6500
+ });
6501
+ });
6502
+ } else if (item.options) {
6503
+ vueDemi.set(item, "optionsEnum", {});
6504
+ item.options.forEach((o) => {
6505
+ item.optionsEnum[o.value] = o.label;
6506
+ item.optionsTag[o.value] = o.tagType;
6507
+ });
6508
+ }
6419
6509
  return item;
6420
6510
  });
6421
6511
  if (readCached && props.columnEdit) {
6422
6512
  try {
6423
- let columnState = commonUtils.CachedManager.syncCachedGet(props.storageKey);
6513
+ let columnState = commonUtils.CachedManager.syncCachedGet(cStorageKey.value);
6424
6514
  if (!columnState) {
6425
- columnState = await commonUtils.CachedManager.asyncCachedGet(props.storageKey);
6515
+ columnState = await commonUtils.CachedManager.asyncCachedGet(cStorageKey.value);
6426
6516
  }
6427
6517
  props.columns._skip = true;
6428
6518
  if (columnState) {
@@ -6471,6 +6561,31 @@ __sfc_main.setup = (__props, __ctx) => {
6471
6561
  }, {
6472
6562
  deep: true
6473
6563
  });
6564
+ vueDemi.watch(() => props.pageAttrs, (val) => {
6565
+ if ("current-page" in val) {
6566
+ cPageAttrs["current-page"] = Number(val["current-page"]);
6567
+ }
6568
+ if ("page-size" in val) {
6569
+ cPageAttrs["page-size"] = Number(val["page-size"]);
6570
+ }
6571
+ }, {
6572
+ deep: true
6573
+ });
6574
+ if (cInitSearchApi.value)
6575
+ onNfSearchFormSearch();
6576
+ });
6577
+ const searchFormAttrer = vueDemi.computed(() => {
6578
+ const obj = {
6579
+ ...props.setEasyConf ? {
6580
+ labelWidth: 80,
6581
+ columns: 4,
6582
+ btnModel: "inline",
6583
+ columnEdit: true
6584
+ } : {},
6585
+ storageKey: props.searchFormStorageKey,
6586
+ ...props.searchFormAttrs
6587
+ };
6588
+ return obj;
6474
6589
  });
6475
6590
  const tableAttrer = vueDemi.computed(() => {
6476
6591
  const obj = {
@@ -6486,6 +6601,10 @@ __sfc_main.setup = (__props, __ctx) => {
6486
6601
  },
6487
6602
  resizable: true,
6488
6603
  border: true,
6604
+ stripe: window.nfTableStripe,
6605
+ ...props.setEasyConf ? {
6606
+ "row-key": "id"
6607
+ } : {},
6489
6608
  ...props.tableAttrs
6490
6609
  };
6491
6610
  delete obj.data;
@@ -6514,13 +6633,16 @@ __sfc_main.setup = (__props, __ctx) => {
6514
6633
  initPageSizes();
6515
6634
  const pageAttrer = vueDemi.computed(() => {
6516
6635
  var _a2;
6517
- return {
6636
+ const map = {
6518
6637
  background: false,
6519
6638
  layout: "total, sizes, prev, pager, next, jumper",
6520
6639
  "page-sizes": pageSizes.value,
6521
6640
  total: typeof props.pageAttrs.total === "undefined" ? (_a2 = props.data) == null ? void 0 : _a2.length : void 0,
6522
6641
  ...props.pageAttrs
6523
6642
  };
6643
+ delete map["current-page"];
6644
+ delete map["page-size"];
6645
+ return map;
6524
6646
  });
6525
6647
  const isShow = (row) => {
6526
6648
  if (row.type) {
@@ -6596,17 +6718,17 @@ __sfc_main.setup = (__props, __ctx) => {
6596
6718
  column.width = minWidth;
6597
6719
  }
6598
6720
  if (props.dragCached) {
6599
- const columnCachedData = await commonUtils.CachedManager.asyncCachedGet(`${props.storageKey}$drag-column-width`) || {};
6721
+ const columnCachedData = await commonUtils.CachedManager.asyncCachedGet(`${cStorageKey.value}$drag-column-width`) || {};
6600
6722
  columnCachedData[column.property] = column.width;
6601
- await commonUtils.CachedManager.asyncCachedSet(`${props.storageKey}$drag-column-width`, columnCachedData);
6723
+ await commonUtils.CachedManager.asyncCachedSet(`${cStorageKey.value}$drag-column-width`, columnCachedData);
6602
6724
  }
6603
6725
  await ((_b = (_a2 = props.tableEvents)["header-dragend"]) == null ? void 0 : _b.call(_a2, newWidth, oldWidth, column, event));
6604
6726
  };
6605
6727
  async function clearDragCached() {
6606
- await commonUtils.CachedManager.asyncCachedSet(`${props.storageKey}$drag-column-width`, null);
6728
+ await commonUtils.CachedManager.asyncCachedSet(`${cStorageKey.value}$drag-column-width`, null);
6607
6729
  }
6608
6730
  async function clearColumnEditCached() {
6609
- await commonUtils.CachedManager.asyncCachedSet(props.storageKey, null);
6731
+ await commonUtils.CachedManager.asyncCachedSet(cStorageKey.value, null);
6610
6732
  }
6611
6733
  const columnCheckConfirmFeedback = (value) => {
6612
6734
  if (!props.columnEdit) {
@@ -6652,6 +6774,30 @@ __sfc_main.setup = (__props, __ctx) => {
6652
6774
  elTableHeight.value = (_b = props.tableAttrs) == null ? void 0 : _b.height;
6653
6775
  }
6654
6776
  };
6777
+ const searchApi = async (formData = {}) => {
6778
+ var _a2, _b, _c;
6779
+ (_b = (_a2 = props.searchFormEvents) == null ? void 0 : _a2["onSearch"]) == null ? void 0 : _b.call(_a2, formData);
6780
+ if (!((_c = instance == null ? void 0 : instance.$listeners) == null ? void 0 : _c.searchApi))
6781
+ return;
6782
+ tableLoading.value = true;
6783
+ if (JSON.stringify(preSearchFormData.value) !== JSON.stringify(formData)) {
6784
+ handleCurrentChange(1, false);
6785
+ }
6786
+ preSearchFormData.value = formData;
6787
+ await vueDemi.nextTick();
6788
+ emit("searchApi", {
6789
+ data: {
6790
+ ...formData,
6791
+ ...props.alwaysShowPage ? {
6792
+ [cPageAttrs.pageKeys[0]]: cPageAttrs["current-page"],
6793
+ [cPageAttrs.pageKeys[1]]: cPageAttrs["page-size"]
6794
+ } : {}
6795
+ },
6796
+ callback: () => {
6797
+ tableLoading.value = false;
6798
+ }
6799
+ });
6800
+ };
6655
6801
  vueDemi.onMounted(() => {
6656
6802
  calcTableHeight();
6657
6803
  props.columns.forEach((i) => {
@@ -6660,6 +6806,7 @@ __sfc_main.setup = (__props, __ctx) => {
6660
6806
  }
6661
6807
  });
6662
6808
  });
6809
+ const nfTableBorder = window.nfTableBorder;
6663
6810
  return Object.assign({
6664
6811
  getOperationListLocal,
6665
6812
  elTableRef,
@@ -6674,11 +6821,16 @@ __sfc_main.setup = (__props, __ctx) => {
6674
6821
  columnCheckNfDrawer,
6675
6822
  elTableHeight,
6676
6823
  nfColumCheckDialogVisible,
6824
+ cStorageKey,
6825
+ cPageAttrs,
6826
+ handleSizeChange,
6827
+ handleCurrentChange,
6677
6828
  showData,
6678
6829
  hasOperationSlot,
6679
6830
  hasActionBarSlot,
6680
6831
  tableColumns,
6681
6832
  elTableRefKey,
6833
+ searchFormAttrer,
6682
6834
  tableAttrer,
6683
6835
  tableEventer,
6684
6836
  renderPage,
@@ -6686,7 +6838,9 @@ __sfc_main.setup = (__props, __ctx) => {
6686
6838
  isShow,
6687
6839
  getActionBarItemStyle,
6688
6840
  fieldsConfirm,
6689
- columnCheckConfirm
6841
+ columnCheckConfirm,
6842
+ searchApi,
6843
+ nfTableBorder
6690
6844
  }, {
6691
6845
  /**
6692
6846
  * 表格clearFilter
@@ -6800,6 +6954,10 @@ __sfc_main.setup = (__props, __ctx) => {
6800
6954
  * 渲染表格项数据
6801
6955
  */
6802
6956
  tableColumns,
6957
+ /**
6958
+ * 表格loading
6959
+ */
6960
+ isLoading,
6803
6961
  /**
6804
6962
  * 计算表格高度
6805
6963
  */
@@ -6836,8 +6994,11 @@ var _sfc_render = function render3() {
6836
6994
  }, [_vm._t("searchBox", function() {
6837
6995
  var _a2;
6838
6996
  return [_c("nf-search-form", _vm._g(_vm._b({
6839
- ref: "nfSearchFormRef"
6840
- }, "nf-search-form", _vm.searchFormAttrs, false), _vm.searchFormEvents), [_vm._l(((_a2 = _vm.nfSearchFormRef) == null ? void 0 : _a2.renderSearchFormItemOptions) || [], function(item) {
6997
+ ref: "nfSearchFormRef",
6998
+ on: {
6999
+ "onSearch": _vm.searchApi
7000
+ }
7001
+ }, "nf-search-form", _vm.searchFormAttrer, false), _vm.searchFormEvents), [_vm._l(((_a2 = _vm.nfSearchFormRef) == null ? void 0 : _a2.renderSearchFormItemOptions) || [], function(item) {
6841
7002
  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;
6842
7003
  return [((_a3 = item.tooltip) == null ? void 0 : _a3.slot) ? _vm._t(item.tooltip.slot, null, {
6843
7004
  "slot": item.tooltip.slot
@@ -6898,7 +7059,7 @@ var _sfc_render = function render3() {
6898
7059
  ref: "elTableRef",
6899
7060
  class: {
6900
7061
  "nf-table-container": true,
6901
- "nf-default-table-border": !((_a = _vm.tableAttrs) == null ? void 0 : _a.border)
7062
+ "nf-default-table-border": !_vm.nfTableBorder && !((_a = _vm.tableAttrs) == null ? void 0 : _a.border)
6902
7063
  },
6903
7064
  attrs: {
6904
7065
  "data": _vm.showData,
@@ -6906,16 +7067,11 @@ var _sfc_render = function render3() {
6906
7067
  "height": _vm.elTableHeight
6907
7068
  }
6908
7069
  }, "el-table", _vm.tableAttrer, false), _vm.tableEventer), [_vm._l(_vm.tableColumns, function(column) {
6909
- return [_vm.isShow(column) ? [column.type ? [column.type !== "expand" ? _c("el-table-column", _vm._b({
6910
- key: column.key || column.prop || column.type,
6911
- attrs: {
6912
- "type": column.type,
6913
- "label": column.label
6914
- }
6915
- }, "el-table-column", column.attr, false)) : _c("el-table-column", _vm._b({
7070
+ return [column.type && _vm.isShow(column) ? _c("el-table-column", _vm._b({
6916
7071
  key: column.key || column.prop || column.type,
6917
7072
  attrs: {
6918
7073
  "type": column.type,
7074
+ "prop": column.prop,
6919
7075
  "label": column.label
6920
7076
  },
6921
7077
  scopedSlots: _vm._u([{
@@ -6927,35 +7083,22 @@ var _sfc_render = function render3() {
6927
7083
  })] : void 0;
6928
7084
  }
6929
7085
  }], null, true)
6930
- }, "el-table-column", column.attr, false))] : [column.attr && column.attr.formatter ? _c("el-table-column", _vm._b({
6931
- key: column.key || column.prop,
6932
- attrs: {
6933
- "prop": column.prop,
6934
- "label": column.label
6935
- },
6936
- scopedSlots: _vm._u([{
6937
- key: "header",
6938
- fn: function(scope) {
6939
- return [column.headerSlot ? [_vm._t(column.headerSlot, null, {
6940
- "$index": scope.$index,
6941
- "column": scope.column
6942
- })] : _c("span", [_vm._v(" " + _vm._s(column.label) + " ")])];
6943
- }
6944
- }], null, true)
6945
- }, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2) : _c("el-table-column", _vm._b({
6946
- key: column.key || column.prop,
7086
+ }, "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({
7087
+ key: column.key || column.prop || column.type,
6947
7088
  attrs: {
7089
+ "type": column.type,
6948
7090
  "prop": column.prop,
6949
7091
  "label": column.label
6950
7092
  },
6951
7093
  scopedSlots: _vm._u([{
6952
7094
  key: "header",
6953
7095
  fn: function(scope) {
6954
- return [column.headerSlot ? [_vm._t(column.headerSlot, null, {
6955
- "$index": scope.$index,
6956
- "column": scope.column
6957
- })] : _c("span", [_vm._v(" " + _vm._s(column.label) + " ")]), column.prop === _vm.operationPropKey && _vm.columnEdit && _vm.columnPosition === "embed" ? _vm._t("operationIconColumnCheck", function() {
6958
- return [_c("el-tooltip", {
7096
+ return [_vm.columnEdit && column.prop === _vm.operationPropKey && _vm.columnPosition === "embed" ? _vm._t("operationIconColumnCheck", function() {
7097
+ return [_c("span", {
7098
+ staticStyle: {
7099
+ "white-space": "nowrap"
7100
+ }
7101
+ }, [_vm._v(" " + _vm._s(column.label) + " ")]), _c("el-tooltip", {
6959
7102
  attrs: {
6960
7103
  "popper-class": "actionTooltipRef",
6961
7104
  "placement": "top",
@@ -6972,20 +7115,43 @@ var _sfc_render = function render3() {
6972
7115
  })])];
6973
7116
  }, {
6974
7117
  "column": column
6975
- }) : _vm._e()];
7118
+ }) : column.labelTooltip ? [_c("span", {
7119
+ staticStyle: {
7120
+ "white-space": "nowrap"
7121
+ }
7122
+ }, [_vm._v(" " + _vm._s(column.label) + " ")]), _c("el-tooltip", {
7123
+ attrs: {
7124
+ "placement": "right",
7125
+ "effect": "light"
7126
+ }
7127
+ }, [_c("div", {
7128
+ attrs: {
7129
+ "slot": "content"
7130
+ },
7131
+ slot: "content"
7132
+ }, [_vm._v(_vm._s(column.labelTooltip))]), _c("i", {
7133
+ staticClass: "iconfont icon-bangzhuzhongxin",
7134
+ staticStyle: {
7135
+ "font-weight": "normal"
7136
+ }
7137
+ })])] : column.headerSlot ? [_vm._t(column.headerSlot, null, {
7138
+ "$index": scope.$index,
7139
+ "column": scope.column
7140
+ })] : _c("span", [_vm._v(" " + _vm._s(column.label) + " ")])];
6976
7141
  }
6977
7142
  }, {
6978
7143
  key: "default",
6979
7144
  fn: function(scope) {
6980
- return [column.render ? _c("render-component", {
7145
+ var _a2;
7146
+ return [column.slot ? _vm._t(column.slot, null, {
7147
+ "row": scope.row,
7148
+ "index": scope.$index
7149
+ }) : column.render ? _c("render-component", {
6981
7150
  attrs: {
6982
7151
  "render": column.render,
6983
7152
  "row": scope.row
6984
7153
  }
6985
- }) : [column.slot ? _vm._t(column.slot, null, {
6986
- "row": scope.row,
6987
- "index": scope.$index
6988
- }) : [column.prop === _vm.operationPropKey && !_vm.hasOperationSlot ? _vm._l(_vm.getOperationListLocal(column, scope), function(item, index2) {
7154
+ }) : column.prop === _vm.operationPropKey && !_vm.hasOperationSlot ? _vm._l(_vm.getOperationListLocal(column, scope), function(item, index2) {
6989
7155
  return _c("nf-button", _vm._g({
6990
7156
  key: item.key || index2,
6991
7157
  class: item.class,
@@ -7001,10 +7167,14 @@ var _sfc_render = function render3() {
7001
7167
  "circle": item.circle
7002
7168
  }
7003
7169
  }, item.events), [_vm._v(_vm._s(item.text) + " ")]);
7004
- }) : _c("span", [_vm._v(_vm._s(scope.row[column.prop]))])]]];
7170
+ }) : ((_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", {
7171
+ attrs: {
7172
+ "type": column.optionsTag[scope.row[column.prop]]
7173
+ }
7174
+ }, [_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) + " ")])];
7005
7175
  }
7006
7176
  }], null, true)
7007
- }, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2)]] : _vm._e()];
7177
+ }, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2) : _vm._e()];
7008
7178
  }), _vm._t("append", null, {
7009
7179
  "slot": "append"
7010
7180
  }), _vm._t("empty", function() {
@@ -7398,7 +7568,15 @@ var _sfc_render = function render3() {
7398
7568
  }), _vm._t("pagination", function() {
7399
7569
  return [_vm.renderPage ? _c("el-pagination", _vm._g(_vm._b({
7400
7570
  ref: "nfTablePaginationRef",
7401
- staticClass: "nf-pagination-box nf-fr"
7571
+ staticClass: "nf-pagination-box nf-fr",
7572
+ attrs: {
7573
+ "current-page": _vm.cPageAttrs["current-page"],
7574
+ "page-size": _vm.cPageAttrs["page-size"]
7575
+ },
7576
+ on: {
7577
+ "size-change": _vm.handleSizeChange,
7578
+ "current-change": _vm.handleCurrentChange
7579
+ }
7402
7580
  }, "el-pagination", _vm.pageAttrer, false), _vm.pageEvents)) : _vm._e()];
7403
7581
  })], 2)], 2), _vm.nfColumCheckDialogVisible && _vm.checkMode === "dialog" ? _c("column-check-dialog", {
7404
7582
  ref: "columnCheckDialog",
@@ -7410,7 +7588,7 @@ var _sfc_render = function render3() {
7410
7588
  "show": _vm.nfColumCheckDialogVisible,
7411
7589
  "table-columns": _vm.columns,
7412
7590
  "column-edit": _vm.columnEdit,
7413
- "storage-key": _vm.storageKey,
7591
+ "storage-key": _vm.cStorageKey,
7414
7592
  "width": _vm.columnCheckWidth,
7415
7593
  "modal-append-to-body": _vm.columnCheckModalAppendToBody,
7416
7594
  "modal": _vm.columnCheckModal,
@@ -7474,7 +7652,7 @@ var _sfc_render = function render3() {
7474
7652
  "get-all-check-desc": _vm.columnCheckGetAllCheckDesc,
7475
7653
  "column-edit": _vm.columnEdit,
7476
7654
  "operation-prop-key": _vm.operationPropKey,
7477
- "storage-key": _vm.storageKey,
7655
+ "storage-key": _vm.cStorageKey,
7478
7656
  "table-columns": _vm.columns
7479
7657
  }
7480
7658
  })], 2) : _vm._e()], 2);