@94ai/nf-table 3.2.52 → 3.2.56

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/lib/index.d.ts CHANGED
@@ -48,6 +48,10 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
48
48
  type: import("vue-demi").PropType<string[]>;
49
49
  default: undefined;
50
50
  };
51
+ emptyImageSize: {
52
+ type: import("vue-demi").PropType<number>;
53
+ default: number;
54
+ };
51
55
  searchFormAttrs: {
52
56
  type: import("vue-demi").PropType<import("./types").NfSearchFormAttributes>;
53
57
  default: () => {};
@@ -228,6 +232,10 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
228
232
  type: import("vue-demi").PropType<string>;
229
233
  default: string;
230
234
  };
235
+ columnCheckBasicFieldDesc: {
236
+ type: import("vue-demi").PropType<string>;
237
+ default: string;
238
+ };
231
239
  columnCheckGetCheckedLengthDesc: {
232
240
  type: import("vue-demi").PropType<Function>;
233
241
  default: (length: any) => string;
@@ -311,6 +319,10 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
311
319
  type: import("vue-demi").PropType<string[]>;
312
320
  default: undefined;
313
321
  };
322
+ emptyImageSize: {
323
+ type: import("vue-demi").PropType<number>;
324
+ default: number;
325
+ };
314
326
  searchFormAttrs: {
315
327
  type: import("vue-demi").PropType<import("./types").NfSearchFormAttributes>;
316
328
  default: () => {};
@@ -491,6 +503,10 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
491
503
  type: import("vue-demi").PropType<string>;
492
504
  default: string;
493
505
  };
506
+ columnCheckBasicFieldDesc: {
507
+ type: import("vue-demi").PropType<string>;
508
+ default: string;
509
+ };
494
510
  columnCheckGetCheckedLengthDesc: {
495
511
  type: import("vue-demi").PropType<Function>;
496
512
  default: (length: any) => string;
@@ -541,6 +557,7 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
541
557
  text: string;
542
558
  selectEmptyWarningTips: string;
543
559
  showColumn: string[];
560
+ emptyImageSize: number;
544
561
  searchFormAttrs: import("./types").NfSearchFormAttributes;
545
562
  searchFormEvents: Partial<Record<import("./types").NfSearchFormEventKey, Function>>;
546
563
  tableAttrs: import("./types").ElTableAttributes;
@@ -586,6 +603,7 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
586
603
  columnCheckFixedLeftDesc: string;
587
604
  columnCheckClearDesc: string;
588
605
  columnCheckNoFixedDesc: string;
606
+ columnCheckBasicFieldDesc: string;
589
607
  columnCheckGetCheckedLengthDesc: Function;
590
608
  columnCheckGetAllCheckDesc: Function;
591
609
  loading: boolean;
@@ -642,6 +660,10 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
642
660
  type: import("vue-demi").PropType<string[]>;
643
661
  default: undefined;
644
662
  };
663
+ emptyImageSize: {
664
+ type: import("vue-demi").PropType<number>;
665
+ default: number;
666
+ };
645
667
  searchFormAttrs: {
646
668
  type: import("vue-demi").PropType<import("./types").NfSearchFormAttributes>;
647
669
  default: () => {};
@@ -822,6 +844,10 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
822
844
  type: import("vue-demi").PropType<string>;
823
845
  default: string;
824
846
  };
