@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.
@@ -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) {
@@ -6580,6 +6702,14 @@ __sfc_main.setup = (__props, __ctx) => {
6580
6702
  var _a2;
6581
6703
  (_a2 = elTableRef.value) == null ? void 0 : _a2.sort(prop, order);
6582
6704
  };
6705
+ const getActionBarItemStyle = (item, additionStyle) => {
6706
+ return {
6707
+ // action默认右边距为8px
6708
+ marginRight: "8px",
6709
+ ...additionStyle || {},
6710
+ ...item.style || {}
6711
+ };
6712
+ };
6583
6713
  const headerDragend = async (newWidth, oldWidth, column, event) => {
6584
6714
  var _a2, _b;
6585
6715
  await vueDemi.nextTick();
@@ -6588,17 +6718,17 @@ __sfc_main.setup = (__props, __ctx) => {
6588
6718
  column.width = minWidth;
6589
6719
  }
6590
6720
  if (props.dragCached) {
6591
- const columnCachedData = await commonUtils.CachedManager.asyncCachedGet(`${props.storageKey}$drag-column-width`) || {};
6721
+ const columnCachedData = await commonUtils.CachedManager.asyncCachedGet(`${cStorageKey.value}$drag-column-width`) || {};
6592
6722
  columnCachedData[column.property] = column.width;
6593
- await commonUtils.CachedManager.asyncCachedSet(`${props.storageKey}$drag-column-width`, columnCachedData);
6723
+ await commonUtils.CachedManager.asyncCachedSet(`${cStorageKey.value}$drag-column-width`, columnCachedData);
6594
6724
  }
6595
6725
  await ((_b = (_a2 = props.tableEvents)["header-dragend"]) == null ? void 0 : _b.call(_a2, newWidth, oldWidth, column, event));
6596
6726
  };
6597
6727
  async function clearDragCached() {
6598
- await commonUtils.CachedManager.asyncCachedSet(`${props.storageKey}$drag-column-width`, null);
6728
+ await commonUtils.CachedManager.asyncCachedSet(`${cStorageKey.value}$drag-column-width`, null);
6599
6729
  }
6600
6730
  async function clearColumnEditCached() {
6601
- await commonUtils.CachedManager.asyncCachedSet(props.storageKey, null);
6731
+ await commonUtils.CachedManager.asyncCachedSet(cStorageKey.value, null);
6602
6732
  }
6603
6733
  const columnCheckConfirmFeedback = (value) => {
6604
6734
  if (!props.columnEdit) {
@@ -6644,6 +6774,30 @@ __sfc_main.setup = (__props, __ctx) => {
6644
6774
  elTableHeight.value = (_b = props.tableAttrs) == null ? void 0 : _b.height;
6645
6775
  }
6646
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
+ };
6647
6801
  vueDemi.onMounted(() => {
6648
6802
  calcTableHeight();
6649
6803
  props.columns.forEach((i) => {
@@ -6652,6 +6806,7 @@ __sfc_main.setup = (__props, __ctx) => {
6652
6806
  }
6653
6807
  });
6654
6808
  });
6809
+ const nfTableBorder = window.nfTableBorder;
6655
6810
  return Object.assign({
6656
6811
  getOperationListLocal,
6657
6812
  elTableRef,
@@ -6666,18 +6821,26 @@ __sfc_main.setup = (__props, __ctx) => {
6666
6821
  columnCheckNfDrawer,
6667
6822
  elTableHeight,
6668
6823
  nfColumCheckDialogVisible,
6824
+ cStorageKey,
6825
+ cPageAttrs,
6826
+ handleSizeChange,
6827
+ handleCurrentChange,
6669
6828
  showData,
6670
6829
  hasOperationSlot,
6671
6830
  hasActionBarSlot,
6672
6831
  tableColumns,
6673
6832
  elTableRefKey,
6833
+ searchFormAttrer,
6674
6834
  tableAttrer,
6675
6835
  tableEventer,
6676
6836
  renderPage,
6677
6837
  pageAttrer,
6678
6838
  isShow,
6839
+ getActionBarItemStyle,
6679
6840
  fieldsConfirm,
6680
- columnCheckConfirm
6841
+ columnCheckConfirm,
6842
+ searchApi,
6843
+ nfTableBorder
6681
6844
  }, {
6682
6845
  /**
6683
6846
  * 表格clearFilter
@@ -6791,6 +6954,10 @@ __sfc_main.setup = (__props, __ctx) => {
6791
6954
  * 渲染表格项数据
6792
6955
  */
6793
6956
  tableColumns,
6957
+ /**
6958
+ * 表格loading
6959
+ */
6960
+ isLoading,
6794
6961
  /**
6795
6962
  * 计算表格高度
6796
6963
  */
@@ -6827,8 +6994,11 @@ var _sfc_render = function render3() {
6827
6994
  }, [_vm._t("searchBox", function() {
6828
6995
  var _a2;
6829
6996
  return [_c("nf-search-form", _vm._g(_vm._b({
6830
- ref: "nfSearchFormRef"
6831
- }, "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) {
6832
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;
6833
7003
  return [((_a3 = item.tooltip) == null ? void 0 : _a3.slot) ? _vm._t(item.tooltip.slot, null, {
6834
7004
  "slot": item.tooltip.slot
@@ -6889,7 +7059,7 @@ var _sfc_render = function render3() {
6889
7059
  ref: "elTableRef",
6890
7060
  class: {
6891
7061
  "nf-table-container": true,
6892
- "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)
6893
7063
  },
6894
7064
  attrs: {
6895
7065
  "data": _vm.showData,
@@ -6897,56 +7067,29 @@ var _sfc_render = function render3() {
6897
7067
  "height": _vm.elTableHeight
6898
7068
  }
6899
7069
  }, "el-table", _vm.tableAttrer, false), _vm.tableEventer), [_vm._l(_vm.tableColumns, function(column) {
6900
- return [_vm.isShow(column) ? [column.type ? [column.type !== "expand" ? _c("el-table-column", _vm._b({
7070
+ return [column.type && _vm.isShow(column) ? _c("el-table-column", _vm._b({
6901
7071
  key: column.key || column.prop || column.type,
6902
7072
  attrs: {
6903
7073
  "type": column.type,
7074
+ "prop": column.prop,
6904
7075
  "label": column.label
6905
7076
  }
6906
- }, "el-table-column", column.attr, false)) : _c("el-table-column", _vm._b({
7077
+ }, "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({
6907
7078
  key: column.key || column.prop || column.type,
6908
7079
  attrs: {
6909
7080
  "type": column.type,
6910
- "label": column.label
6911
- },
6912
- scopedSlots: _vm._u([{
6913
- key: "default",
6914
- fn: function(scope) {
6915
- return column.slot ? [_vm._t(column.slot, null, {
6916
- "row": scope.row,
6917
- "index": scope.$index
6918
- })] : void 0;
6919
- }
6920
- }], null, true)
6921
- }, "el-table-column", column.attr, false))] : [column.attr && column.attr.formatter ? _c("el-table-column", _vm._b({
6922
- key: column.key || column.prop,
6923
- attrs: {
6924
- "prop": column.prop,
6925
- "label": column.label
6926
- },
6927
- scopedSlots: _vm._u([{
6928
- key: "header",
6929
- fn: function(scope) {
6930
- return [column.headerSlot ? [_vm._t(column.headerSlot, null, {
6931
- "$index": scope.$index,
6932
- "column": scope.column
6933
- })] : _c("span", [_vm._v(" " + _vm._s(column.label) + " ")])];
6934
- }
6935
- }], null, true)
6936
- }, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2) : _c("el-table-column", _vm._b({
6937
- key: column.key || column.prop,
6938
- attrs: {
6939
7081
  "prop": column.prop,
6940
7082
  "label": column.label
6941
7083
  },
6942
7084
  scopedSlots: _vm._u([{
6943
7085
  key: "header",
6944
7086
  fn: function(scope) {
6945
- return [column.headerSlot ? [_vm._t(column.headerSlot, null, {
6946
- "$index": scope.$index,
6947
- "column": scope.column
6948
- })] : _c("span", [_vm._v(" " + _vm._s(column.label) + " ")]), column.prop === _vm.operationPropKey && _vm.columnEdit && _vm.columnPosition === "embed" ? _vm._t("operationIconColumnCheck", function() {
6949
- return [_c("el-tooltip", {
7087
+ return [_vm.columnEdit && column.prop === _vm.operationPropKey && _vm.columnPosition === "embed" ? _vm._t("operationIconColumnCheck", function() {
7088
+ return [_c("span", {
7089
+ staticStyle: {
7090
+ "white-space": "nowrap"
7091
+ }
7092
+ }, [_vm._v(" " + _vm._s(column.label) + " ")]), _c("el-tooltip", {
6950
7093
  attrs: {
6951
7094
  "popper-class": "actionTooltipRef",
6952
7095
  "placement": "top",
@@ -6963,20 +7106,43 @@ var _sfc_render = function render3() {
6963
7106
  })])];
6964
7107
  }, {
6965
7108
  "column": column
6966
- }) : _vm._e()];
7109
+ }) : column.labelTooltip ? [_c("span", {
7110
+ staticStyle: {
7111
+ "white-space": "nowrap"
7112
+ }
7113
+ }, [_vm._v(" " + _vm._s(column.label) + " ")]), _c("el-tooltip", {
7114
+ attrs: {
7115
+ "placement": "right",
7116
+ "effect": "light"
7117
+ }
7118
+ }, [_c("div", {
7119
+ attrs: {
7120
+ "slot": "content"
7121
+ },
7122
+ slot: "content"
7123
+ }, [_vm._v(_vm._s(column.labelTooltip))]), _c("i", {
7124
+ staticClass: "iconfont icon-bangzhuzhongxin",
7125
+ staticStyle: {
7126
+ "font-weight": "normal"
7127
+ }
7128
+ })])] : column.headerSlot ? [_vm._t(column.headerSlot, null, {
7129
+ "$index": scope.$index,
7130
+ "column": scope.column
7131
+ })] : _c("span", [_vm._v(" " + _vm._s(column.label) + " ")])];
6967
7132
  }
6968
7133
  }, {
6969
7134
  key: "default",
6970
7135
  fn: function(scope) {
6971
- return [column.render ? _c("render-component", {
7136
+ var _a2;
7137
+ return [column.slot ? _vm._t(column.slot, null, {
7138
+ "row": scope.row,
7139
+ "index": scope.$index
7140
+ }) : column.render ? _c("render-component", {
6972
7141
  attrs: {
6973
7142
  "render": column.render,
6974
7143
  "row": scope.row
6975
7144
  }
6976
- }) : [column.slot ? _vm._t(column.slot, null, {
6977
- "row": scope.row,
6978
- "index": scope.$index
6979
- }) : [column.prop === _vm.operationPropKey && !_vm.hasOperationSlot ? _vm._l(_vm.getOperationListLocal(column, scope), function(item, index2) {
7145
+ }) : column.prop === _vm.operationPropKey && !_vm.hasOperationSlot ? _vm._l(_vm.getOperationListLocal(column, scope), function(item, index2) {
6980
7146
  return _c("nf-button", _vm._g({
6981
7147
  key: item.key || index2,
6982
7148
  class: item.class,
@@ -6992,10 +7158,14 @@ var _sfc_render = function render3() {
6992
7158
  "circle": item.circle
6993
7159
  }
6994
7160
  }, item.events), [_vm._v(_vm._s(item.text) + " ")]);
6995
- }) : _c("span", [_vm._v(_vm._s(scope.row[column.prop]))])]]];
7161
+ }) : ((_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", {
7162
+ attrs: {
7163
+ "type": column.optionsTag[scope.row[column.prop]]
7164
+ }
7165
+ }, [_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) + " ")])];
6996
7166
  }
6997
7167
  }], null, true)
6998
- }, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2)]] : _vm._e()];
7168
+ }, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2) : _vm._e()];
6999
7169
  }), _vm._t("append", null, {
7000
7170
  "slot": "append"
7001
7171
  }), _vm._t("empty", function() {
@@ -7019,11 +7189,9 @@ var _sfc_render = function render3() {
7019
7189
  return [item.element === "el-button" ? _c("nf-button", _vm._g({
7020
7190
  key: item.key || index2,
7021
7191
  class: item.class,
7022
- style: {
7023
- ...item.style || {},
7024
- marginRight: "16px",
7192
+ style: _vm.getActionBarItemStyle(item, {
7025
7193
  marginLeft: "0px"
7026
- },
7194
+ }),
7027
7195
  attrs: {
7028
7196
  "size": item.size || "mini",
7029
7197
  "type": item.type || "text",
@@ -7037,10 +7205,7 @@ var _sfc_render = function render3() {
7037
7205
  }, item.events), [_vm._v(_vm._s(item.value) + " ")]) : _vm._e(), item.element === "el-checkbox" ? _c("el-checkbox", _vm._g({
7038
7206
  key: item.key || index2,
7039
7207
  class: item.class,
7040
- style: {
7041
- ...item.style || {},
7042
- marginRight: "16px"
7043
- },
7208
+ style: _vm.getActionBarItemStyle(item),
7044
7209
  attrs: {
7045
7210
  "label": item.label,
7046
7211
  "true-label": item["true-label"],
@@ -7062,10 +7227,7 @@ var _sfc_render = function render3() {
7062
7227
  }, item.events), [_vm._v(_vm._s(item.text) + " ")]) : _vm._e(), item.element === "el-checkbox-group" ? _c("el-checkbox-group", _vm._g({
7063
7228
  key: item.key || index2,
7064
7229
  class: item.class,
7065
- style: {
7066
- ...item.style || {},
7067
- marginRight: "16px"
7068
- },
7230
+ style: _vm.getActionBarItemStyle(item),
7069
7231
  attrs: {
7070
7232
  "label": item.label,
7071
7233
  "true-label": item["true-label"],
@@ -7139,10 +7301,7 @@ var _sfc_render = function render3() {
7139
7301
  })] : _vm._e()], 2) : _vm._e(), item.element === "el-checkbox-button" ? _c("el-checkbox-button", _vm._g({
7140
7302
  key: item.key || index2,
7141
7303
  class: item.class,
7142
- style: {
7143
- ...item.style || {},
7144
- marginRight: "16px"
7145
- },
7304
+ style: _vm.getActionBarItemStyle(item),
7146
7305
  attrs: {
7147
7306
  "label": item.label,
7148
7307
  "true-label": item["true-label"],
@@ -7164,10 +7323,7 @@ var _sfc_render = function render3() {
7164
7323
  }, item.events), [_vm._v(_vm._s(item.text) + " ")]) : _vm._e(), item.element === "el-radio" ? _c("el-radio", _vm._g({
7165
7324
  key: item.key || index2,
7166
7325
  class: item.class,
7167
- style: {
7168
- ...item.style || {},
7169
- marginRight: "16px"
7170
- },
7326
+ style: _vm.getActionBarItemStyle(item),
7171
7327
  attrs: {
7172
7328
  "label": item.label,
7173
7329
  "disabled": item.disabled,
@@ -7185,10 +7341,7 @@ var _sfc_render = function render3() {
7185
7341
  }, item.events), [_vm._v(_vm._s(item.text) + " ")]) : _vm._e(), item.element === "el-radio-group" ? _c("el-radio-group", _vm._g({
7186
7342
  key: item.key || index2,
7187
7343
  class: item.class,
7188
- style: {
7189
- ...item.style || {},
7190
- marginRight: "16px"
7191
- },
7344
+ style: _vm.getActionBarItemStyle(item),
7192
7345
  attrs: {
7193
7346
  "disabled": item.disabled,
7194
7347
  "size": item.size,
@@ -7249,10 +7402,7 @@ var _sfc_render = function render3() {
7249
7402
  })] : _vm._e()], 2) : _vm._e(), item.element === "el-radio-button" ? _c("el-radio-button", _vm._g({
7250
7403
  key: item.key || index2,
7251
7404
  class: item.class,
7252
- style: {
7253
- ...item.style || {},
7254
- marginRight: "16px"
7255
- },
7405
+ style: _vm.getActionBarItemStyle(item),
7256
7406
  attrs: {
7257
7407
  "label": item.label,
7258
7408
  "disabled": item.disabled,
@@ -7270,10 +7420,7 @@ var _sfc_render = function render3() {
7270
7420
  }, item.events), [_vm._v(_vm._s(item.text) + " ")]) : _vm._e(), item.element === "el-input" ? _c("el-input", _vm._g({
7271
7421
  key: item.key || index2,
7272
7422
  class: item.class,
7273
- style: {
7274
- ...item.style || {},
7275
- marginRight: "16px"
7276
- },
7423
+ style: _vm.getActionBarItemStyle(item),
7277
7424
  attrs: {
7278
7425
  "show-word-limit": item["show-word-limit"],
7279
7426
  "show-password": item["show-password"],
@@ -7319,10 +7466,7 @@ var _sfc_render = function render3() {
7319
7466
  }) : _vm._e()], 2) : _vm._e(), item.element === "el-autocomplete" ? _c("el-autocomplete", _vm._g({
7320
7467
  key: item.key || index2,
7321
7468
  class: item.class,
7322
- style: {
7323
- ...item.style || {},
7324
- marginRight: "16px"
7325
- },
7469
+ style: _vm.getActionBarItemStyle(item),
7326
7470
  attrs: {
7327
7471
  "value-key": item["value-key"],
7328
7472
  "fetch-suggestions": item["fetch-suggestions"],
@@ -7359,10 +7503,7 @@ var _sfc_render = function render3() {
7359
7503
  }) : _vm._e()], 2) : _vm._e(), item.element === "el-switch" ? _c("el-switch", _vm._g({
7360
7504
  key: item.key || index2,
7361
7505
  class: item.class,
7362
- style: {
7363
- ...item.style || {},
7364
- marginRight: "16px"
7365
- },
7506
+ style: _vm.getActionBarItemStyle(item),
7366
7507
  attrs: {
7367
7508
  "disabled": item.disabled,
7368
7509
  "width": item.width,
@@ -7387,10 +7528,7 @@ var _sfc_render = function render3() {
7387
7528
  }, item.events), [_vm._v(_vm._s(item.text) + " ")]) : _vm._e(), item.element === "el-input-number" ? _c("el-input-number", _vm._g({
7388
7529
  key: item.key || index2,
7389
7530
  class: item.class,
7390
- style: {
7391
- ...item.style || {},
7392
- marginRight: "16px"
7393
- },
7531
+ style: _vm.getActionBarItemStyle(item),
7394
7532
  attrs: {
7395
7533
  "min": item.min,
7396
7534
  "max": item.max,
@@ -7415,16 +7553,21 @@ var _sfc_render = function render3() {
7415
7553
  }, item.events)) : _vm._e(), item.element === "text" ? _c("span", _vm._g(_vm._b({
7416
7554
  key: item.key || index2,
7417
7555
  class: item.class,
7418
- style: {
7419
- ...item.style || {},
7420
- marginRight: "16px"
7421
- }
7556
+ style: _vm.getActionBarItemStyle(item)
7422
7557
  }, "span", item.attr, false), item.events), [_vm._v(" " + _vm._s(item.value) + " ")]) : _vm._e()];
7423
7558
  })] : _vm._e()];
7424
7559
  }), _vm._t("pagination", function() {
7425
7560
  return [_vm.renderPage ? _c("el-pagination", _vm._g(_vm._b({
7426
7561
  ref: "nfTablePaginationRef",
7427
- staticClass: "nf-pagination-box nf-fr"
7562
+ staticClass: "nf-pagination-box nf-fr",
7563
+ attrs: {
7564
+ "current-page": _vm.cPageAttrs["current-page"],
7565
+ "page-size": _vm.cPageAttrs["page-size"]
7566
+ },
7567
+ on: {
7568
+ "size-change": _vm.handleSizeChange,
7569
+ "current-change": _vm.handleCurrentChange
7570
+ }
7428
7571
  }, "el-pagination", _vm.pageAttrer, false), _vm.pageEvents)) : _vm._e()];
7429
7572
  })], 2)], 2), _vm.nfColumCheckDialogVisible && _vm.checkMode === "dialog" ? _c("column-check-dialog", {
7430
7573
  ref: "columnCheckDialog",
@@ -7436,7 +7579,7 @@ var _sfc_render = function render3() {
7436
7579
  "show": _vm.nfColumCheckDialogVisible,
7437
7580
  "table-columns": _vm.columns,
7438
7581
  "column-edit": _vm.columnEdit,
7439
- "storage-key": _vm.storageKey,
7582
+ "storage-key": _vm.cStorageKey,
7440
7583
  "width": _vm.columnCheckWidth,
7441
7584
  "modal-append-to-body": _vm.columnCheckModalAppendToBody,
7442
7585
  "modal": _vm.columnCheckModal,
@@ -7500,7 +7643,7 @@ var _sfc_render = function render3() {
7500
7643
  "get-all-check-desc": _vm.columnCheckGetAllCheckDesc,
7501
7644
  "column-edit": _vm.columnEdit,
7502
7645
  "operation-prop-key": _vm.operationPropKey,
7503
- "storage-key": _vm.storageKey,
7646
+ "storage-key": _vm.cStorageKey,
7504
7647
  "table-columns": _vm.columns
7505
7648
  }
7506
7649
  })], 2) : _vm._e()], 2);