847
+ columnCheckBasicFieldDesc: {
848
+ type: import("vue-demi").PropType<string>;
849
+ default: string;
850
+ };
825
851
  columnCheckGetCheckedLengthDesc: {
826
852
  type: import("vue-demi").PropType<Function>;
827
853
  default: (length: any) => string;
@@ -932,6 +958,7 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
932
958
  syncLocalShowColumnToCookies: () => void;
933
959
  syncCookiesToLocalShowColumn: () => Promise<void>;
934
960
  syncCookiesToTableColumn: (readCached?: boolean) => Promise<void>;
961
+ elTableRefKey: import("vue-demi").Ref<number>;
935
962
  }> & import("vue/types/v3-component-options").ExtractComputedReturns<{}> & import("vue-demi").ComponentCustomProperties & Readonly<import("vue-demi").ExtractPropTypes<{
936
963
  background: {
937
964
  type: import("vue-demi").PropType<string>;
@@ -981,6 +1008,10 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
981
1008
  type: import("vue-demi").PropType<string[]>;
982
1009
  default: undefined;
983
1010
  };
1011
+ emptyImageSize: {
1012
+ type: import("vue-demi").PropType<number>;
1013
+ default: number;
1014
+ };
984
1015
  searchFormAttrs: {
985
1016
  type: import("vue-demi").PropType<import("./types").NfSearchFormAttributes>;
986
1017
  default: () => {};
@@ -1161,6 +1192,10 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
1161
1192
  type: import("vue-demi").PropType<string>;
1162
1193
  default: string;
1163
1194
  };
1195
+ columnCheckBasicFieldDesc: {
1196
+ type: import("vue-demi").PropType<string>;
1197
+ default: string;
1198
+ };
1164
1199
  columnCheckGetCheckedLengthDesc: {
1165
1200
  type: import("vue-demi").PropType<Function>;
1166
1201
  default: (length: any) => string;
@@ -1244,6 +1279,10 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
1244
1279
  type: import("vue-demi").PropType<string[]>;
1245
1280
  default: undefined;
1246
1281
  };
1282
+ emptyImageSize: {
1283
+ type: import("vue-demi").PropType<number>;
1284
+ default: number;
1285
+ };
1247
1286
  searchFormAttrs: {
1248
1287
  type: import("vue-demi").PropType<import("./types").NfSearchFormAttributes>;
1249
1288
  default: () => {};
@@ -1424,6 +1463,10 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
1424
1463
  type: import("vue-demi").PropType<string>;
1425
1464
  default: string;
1426
1465
  };
1466
+ columnCheckBasicFieldDesc: {
1467
+ type: import("vue-demi").PropType<string>;
1468
+ default: string;
1469
+ };
1427
1470
  columnCheckGetCheckedLengthDesc: {
1428
1471
  type: import("vue-demi").PropType<Function>;
1429
1472
  default: (length: any) => string;
@@ -1534,6 +1577,7 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
1534
1577
  syncLocalShowColumnToCookies: () => void;
1535
1578
  syncCookiesToLocalShowColumn: () => Promise<void>;
1536
1579
  syncCookiesToTableColumn: (readCached?: boolean) => Promise<void>;
1580
+ elTableRefKey: import("vue-demi").Ref<number>;
1537
1581
  }, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {
1538
1582
  fieldsChange: (event: string[]) => void;
1539
1583
  "update:showColumn": (event: string[] | undefined) => void;
@@ -1550,6 +1594,7 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
1550
1594
  text: string;
1551
1595
  selectEmptyWarningTips: string;
1552
1596
  showColumn: string[];
1597
+ emptyImageSize: number;
1553
1598
  searchFormAttrs: import("./types").NfSearchFormAttributes;
1554
1599
  searchFormEvents: Partial<Record<import("./types").NfSearchFormEventKey, Function>>;
1555
1600
  tableAttrs: import("./types").ElTableAttributes;
@@ -1595,6 +1640,7 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
1595
1640
  columnCheckFixedLeftDesc: string;
1596
1641
  columnCheckClearDesc: string;
1597
1642
  columnCheckNoFixedDesc: string;
1643
+ columnCheckBasicFieldDesc: string;
1598
1644
  columnCheckGetCheckedLengthDesc: Function;
1599
1645
  columnCheckGetAllCheckDesc: Function;
1600
1646
  loading: boolean;
@@ -1652,6 +1698,10 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
1652
1698
  type: import("vue-demi").PropType<string[]>;
1653
1699
  default: undefined;
1654
1700
  };
1701
+ emptyImageSize: {
1702
+ type: import("vue-demi").PropType<number>;
1703
+ default: number;
1704
+ };
1655
1705
  searchFormAttrs: {
1656
1706
  type: import("vue-demi").PropType<import("./types").NfSearchFormAttributes>;
1657
1707
  default: () => {};
@@ -1832,6 +1882,10 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
1832
1882
  type: import("vue-demi").PropType<string>;
1833
1883
  default: string;
1834
1884
  };
1885
+ columnCheckBasicFieldDesc: {
1886
+ type: import("vue-demi").PropType<string>;
1887
+ default: string;
1888
+ };
1835
1889
  columnCheckGetCheckedLengthDesc: {
1836
1890
  type: import("vue-demi").PropType<Function>;
1837
1891
  default: (length: any) => string;
@@ -35,6 +35,10 @@ declare const _default: import("vue-demi").DefineComponent<{
35
35
  type: import("vue-demi").PropType<string>;
36
36
  default: string;
37
37
  };
38
+ basicFieldDesc: {
39
+ type: import("vue-demi").PropType<string>;
40
+ default: string;
41
+ };
38
42
  getCheckedLengthDesc: {
39
43
  type: import("vue-demi").PropType<Function>;
40
44
  default: (length: any) => string;
@@ -106,6 +110,10 @@ declare const _default: import("vue-demi").DefineComponent<{
106
110
  type: import("vue-demi").PropType<string>;
107
111
  default: string;
108
112
  };
113
+ basicFieldDesc: {
114
+ type: import("vue-demi").PropType<string>;
115
+ default: string;
116
+ };
109
117
  getCheckedLengthDesc: {
110
118
  type: import("vue-demi").PropType<Function>;
111
119
  default: (length: any) => string;
@@ -124,6 +132,7 @@ declare const _default: import("vue-demi").DefineComponent<{
124
132
  fixedLeftDesc: string;
125
133
  clearDesc: string;
126
134
  noFixedDesc: string;
135
+ basicFieldDesc: string;
127
136
  getCheckedLengthDesc: Function;
128
137
  getAllCheckDesc: Function;
129
138
  }>;
@@ -290,7 +290,7 @@ var _sfc_render$3 = function render() {
290
290
  }), 0), _vm._t("footer", function() {
291
291
  return [_c("div", {
292
292
  staticClass: "nf-table-nf-column-check-dialog-button-container"
293
- }, [_c("el-button", {
293
+ }, [_c("nf-button", {
294
294
  staticClass: "nf-table-nf-column-check-dialog-button-cancel",
295
295
  attrs: {
296
296
  "size": "mini"
@@ -300,7 +300,7 @@ var _sfc_render$3 = function render() {
300
300
  _vm.visible = false;
301
301
  }
302
302
  }
303
- }, [_vm._v(_vm._s(_vm.cancelText))]), _c("el-button", {
303
+ }, [_vm._v(_vm._s(_vm.cancelText))]), _c("nf-button", {
304
304
  staticClass: "nf-table-nf-column-check-dialog-button-confirm",
305
305
  attrs: {
306
306
  "type": "primary",
@@ -5304,6 +5304,12 @@ __sfc_main$1.props = {
5304
5304
  type: String,
5305
5305
  default: "不固定"
5306
5306
  },
5307
+ basicFieldDesc: {
5308
+ key: "basicFieldDesc",
5309
+ required: false,
5310
+ type: String,
5311
+ default: "基础字段"
5312
+ },
5307
5313
  getCheckedLengthDesc: {
5308
5314
  key: "getCheckedLengthDesc",
5309
5315
  required: false,
@@ -5356,7 +5362,7 @@ __sfc_main$1.setup = (__props, __ctx) => {
5356
5362
  const setFields = (tableColumns) => {
5357
5363
  const obj = {};
5358
5364
  tableColumns.map((item) => {
5359
- const key = item.category || "基础字段";
5365
+ const key = item.category || props.basicFieldDesc;
5360
5366
  if (!obj[key]) {
5361
5367
  obj[key] = [];
5362
5368
  }
@@ -5765,6 +5771,12 @@ const __sfc_main = vueDemi.defineComponent({
5765
5771
  name: "nf-table"
5766
5772
  });
5767
5773
  __sfc_main.props = {
5774
+ emptyImageSize: {
5775
+ key: "emptyImageSize",
5776
+ required: false,
5777
+ type: Number,
5778
+ default: 145
5779
+ },
5768
5780
  data: {
5769
5781
  key: "data",
5770
5782
  required: false,
@@ -5931,7 +5943,7 @@ __sfc_main.props = {
5931
5943
  key: "columnDisplayBtnText",
5932
5944
  required: false,
5933
5945
  type: String,
5934
- default: "定制表格列目显示隐藏"
5946
+ default: "设置列表字段"
5935
5947
  },
5936
5948
  columnCheckTitle: {
5937
5949
  key: "columnCheckTitle",
@@ -6071,6 +6083,12 @@ __sfc_main.props = {
6071
6083
  type: String,
6072
6084
  default: "不固定"
6073
6085
  },
6086
+ columnCheckBasicFieldDesc: {
6087
+ key: "columnCheckBasicFieldDesc",
6088
+ required: false,
6089
+ type: String,
6090
+ default: "基础字段"
6091
+ },
6074
6092
  columnCheckGetCheckedLengthDesc: {
6075
6093
  key: "columnCheckGetCheckedLengthDesc",
6076
6094
  required: false,
@@ -6276,7 +6294,7 @@ __sfc_main.setup = (__props, __ctx) => {
6276
6294
  index: index2
6277
6295
  };
6278
6296
  });
6279
- commonUtils.CachedManager.syncCachedSet(props.storageKey, columnState);
6297
+ return commonUtils.CachedManager.syncCachedSet(props.storageKey, columnState);
6280
6298
  }
6281
6299
  };
6282
6300
  const syncShowItemToInitHidden = () => {
@@ -6329,16 +6347,15 @@ __sfc_main.setup = (__props, __ctx) => {
6329
6347
  }
6330
6348
  const cachedPriority = props.priority === "cached";
6331
6349
  if (cachedPriority ? cached : (_a2 = localShowColumn.value) == null ? void 0 : _a2.length) {
6332
- cachedPriority ? await syncCookiesToLocalShowColumn() : syncLocalShowColumnToCookies();
6350
+ cachedPriority ? await syncCookiesToLocalShowColumn() : await syncLocalShowColumnToCookies();
6333
6351
  } else if (cachedPriority ? (_b = localShowColumn.value) == null ? void 0 : _b.length : cached) {
6334
- cachedPriority ? syncLocalShowColumnToCookies() : await syncCookiesToLocalShowColumn();
6352
+ cachedPriority ? await syncLocalShowColumnToCookies() : await syncCookiesToLocalShowColumn();
6335
6353
  }
6336
6354
  } catch (e) {
6337
6355
  console.log(e);
6338
6356
  }
6339
6357
  }
6340
6358
  };
6341
- initCachedData();
6342
6359
  const tableColumns = vueDemi.ref([]);
6343
6360
  const elTableRefKey = vueDemi.ref(Date.now());
6344
6361
  const syncCookiesToTableColumn = async (readCached = true) => {
@@ -6405,7 +6422,11 @@ __sfc_main.setup = (__props, __ctx) => {
6405
6422
  });
6406
6423
  elTableRefKey.value = Date.now();
6407
6424
  };
6408
- syncCookiesToTableColumn();
6425
+ const initColumn = async () => {
6426
+ await initCachedData();
6427
+ syncCookiesToTableColumn();
6428
+ };
6429
+ initColumn();
6409
6430
  vueDemi.onBeforeMount(() => {
6410
6431
  vueDemi.watch(() => {
6411
6432
  return props.columns;
@@ -6740,7 +6761,8 @@ __sfc_main.setup = (__props, __ctx) => {
6740
6761
  /**
6741
6762
  * 列编辑同步cookies到组件渲染数据
6742
6763
  */
6743
- syncCookiesToTableColumn
6764
+ syncCookiesToTableColumn,
6765
+ elTableRefKey
6744
6766
  });
6745
6767
  };
6746
6768
  __sfc_main.components = Object.assign({
@@ -6783,7 +6805,7 @@ var _sfc_render = function render3() {
6783
6805
  ref: "nfTableContent",
6784
6806
  staticClass: "nf-table-content"
6785
6807
  }, [_vm.columnEdit && _vm.columnPosition === "free" ? _vm._t("columnEdit", function() {
6786
- return [_c("el-button", {
6808
+ return [_c("nf-button", {
6787
6809
  class: (_vm.columnDisplayBtnClass || "") + " nf-column-display",
6788
6810
  attrs: {
6789
6811
  "type": _vm.columnDisplayBtnType,
@@ -6899,7 +6921,7 @@ var _sfc_render = function render3() {
6899
6921
  "row": scope.row,
6900
6922
  "index": scope.$index
6901
6923
  }) : [column.prop === _vm.operationPropKey && !_vm.hasOperationSlot ? _vm._l(column.operationList, function(item, index2) {
6902
- return _c("el-button", _vm._g({
6924
+ return _c("nf-button", _vm._g({
6903
6925
  key: item.key || index2,
6904
6926
  class: item.class,
6905
6927
  style: item.style,
@@ -6922,12 +6944,9 @@ var _sfc_render = function render3() {
6922
6944
  "slot": "append"
6923
6945
  }), _vm._t("empty", function() {
6924
6946
  return [_c("nf-empty", {
6925
- staticStyle: {
6926
- "margin-top": "20px"
6927
- },
6928
6947
  attrs: {
6929
6948
  "slot": "empty",
6930
- "image-size": 145
6949
+ "image-size": _vm.emptyImageSize
6931
6950
  },
6932
6951
  slot: "empty"
6933
6952
  })];
@@ -6940,7 +6959,7 @@ var _sfc_render = function render3() {
6940
6959
  var _a2;
6941
6960
  return [((_a2 = _vm.actionBarOptList) == null ? void 0 : _a2.length) && !_vm.hasActionBarSlot ? [_vm._l(_vm.actionBarOptList, function(item, index2) {
6942
6961
  var _a3, _b2, _c2, _d, _e, _f, _g, _h, _i, _j;
6943
- return [item.element === "el-button" ? _c("el-button", _vm._g({
6962
+ return [item.element === "el-button" ? _c("nf-button", _vm._g({
6944
6963
  key: item.key || index2,
6945
6964
  class: item.class,
6946
6965
  style: {
@@ -7416,6 +7435,7 @@ var _sfc_render = function render3() {
7416
7435
  "fixed-left-desc": _vm.columnCheckFixedLeftDesc,
7417
7436
  "clear-desc": _vm.columnCheckClearDesc,
7418
7437
  "no-fixed-desc": _vm.columnCheckNoFixedDesc,
7438
+ "basic-field-desc": _vm.columnCheckBasicFieldDesc,
7419
7439
  "column-edit": _vm.columnEdit,
7420
7440
  "get-checked-length-desc": _vm.columnCheckGetCheckedLengthDesc,
7421
7441
  "get-all-check-desc": _vm.columnCheckGetAllCheckDesc,
@@ -288,7 +288,7 @@ var _sfc_render$3 = function render() {
288
288
  }), 0), _vm._t("footer", function() {
289
289
  return [_c("div", {
290
290
  staticClass: "nf-table-nf-column-check-dialog-button-container"
291
- }, [_c("el-button", {
291
+ }, [_c("nf-button", {
292
292
  staticClass: "nf-table-nf-column-check-dialog-button-cancel",
293
293
  attrs: {
294
294
  "size": "mini"
@@ -298,7 +298,7 @@ var _sfc_render$3 = function render() {
298
298
  _vm.visible = false;
299
299
  }
300
300
  }
301
- }, [_vm._v(_vm._s(_vm.cancelText))]), _c("el-button", {
301
+ }, [_vm._v(_vm._s(_vm.cancelText))]), _c("nf-button", {
302
302
  staticClass: "nf-table-nf-column-check-dialog-button-confirm",
303
303
  attrs: {
304
304
  "type": "primary",
@@ -5302,6 +5302,12 @@ __sfc_main$1.props = {
5302
5302
  type: String,
5303
5303
  default: "不固定"
5304
5304
  },
5305
+ basicFieldDesc: {
5306
+ key: "basicFieldDesc",
5307
+ required: false,
5308
+ type: String,
5309
+ default: "基础字段"
5310
+ },
5305
5311
  getCheckedLengthDesc: {
5306
5312
  key: "getCheckedLengthDesc",
5307
5313
  required: false,
@@ -5354,7 +5360,7 @@ __sfc_main$1.setup = (__props, __ctx) => {
5354
5360
  const setFields = (tableColumns) => {
5355
5361
  const obj = {};
5356
5362
  tableColumns.map((item) => {
5357
- const key = item.category || "基础字段";
5363
+ const key = item.category || props.basicFieldDesc;
5358
5364
  if (!obj[key]) {
5359
5365
  obj[key] = [];
5360
5366
  }
@@ -5763,6 +5769,12 @@ const __sfc_main = defineComponent({
5763
5769
  name: "nf-table"
5764
5770
  });
5765
5771
  __sfc_main.props = {
5772
+ emptyImageSize: {
5773
+ key: "emptyImageSize",
5774
+ required: false,
5775
+ type: Number,
5776
+ default: 145
5777
+ },
5766
5778
  data: {
5767
5779
  key: "data",
5768
5780
  required: false,
@@ -5929,7 +5941,7 @@ __sfc_main.props = {
5929
5941
  key: "columnDisplayBtnText",
5930
5942
  required: false,
5931
5943
  type: String,
5932
- default: "定制表格列目显示隐藏"
5944
+ default: "设置列表字段"
5933
5945
  },
5934
5946
  columnCheckTitle: {
5935
5947
  key: "columnCheckTitle",
@@ -6069,6 +6081,12 @@ __sfc_main.props = {
6069
6081
  type: String,
6070
6082
  default: "不固定"
6071
6083
  },
6084
+ columnCheckBasicFieldDesc: {
6085
+ key: "columnCheckBasicFieldDesc",
6086
+ required: false,
6087
+ type: String,
6088
+ default: "基础字段"
6089
+ },
6072
6090
  columnCheckGetCheckedLengthDesc: {
6073
6091
  key: "columnCheckGetCheckedLengthDesc",
6074
6092
  required: false,
@@ -6274,7 +6292,7 @@ __sfc_main.setup = (__props, __ctx) => {
6274
6292
  index: index2
6275
6293
  };
6276
6294
  });
6277
- CachedManager.syncCachedSet(props.storageKey, columnState);
6295
+ return CachedManager.syncCachedSet(props.storageKey, columnState);
6278
6296
  }
6279
6297
  };
6280
6298
  const syncShowItemToInitHidden = () => {
@@ -6327,16 +6345,15 @@ __sfc_main.setup = (__props, __ctx) => {
6327
6345
  }
6328
6346
  const cachedPriority = props.priority === "cached";
6329
6347
  if (cachedPriority ? cached : (_a2 = localShowColumn.value) == null ? void 0 : _a2.length) {
6330
- cachedPriority ? await syncCookiesToLocalShowColumn() : syncLocalShowColumnToCookies();
6348
+ cachedPriority ? await syncCookiesToLocalShowColumn() : await syncLocalShowColumnToCookies();
6331
6349
  } else if (cachedPriority ? (_b = localShowColumn.value) == null ? void 0 : _b.length : cached) {
6332
- cachedPriority ? syncLocalShowColumnToCookies() : await syncCookiesToLocalShowColumn();
6350
+ cachedPriority ? await syncLocalShowColumnToCookies() : await syncCookiesToLocalShowColumn();
6333
6351
  }
6334
6352
  } catch (e) {
6335
6353
  console.log(e);
6336
6354
  }
6337
6355
  }
6338
6356
  };
6339
- initCachedData();
6340
6357
  const tableColumns = ref([]);
6341
6358
  const elTableRefKey = ref(Date.now());
6342
6359
  const syncCookiesToTableColumn = async (readCached = true) => {
@@ -6403,7 +6420,11 @@ __sfc_main.setup = (__props, __ctx) => {
6403
6420
  });
6404
6421
  elTableRefKey.value = Date.now();
6405
6422
  };
6406
- syncCookiesToTableColumn();
6423
+ const initColumn = async () => {
6424
+ await initCachedData();
6425
+ syncCookiesToTableColumn();
6426
+ };
6427
+ initColumn();
6407
6428
  onBeforeMount(() => {
6408
6429
  watch(() => {
6409
6430
  return props.columns;
@@ -6738,7 +6759,8 @@ __sfc_main.setup = (__props, __ctx) => {
6738
6759
  /**
6739
6760
  * 列编辑同步cookies到组件渲染数据
6740
6761
  */
6741
- syncCookiesToTableColumn
6762
+ syncCookiesToTableColumn,
6763
+ elTableRefKey
6742
6764
  });
6743
6765
  };
6744
6766
  __sfc_main.components = Object.assign({
@@ -6781,7 +6803,7 @@ var _sfc_render = function render3() {
6781
6803
  ref: "nfTableContent",
6782
6804
  staticClass: "nf-table-content"
6783
6805
  }, [_vm.columnEdit && _vm.columnPosition === "free" ? _vm._t("columnEdit", function() {
6784
- return [_c("el-button", {
6806
+ return [_c("nf-button", {
6785
6807
  class: (_vm.columnDisplayBtnClass || "") + " nf-column-display",
6786
6808
  attrs: {
6787
6809
  "type": _vm.columnDisplayBtnType,
@@ -6897,7 +6919,7 @@ var _sfc_render = function render3() {
6897
6919
  "row": scope.row,
6898
6920
  "index": scope.$index
6899
6921
  }) : [column.prop === _vm.operationPropKey && !_vm.hasOperationSlot ? _vm._l(column.operationList, function(item, index2) {
6900
- return _c("el-button", _vm._g({
6922
+ return _c("nf-button", _vm._g({
6901
6923
  key: item.key || index2,
6902
6924
  class: item.class,
6903
6925
  style: item.style,
@@ -6920,12 +6942,9 @@ var _sfc_render = function render3() {
6920
6942
  "slot": "append"
6921
6943
  }), _vm._t("empty", function() {
6922
6944
  return [_c("nf-empty", {
6923
- staticStyle: {
6924
- "margin-top": "20px"
6925
- },
6926
6945
  attrs: {
6927
6946
  "slot": "empty",
6928
- "image-size": 145
6947
+ "image-size": _vm.emptyImageSize
6929
6948
  },
6930
6949
  slot: "empty"
6931
6950
  })];
@@ -6938,7 +6957,7 @@ var _sfc_render = function render3() {
6938
6957
  var _a2;
6939
6958
  return [((_a2 = _vm.actionBarOptList) == null ? void 0 : _a2.length) && !_vm.hasActionBarSlot ? [_vm._l(_vm.actionBarOptList, function(item, index2) {
6940
6959
  var _a3, _b2, _c2, _d, _e, _f, _g, _h, _i, _j;
6941
- return [item.element === "el-button" ? _c("el-button", _vm._g({
6960
+ return [item.element === "el-button" ? _c("nf-button", _vm._g({
6942
6961
  key: item.key || index2,
6943
6962
  class: item.class,
6944
6963
  style: {
@@ -7414,6 +7433,7 @@ var _sfc_render = function render3() {
7414
7433
  "fixed-left-desc": _vm.columnCheckFixedLeftDesc,
7415
7434
  "clear-desc": _vm.columnCheckClearDesc,
7416
7435
  "no-fixed-desc": _vm.columnCheckNoFixedDesc,
7436
+ "basic-field-desc": _vm.columnCheckBasicFieldDesc,
7417
7437
  "column-edit": _vm.columnEdit,
7418
7438
  "get-checked-length-desc": _vm.columnCheckGetCheckedLengthDesc,
7419
7439
  "get-all-check-desc": _vm.columnCheckGetAllCheckDesc,
@@ -49,6 +49,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
49
49
  type: import("vue-demi").PropType<string[]>;
50
50
  default: undefined;
51
51
  };
52
+ emptyImageSize: {
53
+ type: import("vue-demi").PropType<number>;
54
+ default: number;
55
+ };
52
56
  searchFormAttrs: {
53
57
  type: import("vue-demi").PropType<NfSearchFormAttributes>;
54
58
  default: () => {};
@@ -229,6 +233,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
229
233
  type: import("vue-demi").PropType<string>;
230
234
  default: string;
231
235
  };
236
+ columnCheckBasicFieldDesc: {
237
+ type: import("vue-demi").PropType<string>;
238
+ default: string;
239
+ };
232
240
  columnCheckGetCheckedLengthDesc: {
233
241
  type: import("vue-demi").PropType<Function>;
234
242
  default: (length: any) => string;
@@ -339,6 +347,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
339
347
  syncLocalShowColumnToCookies: () => void;
340
348
  syncCookiesToLocalShowColumn: () => Promise<void>;
341
349
  syncCookiesToTableColumn: (readCached?: boolean) => Promise<void>;
350
+ elTableRefKey: import("vue-demi").Ref<number>;
342
351
  }, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {
343
352
  fieldsChange: (event: string[]) => void;
344
353
  "update:showColumn": (event: string[] | undefined) => void;
@@ -391,6 +400,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
391
400
  type: import("vue-demi").PropType<string[]>;
392
401
  default: undefined;
393
402
  };
403
+ emptyImageSize: {
404
+ type: import("vue-demi").PropType<number>;
405
+ default: number;
406
+ };
394
407
  searchFormAttrs: {
395
408
  type: import("vue-demi").PropType<NfSearchFormAttributes>;
396
409
  default: () => {};
@@ -571,6 +584,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
571
584
  type: import("vue-demi").PropType<string>;
572
585
  default: string;
573
586
  };
587
+ columnCheckBasicFieldDesc: {
588
+ type: import("vue-demi").PropType<string>;
589
+ default: string;
590
+ };
574
591
  columnCheckGetCheckedLengthDesc: {
575
592
  type: import("vue-demi").PropType<Function>;
576
593
  default: (length: any) => string;
@@ -618,6 +635,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
618
635
  text: string;
619
636
  selectEmptyWarningTips: string;
620
637
  showColumn: string[];
638
+ emptyImageSize: number;
621
639
  searchFormAttrs: NfSearchFormAttributes;
622
640
  searchFormEvents: Partial<Record<NfSearchFormEventKey, Function>>;
623
641
  tableAttrs: ElTableAttributes;
@@ -663,6 +681,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
663
681
  columnCheckFixedLeftDesc: string;
664
682
  columnCheckClearDesc: string;
665
683
  columnCheckNoFixedDesc: string;
684
+ columnCheckBasicFieldDesc: string;
666
685
  columnCheckGetCheckedLengthDesc: Function;
667
686
  columnCheckGetAllCheckDesc: Function;
668
687
  loading: boolean;
@@ -37,8 +37,8 @@
37
37
  </div>
38
38
  <slot slot="footer" name="footer">
39
39
  <div class="nf-table-nf-column-check-dialog-button-container">
40
- <el-button size="mini" @click="visible=false" class="nf-table-nf-column-check-dialog-button-cancel">{{ cancelText }}</el-button>
41
- <el-button type="primary" size="mini" @click="submit" class="nf-table-nf-column-check-dialog-button-confirm">{{ confirmText }}</el-button>
40
+ <nf-button size="mini" @click="visible=false" class="nf-table-nf-column-check-dialog-button-cancel">{{ cancelText }}</nf-button>
41
+ <nf-button type="primary" size="mini" @click="submit" class="nf-table-nf-column-check-dialog-button-confirm">{{ confirmText }}</nf-button>
42
42
  </div>
43
43
  </slot>
44
44
  </el-dialog>
@@ -158,6 +158,7 @@ const props = withDefaults(defineProps<{
158
158
  fixedLeftDesc?: string
159
159
  clearDesc?: string
160
160
  noFixedDesc?: string
161
+ basicFieldDesc?: string
161
162
  getCheckedLengthDesc?: Function
162
163
  getAllCheckDesc?: Function
163
164
  }>(), {
@@ -170,6 +171,7 @@ const props = withDefaults(defineProps<{
170
171
  fixedLeftDesc: '固定在左侧',
171
172
  clearDesc: '清除',
172
173
  noFixedDesc: '不固定',
174
+ basicFieldDesc: '基础字段',
173
175
  getCheckedLengthDesc: (length) => '已选(' + length + ')',
174
176
  getAllCheckDesc: (length) => '全选(' + length + ')'
175
177
  })
@@ -228,7 +230,7 @@ const fields = ref<{
228
230
  const setFields = (tableColumns) => {
229
231
  const obj: Record<string, any> = {}
230
232
  tableColumns.map(item => {
231
- const key = item.category || '基础字段'
233
+ const key = item.category || props.basicFieldDesc
232
234
  if (!obj[key]) {
233
235
  obj[key] = []
234
236
  }
@@ -27,7 +27,7 @@
27
27
  </slot>
28
28
  <div class="nf-table-content" ref="nfTableContent">
29
29
  <slot name="columnEdit" v-if="columnEdit && columnPosition === 'free'">
30
- <el-button @click="nfColumCheckDialogVisible = true"
30
+ <nf-button @click="nfColumCheckDialogVisible = true"
31
31
  :class="(columnDisplayBtnClass || '') + ' nf-column-display'"
32
32
  :type="columnDisplayBtnType"
33
33
  :plain="columnDisplayBtnPlain"
@@ -39,7 +39,7 @@
39
39
  :disabled="columnDisplayBtnDisabled"
40
40
  >
41
41
  {{ columnDisplayBtnText }}
42
- </el-button>
42
+ </nf-button>
43
43
  </slot>
44
44
  <el-table
45
45
  ref="elTableRef"
@@ -116,7 +116,7 @@
116
116
  <slot v-if="column.slot" :name="column.slot" :row="scope.row" :index="scope.$index" />
117
117
  <template v-else>
118
118
  <template v-if="column.prop === operationPropKey && !hasOperationSlot">
119
- <el-button
119
+ <nf-button
120
120
  :size="item.size || 'mini'"
121
121
  :type="item.type || 'text'"
122
122
  :disabled="item.disabled"
@@ -131,7 +131,7 @@
131
131
  v-on="item.events"
132
132
  :key="item.key || index"
133
133
  >{{ item.text }}
134
- </el-button>
134
+ </nf-button>
135
135
  </template>
136
136
  <span v-else>{{ scope.row[column.prop] }}</span>
137
137
  </template>
@@ -143,14 +143,14 @@
143
143
  </template>
144
144
  <slot name="append" slot="append"></slot>
145
145
  <slot name="empty" slot="empty">
146
- <nf-empty style="margin-top: 20px;" slot="empty" :image-size="145"></nf-empty>
146
+ <nf-empty slot="empty" :image-size="emptyImageSize"></nf-empty>
147
147
  </slot>
148
148
  </el-table>
149
149
  <div ref="nfTableActionContainerRef" class="nf-action-box nf-clearfix">
150
150
  <slot name="actionBar" ref="nfTableActionBarRef">
151
151
  <template v-if="actionBarOptList?.length && !hasActionBarSlot">
152
152
  <template v-for="(item, index) in actionBarOptList">
153
- <el-button
153
+ <nf-button
154
154
  :key="item.key || index"
155
155
  v-if="item.element === 'el-button'"
156
156
  :size="item.size || 'mini'"
@@ -165,7 +165,7 @@
165
165
  :style="{...(item.style || {}), marginRight: '10px'}"
166
166
  v-on="item.events"
167
167
  >{{ item.value }}
168
- </el-button>
168
+ </nf-button>
169
169
  <el-checkbox
170
170
  :key="item.key || index"
171
171
  v-model="item.value"
@@ -516,6 +516,7 @@
516
516
  :fixed-left-desc="columnCheckFixedLeftDesc"
517
517
  :clear-desc="columnCheckClearDesc"
518
518
  :no-fixed-desc="columnCheckNoFixedDesc"
519
+ :basic-field-desc="columnCheckBasicFieldDesc"
519
520
  :column-edit="columnEdit"
520
521
  :get-checked-length-desc="columnCheckGetCheckedLengthDesc"
521
522
  :get-all-check-desc="columnCheckGetAllCheckDesc"
@@ -567,6 +568,7 @@ import { ITabItem } from '@94ai/nf-drawer/lib/types'
567
568
  import { CachedManager } from '@94ai/common-utils'
568
569
 
569
570
  const props = withDefaults(defineProps<{
571
+ emptyImageSize?: number,
570
572
  data?: Record<string, any>[],
571
573
  columns?: NfTableColumnAttributes[] | any,
572
574
  searchFormAttrs?: NfSearchFormAttributes,
@@ -639,6 +641,7 @@ const props = withDefaults(defineProps<{
639
641
  columnCheckFixedLeftDesc?: string
640
642
  columnCheckClearDesc?: string
641
643
  columnCheckNoFixedDesc?: string
644
+ columnCheckBasicFieldDesc?: string
642
645
  columnCheckGetCheckedLengthDesc?: Function
643
646
  columnCheckGetAllCheckDesc?: Function
644
647
  columnCheckTabs?: ITabItem[],
@@ -666,6 +669,7 @@ const props = withDefaults(defineProps<{
666
669
  */
667
670
  operationPropKey?: string
668
671
  }>(), {
672
+ emptyImageSize: 145,
669
673
  selectEmptyWarningTips: '请选择至少一个选项',
670
674
  priority: 'cached',
671
675
  storageKey: 'nf-table-columns-cached-key',
@@ -701,7 +705,7 @@ const props = withDefaults(defineProps<{
701
705
  columnDisplayBtnCircle: false,
702
706
  columnDisplayBtnLoading: false,
703
707
  columnDisplayBtnDisabled: false,
704
- columnDisplayBtnText: '定制表格列目显示隐藏',
708
+ columnDisplayBtnText: '设置列表字段',
705
709
  columnDisplayBtnClass: '',
706
710
  alwaysShowPage: true,
707
711
  operationPropKey: 'operation',
@@ -728,6 +732,7 @@ const props = withDefaults(defineProps<{
728
732
  columnCheckFixedLeftDesc: '固定在左侧',
729
733
  columnCheckClearDesc: '清除',
730
734
  columnCheckNoFixedDesc: '不固定',
735
+ columnCheckBasicFieldDesc: '基础字段',
731
736
  columnCheckGetCheckedLengthDesc: (length) => '已选(' + length + ')',
732
737
  columnCheckGetAllCheckDesc: (length) => '全选(' + length + ')'
733
738
  })
@@ -847,7 +852,7 @@ const syncLocalShowColumnToCookies = () => {
847
852
  index
848
853
  }
849
854
  })
850
- CachedManager.syncCachedSet(props.storageKey, columnState)
855
+ return CachedManager.syncCachedSet(props.storageKey, columnState)
851
856
  }
852
857
  }
853
858
 
@@ -901,9 +906,9 @@ const initCachedData = async () => {
901
906
  }
902
907
  const cachedPriority = props.priority === 'cached'
903
908
  if (cachedPriority ? cached : localShowColumn.value?.length) {
904
- cachedPriority ? await syncCookiesToLocalShowColumn() : syncLocalShowColumnToCookies()
909
+ cachedPriority ? await syncCookiesToLocalShowColumn() : await syncLocalShowColumnToCookies()
905
910
  } else if (cachedPriority ? localShowColumn.value?.length : cached) {
906
- cachedPriority ? syncLocalShowColumnToCookies() : await syncCookiesToLocalShowColumn()
911
+ cachedPriority ? await syncLocalShowColumnToCookies() : await syncCookiesToLocalShowColumn()
907
912
  }
908
913
  } catch (e) {
909
914
  console.log(e)
@@ -911,7 +916,6 @@ const initCachedData = async () => {
911
916
  }
912
917
  }
913
918
 
914
- initCachedData()
915
919
 
916
920
  const tableColumns = ref<NfTableColumnAttributes[]>([])
917
921
  const elTableRefKey = ref(Date.now())
@@ -983,8 +987,12 @@ const syncCookiesToTableColumn = async (readCached = true) => {
983
987
  })
984
988
  elTableRefKey.value = Date.now()
985
989
  }
990
+ const initColumn = async () => {
991
+ await initCachedData()
992
+ syncCookiesToTableColumn()
993
+ }
986
994
 
987
- syncCookiesToTableColumn()
995
+ initColumn()
988
996
 
989
997
  onBeforeMount(() => {
990
998
  watch(() => {
@@ -1310,7 +1318,8 @@ defineExpose({
1310
1318
  /**
1311
1319
  * 列编辑同步cookies到组件渲染数据
1312
1320
  */
1313
- syncCookiesToTableColumn
1321
+ syncCookiesToTableColumn,
1322
+ elTableRefKey
1314
1323
  })
1315
1324
 
1316
1325
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@94ai/nf-table",
3
- "version": "3.2.52",
3
+ "version": "3.2.56",
4
4
  "description": "> TODO: description",
5
5
  "keywords": [],
6
6
  "author": "zoujiahe <zoujiahe@94ai.com>",
@@ -14,11 +14,12 @@
14
14
  "url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
15
15
  },
16
16
  "dependencies": {
17
- "@94ai/common-utils": "^3.2.52",
18
- "@94ai/nf-drawer": "^3.2.52",
19
- "@94ai/nf-message": "^3.2.52",
20
- "@94ai/nf-search-form": "^3.2.52",
21
- "@94ai/nf-theme-chalk": "^3.2.52",
17
+ "@94ai/common-utils": "^3.2.56",
18
+ "@94ai/nf-button": "^3.2.56",
19
+ "@94ai/nf-drawer": "^3.2.56",
20
+ "@94ai/nf-message": "^3.2.56",
21
+ "@94ai/nf-search-form": "^3.2.56",
22
+ "@94ai/nf-theme-chalk": "^3.2.56",
22
23
  "idb-keyval": "^6.2.1",
23
24
  "vue-demi": "^0.14.5",
24
25
  "vuedraggable": "^2.24.3"
@@ -36,5 +37,5 @@
36
37
  "types": "lib/index.d.ts",
37
38
  "main": "lib/nf-table.cjs.js",
38
39
  "module": "lib/nf-table.esm-bundler.js",
39
- "gitHead": "1c4b9d8c3b8c416274a210124bf9f5f75ce01c73"
40
+ "gitHead": "a475b43138116c9b5cf8d660e000903f24dc5ba9"
40
41
  }
@@ -1,40 +0,0 @@
1
- {
2
- "name": "@94ai/nf-table",
3
- "version": "3.2.52",
4
- "description": "> TODO: description",
5
- "keywords": [],
6
- "author": "zoujiahe <zoujiahe@94ai.com>",
7
- "homepage": "https://oss.xccjh.top/common-ui/#/ai-index",
8
- "license": "ISC",
9
- "publishConfig": {
10
- "access": "public"
11
- },
12
- "repository": {
13
- "type": "git",
14
- "url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
15
- },
16
- "dependencies": {
17
- "@94ai/common-utils": "^3.2.52",
18
- "@94ai/nf-drawer": "^3.2.52",
19
- "@94ai/nf-message": "^3.2.52",
20
- "@94ai/nf-search-form": "^3.2.52",
21
- "@94ai/nf-theme-chalk": "^3.2.52",
22
- "idb-keyval": "^6.2.1",
23
- "vue-demi": "^0.14.5",
24
- "vuedraggable": "^2.24.3"
25
- },
26
- "peerDependenciesMeta": {
27
- "@vue/composition-api": {
28
- "optional": true
29
- }
30
- },
31
- "peerDependencies": {
32
- "@vue/composition-api": "^1.0.0-rc.1",
33
- "element-ui": ">=2.13.2",
34
- "vue": "^2.0.0 || >=3.0.0"
35
- },
36
- "types": "lib/index.d.ts",
37
- "main": "lib/nf-table.cjs.js",
38
- "module": "lib/nf-table.esm-bundler.js",
39
- "gitHead": "1c4b9d8c3b8c416274a210124bf9f5f75ce01c73"
40
- }