@94ai/nf-table 3.2.54 → 3.2.57

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.
@@ -55,6 +55,12 @@ __sfc_main$2.props = {
55
55
  type: String,
56
56
  default: "取 消"
57
57
  },
58
+ basicFieldDesc: {
59
+ key: "basicFieldDesc",
60
+ required: false,
61
+ type: String,
62
+ default: "基础字段"
63
+ },
58
64
  tableColumns: {
59
65
  key: "tableColumns",
60
66
  required: false,
@@ -159,7 +165,7 @@ __sfc_main$2.setup = (__props, __ctx) => {
159
165
  const obj = {};
160
166
  props.tableColumns.filter((item) => !item.destory).map((item) => {
161
167
  if (!item.type) {
162
- const key = item.category || "基础字段";
168
+ const key = item.category || props.basicFieldDesc;
163
169
  if (!obj[key]) {
164
170
  obj[key] = [];
165
171
  }
@@ -5248,36 +5254,6 @@ const __sfc_main$1 = defineComponent({
5248
5254
  name: "NfColumnCheckDrawer"
5249
5255
  });
5250
5256
  __sfc_main$1.props = {
5251
- selectEmptyWarningTips: {
5252
- key: "selectEmptyWarningTips",
5253
- required: false,
5254
- type: String,
5255
- default: "请选择至少一个选项"
5256
- },
5257
- tableColumns: {
5258
- key: "tableColumns",
5259
- required: false,
5260
- type: Array,
5261
- default: () => []
5262
- },
5263
- storageKey: {
5264
- key: "storageKey",
5265
- required: false,
5266
- type: String,
5267
- default: "nf-table-columns-cached-key"
5268
- },
5269
- operationPropKey: {
5270
- key: "operationPropKey",
5271
- required: false,
5272
- type: String,
5273
- default: "operation"
5274
- },
5275
- columnEdit: {
5276
- key: "columnEdit",
5277
- required: false,
5278
- type: Boolean,
5279
- default: false
5280
- },
5281
5257
  searchPlaceholder: {
5282
5258
  key: "searchPlaceholder",
5283
5259
  required: false,
@@ -5308,6 +5284,12 @@ __sfc_main$1.props = {
5308
5284
  type: String,
5309
5285
  default: "基础字段"
5310
5286
  },
5287
+ selectEmptyWarningTips: {
5288
+ key: "selectEmptyWarningTips",
5289
+ required: false,
5290
+ type: String,
5291
+ default: "请选择至少一个选项"
5292
+ },
5311
5293
  getCheckedLengthDesc: {
5312
5294
  key: "getCheckedLengthDesc",
5313
5295
  required: false,
@@ -5319,6 +5301,30 @@ __sfc_main$1.props = {
5319
5301
  required: false,
5320
5302
  type: Function,
5321
5303
  default: (length) => "全选(" + length + ")"
5304
+ },
5305
+ columnEdit: {
5306
+ key: "columnEdit",
5307
+ required: false,
5308
+ type: Boolean,
5309
+ default: false
5310
+ },
5311
+ tableColumns: {
5312
+ key: "tableColumns",
5313
+ required: false,
5314
+ type: Array,
5315
+ default: () => []
5316
+ },
5317
+ storageKey: {
5318
+ key: "storageKey",
5319
+ required: false,
5320
+ type: String,
5321
+ default: "nf-table-columns-cached-key"
5322
+ },
5323
+ operationPropKey: {
5324
+ key: "operationPropKey",
5325
+ required: false,
5326
+ type: String,
5327
+ default: "operation"
5322
5328
  }
5323
5329
  };
5324
5330
  __sfc_main$1.setup = (__props, __ctx) => {
@@ -5769,12 +5775,6 @@ const __sfc_main = defineComponent({
5769
5775
  name: "nf-table"
5770
5776
  });
5771
5777
  __sfc_main.props = {
5772
- emptyImageSize: {
5773
- key: "emptyImageSize",
5774
- required: false,
5775
- type: Number,
5776
- default: 145
5777
- },
5778
5778
  data: {
5779
5779
  key: "data",
5780
5780
  required: false,
@@ -5829,6 +5829,18 @@ __sfc_main.props = {
5829
5829
  type: Array,
5830
5830
  default: () => []
5831
5831
  },
5832
+ dragCached: {
5833
+ key: "dragCached",
5834
+ required: false,
5835
+ type: Boolean,
5836
+ default: true
5837
+ },
5838
+ emptyImageSize: {
5839
+ key: "emptyImageSize",
5840
+ required: false,
5841
+ type: Number,
5842
+ default: 145
5843
+ },
5832
5844
  calHeight: {
5833
5845
  key: "calHeight",
5834
5846
  required: false,
@@ -5961,23 +5973,17 @@ __sfc_main.props = {
5961
5973
  type: String,
5962
5974
  default: "确定"
5963
5975
  },
5964
- columnCheckWidth: {
5965
- key: "columnCheckWidth",
5966
- required: false,
5967
- type: String,
5968
- default: "600px"
5969
- },
5970
- columnCheckConfirmText: {
5971
- key: "columnCheckConfirmText",
5976
+ columnCheckBasicFieldDesc: {
5977
+ key: "columnCheckBasicFieldDesc",
5972
5978
  required: false,
5973
5979
  type: String,
5974
- default: "保 存"
5980
+ default: "基础字段"
5975
5981
  },
5976
- columnCheckCancelText: {
5977
- key: "columnCheckCancelText",
5982
+ columnCheckWidth: {
5983
+ key: "columnCheckWidth",
5978
5984
  required: false,
5979
5985
  type: String,
5980
- default: "取 消"
5986
+ default: "600px"
5981
5987
  },
5982
5988
  columnCheckModalAppendToBody: {
5983
5989
  key: "columnCheckModalAppendToBody",
@@ -6081,12 +6087,6 @@ __sfc_main.props = {
6081
6087
  type: String,
6082
6088
  default: "不固定"
6083
6089
  },
6084
- columnCheckBasicFieldDesc: {
6085
- key: "columnCheckBasicFieldDesc",
6086
- required: false,
6087
- type: String,
6088
- default: "基础字段"
6089
- },
6090
6090
  columnCheckGetCheckedLengthDesc: {
6091
6091
  key: "columnCheckGetCheckedLengthDesc",
6092
6092
  required: false,
@@ -6292,7 +6292,7 @@ __sfc_main.setup = (__props, __ctx) => {
6292
6292
  index: index2
6293
6293
  };
6294
6294
  });
6295
- CachedManager.syncCachedSet(props.storageKey, columnState);
6295
+ return CachedManager.syncCachedSet(props.storageKey, columnState);
6296
6296
  }
6297
6297
  };
6298
6298
  const syncShowItemToInitHidden = () => {
@@ -6345,33 +6345,44 @@ __sfc_main.setup = (__props, __ctx) => {
6345
6345
  }
6346
6346
  const cachedPriority = props.priority === "cached";
6347
6347
  if (cachedPriority ? cached : (_a2 = localShowColumn.value) == null ? void 0 : _a2.length) {
6348
- cachedPriority ? await syncCookiesToLocalShowColumn() : syncLocalShowColumnToCookies();
6348
+ cachedPriority ? await syncCookiesToLocalShowColumn() : await syncLocalShowColumnToCookies();
6349
6349
  } else if (cachedPriority ? (_b = localShowColumn.value) == null ? void 0 : _b.length : cached) {
6350
- cachedPriority ? syncLocalShowColumnToCookies() : await syncCookiesToLocalShowColumn();
6350
+ cachedPriority ? await syncLocalShowColumnToCookies() : await syncCookiesToLocalShowColumn();
6351
6351
  }
6352
6352
  } catch (e) {
6353
6353
  console.log(e);
6354
6354
  }
6355
6355
  }
6356
+ if (props.dragCached) {
6357
+ await CachedManager.asyncCachedGet(`${props.storageKey}$drag-column-width`);
6358
+ }
6359
+ };
6360
+ const getMinWidth = (column) => {
6361
+ const fs = 14;
6362
+ const label = column.customLabel || column.label;
6363
+ const char = label.match(/[\u2E80-\u9FFF]/g);
6364
+ const charLen = char ? char.length : 0;
6365
+ const num = label.match(/\d|\./g);
6366
+ const numLen = num ? num.length : 0;
6367
+ const otherLen = label.length - charLen - numLen;
6368
+ return fs * (charLen * 1 + numLen * 0.7 + otherLen * 0.58) + 20 + (column.sortable ? 24 : 0);
6356
6369
  };
6357
- initCachedData();
6358
6370
  const tableColumns = ref([]);
6359
6371
  const elTableRefKey = ref(Date.now());
6360
- const syncCookiesToTableColumn = async (readCached = true) => {
6372
+ const syncCookiesToTableColumn = async (readCached = true, init = false) => {
6361
6373
  props.columns._skip = true;
6362
6374
  const columns = props.columns.map((item, index2) => {
6363
6375
  var _a2;
6364
- ((_a2 = item.label) == null ? void 0 : _a2.length) || 0;
6365
6376
  const attr = item.attr || {};
6366
6377
  if (!attr["min-width"] && item.label) {
6367
- const fs = 14;
6368
- const char = item.label.match(/[\u2E80-\u9FFF]/g);
6369
- const charLen = char ? char.length : 0;
6370
- const num = item.label.match(/\d|\./g);
6371
- const numLen = num ? num.length : 0;
6372
- const otherLen = item.label.length - charLen - numLen;
6373
- const minWidth = fs * (charLen * 1.1 + numLen * 0.65 + otherLen * 0.5) + 32 + (attr.sortable ? 24 : 0);
6374
- attr["min-width"] = String(minWidth) + "px";
6378
+ attr["min-width"] = String(getMinWidth(item)) + "px";
6379
+ }
6380
+ if (init && props.dragCached) {
6381
+ const prop = item.prop || ((_a2 = item.attr) == null ? void 0 : _a2.prop);
6382
+ let columnWidth = CachedManager.syncCachedGet(`${props.storageKey}$drag-column-width`) || {};
6383
+ if (columnWidth[prop]) {
6384
+ attr.width = columnWidth[prop];
6385
+ }
6375
6386
  }
6376
6387
  item.attr = {
6377
6388
  ...item.attr,
@@ -6421,7 +6432,11 @@ __sfc_main.setup = (__props, __ctx) => {
6421
6432
  });
6422
6433
  elTableRefKey.value = Date.now();
6423
6434
  };
6424
- syncCookiesToTableColumn();
6435
+ const initColumn = async () => {
6436
+ await initCachedData();
6437
+ syncCookiesToTableColumn(true, true);
6438
+ };
6439
+ initColumn();
6425
6440
  onBeforeMount(() => {
6426
6441
  watch(() => {
6427
6442
  return props.columns;
@@ -6546,8 +6561,14 @@ __sfc_main.setup = (__props, __ctx) => {
6546
6561
  const headerDragend = async (newWidth, oldWidth, column, event) => {
6547
6562
  var _a2, _b;
6548
6563
  await nextTick();
6549
- if (newWidth < column.minWidth) {
6550
- column.width = column.minWidth;
6564
+ const minWidth = getMinWidth(column);
6565
+ if (newWidth < minWidth) {
6566
+ column.width = minWidth;
6567
+ }
6568
+ if (props.dragCached) {
6569
+ const columnCachedData = await CachedManager.asyncCachedGet(`${props.storageKey}$drag-column-width`) || {};
6570
+ columnCachedData[column.property] = column.width;
6571
+ await CachedManager.asyncCachedSet(`${props.storageKey}$drag-column-width`, columnCachedData);
6551
6572
  }
6552
6573
  await ((_b = (_a2 = props.tableEvents)["header-dragend"]) == null ? void 0 : _b.call(_a2, newWidth, oldWidth, column, event));
6553
6574
  };
@@ -6775,13 +6796,7 @@ var _sfc_render = function render3() {
6775
6796
  }, [_vm._t("searchBox", function() {
6776
6797
  var _a2;
6777
6798
  return [_c("nf-search-form", _vm._g(_vm._b({
6778
- ref: "nfSearchFormRef",
6779
- attrs: {
6780
- "operation-prop-key": _vm.operationPropKey,
6781
- "storage-key": _vm.searchFormStorageKey,
6782
- "property": _vm.priority,
6783
- "select-empty-warning-tips": _vm.selectEmptyWarningTips
6784
- }
6799
+ ref: "nfSearchFormRef"
6785
6800
  }, "nf-search-form", _vm.searchFormAttrs, false), _vm.searchFormEvents), [_vm._l(((_a2 = _vm.nfSearchFormRef) == null ? void 0 : _a2.renderSearchFormItemOptions) || [], function(item) {
6786
6801
  var _a3;
6787
6802
  return [((_a3 = item.tooltip) == null ? void 0 : _a3.slot) ? [_vm._t(item.tooltip.slot, null, {
@@ -6831,33 +6846,13 @@ var _sfc_render = function render3() {
6831
6846
  "height": _vm.elTableHeight
6832
6847
  }
6833
6848
  }, "el-table", _vm.tableAttrer, false), _vm.tableEventer), [_vm._l(_vm.tableColumns, function(column) {
6834
- return [_vm.isShow(column) ? [column.type ? [column.render || column.prop || column.slot ? _c("el-table-column", _vm._b({
6835
- key: column.key || column.prop,
6836
- attrs: {
6837
- "type": column.type,
6838
- "label": column.label
6839
- },
6840
- scopedSlots: _vm._u([{
6841
- key: "default",
6842
- fn: function(scope) {
6843
- return [column.render ? _c("render-component", {
6844
- attrs: {
6845
- "render": column.render,
6846
- "row": scope.row
6847
- }
6848
- }) : [column.slot ? _vm._t(column.slot, null, {
6849
- "row": scope.row,
6850
- "index": scope.$index
6851
- }) : _c("span", [_vm._v(_vm._s(scope.row[column.prop]))])]];
6852
- }
6853
- }], null, true)
6854
- }, "el-table-column", column.attr, false)) : _c("el-table-column", _vm._b({
6855
- key: column.key || column.prop,
6849
+ return [_vm.isShow(column) ? [column.type ? _c("el-table-column", _vm._b({
6850
+ key: column.key || column.prop || column.type,
6856
6851
  attrs: {
6857
6852
  "type": column.type,
6858
6853
  "label": column.label
6859
6854
  }
6860
- }, "el-table-column", column.attr, false))] : [column.attr && column.attr.formatter ? _c("el-table-column", _vm._b({
6855
+ }, "el-table-column", column.attr, false)) : [column.attr && column.attr.formatter ? _c("el-table-column", _vm._b({
6861
6856
  key: column.key || column.prop,
6862
6857
  attrs: {
6863
6858
  "prop": column.prop,
@@ -7366,14 +7361,15 @@ var _sfc_render = function render3() {
7366
7361
  })], 2)], 2), _vm.nfColumCheckDialogVisible && _vm.checkMode === "dialog" ? _c("column-check-dialog", {
7367
7362
  ref: "columnCheckDialog",
7368
7363
  attrs: {
7364
+ "title": _vm.columnCheckTitle,
7365
+ "confirm-text": _vm.columnCheckConfirmButtonText,
7366
+ "cancel-text": _vm.columnCheckCancelButtonText,
7367
+ "basic-field-desc": _vm.columnCheckBasicFieldDesc,
7369
7368
  "show": _vm.nfColumCheckDialogVisible,
7370
7369
  "table-columns": _vm.columns,
7371
7370
  "column-edit": _vm.columnEdit,
7372
7371
  "storage-key": _vm.storageKey,
7373
- "title": _vm.columnCheckTitle,
7374
7372
  "width": _vm.columnCheckWidth,
7375
- "confirm-text": _vm.columnCheckConfirmText,
7376
- "cancel-text": _vm.columnCheckCancelText,
7377
7373
  "modal-append-to-body": _vm.columnCheckModalAppendToBody,
7378
7374
  "modal": _vm.columnCheckModal,
7379
7375
  "fullscreen": _vm.columnCheckFullscreen,
@@ -7402,10 +7398,10 @@ var _sfc_render = function render3() {
7402
7398
  })], 2) : _vm._e(), _vm.checkMode === "drawer" ? _c("nf-drawer", {
7403
7399
  ref: "columnCheckNfDrawer",
7404
7400
  attrs: {
7405
- "size": "680px",
7406
7401
  "title": _vm.columnCheckTitle,
7407
7402
  "cancel-button-text": _vm.columnCheckCancelButtonText,
7408
7403
  "confirm-button-text": _vm.columnCheckConfirmButtonText,
7404
+ "size": "680px",
7409
7405
  "visible": _vm.nfColumCheckDialogVisible,
7410
7406
  "tabs": _vm.columnCheckTabs,
7411
7407
  "destroy-on-close": true,
@@ -7431,13 +7427,13 @@ var _sfc_render = function render3() {
7431
7427
  "clear-desc": _vm.columnCheckClearDesc,
7432
7428
  "no-fixed-desc": _vm.columnCheckNoFixedDesc,
7433
7429
  "basic-field-desc": _vm.columnCheckBasicFieldDesc,
7434
- "column-edit": _vm.columnEdit,
7430
+ "select-empty-warning-tips": _vm.selectEmptyWarningTips,
7435
7431
  "get-checked-length-desc": _vm.columnCheckGetCheckedLengthDesc,
7436
7432
  "get-all-check-desc": _vm.columnCheckGetAllCheckDesc,
7433
+ "column-edit": _vm.columnEdit,
7437
7434
  "operation-prop-key": _vm.operationPropKey,
7438
7435
  "storage-key": _vm.storageKey,
7439
- "table-columns": _vm.columns,
7440
- "select-empty-warning-tips": _vm.selectEmptyWarningTips
7436
+ "table-columns": _vm.columns
7441
7437
  }
7442
7438
  })], 2) : _vm._e()], 2);
7443
7439
  };
@@ -49,10 +49,6 @@ 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
- };
56
52
  searchFormAttrs: {
57
53
  type: import("vue-demi").PropType<NfSearchFormAttributes>;
58
54
  default: () => {};
@@ -81,6 +77,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
81
77
  type: import("vue-demi").PropType<NfTableActionBtnAttributes[]>;
82
78
  default: () => never[];
83
79
  };
80
+ dragCached: {
81
+ type: import("vue-demi").PropType<boolean>;
82
+ default: boolean;
83
+ };
84
+ emptyImageSize: {
85
+ type: import("vue-demi").PropType<number>;
86
+ default: number;
87
+ };
84
88
  calHeight: {
85
89
  type: import("vue-demi").PropType<boolean>;
86
90
  default: boolean;
@@ -153,15 +157,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
153
157
  type: import("vue-demi").PropType<string>;
154
158
  default: string;
155
159
  };
156
- columnCheckWidth: {
157
- type: import("vue-demi").PropType<string>;
158
- default: string;
159
- };
160
- columnCheckConfirmText: {
160
+ columnCheckBasicFieldDesc: {
161
161
  type: import("vue-demi").PropType<string>;
162
162
  default: string;
163
163
  };
164
- columnCheckCancelText: {
164
+ columnCheckWidth: {
165
165
  type: import("vue-demi").PropType<string>;
166
166
  default: string;
167
167
  };
@@ -233,10 +233,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
233
233
  type: import("vue-demi").PropType<string>;
234
234
  default: string;
235
235
  };
236
- columnCheckBasicFieldDesc: {
237
- type: import("vue-demi").PropType<string>;
238
- default: string;
239
- };
240
236
  columnCheckGetCheckedLengthDesc: {
241
237
  type: import("vue-demi").PropType<Function>;
242
238
  default: (length: any) => string;
@@ -346,7 +342,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
346
342
  calcTableHeight: () => void;
347
343
  syncLocalShowColumnToCookies: () => void;
348
344
  syncCookiesToLocalShowColumn: () => Promise<void>;
349
- syncCookiesToTableColumn: (readCached?: boolean) => Promise<void>;
345
+ syncCookiesToTableColumn: (readCached?: boolean, init?: boolean) => Promise<void>;
350
346
  elTableRefKey: import("vue-demi").Ref<number>;
351
347
  }, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {
352
348
  fieldsChange: (event: string[]) => void;
@@ -400,10 +396,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
400
396
  type: import("vue-demi").PropType<string[]>;
401
397
  default: undefined;
402
398
  };
403
- emptyImageSize: {
404
- type: import("vue-demi").PropType<number>;
405
- default: number;
406
- };
407
399
  searchFormAttrs: {
408
400
  type: import("vue-demi").PropType<NfSearchFormAttributes>;
409
401
  default: () => {};
@@ -432,6 +424,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
432
424
  type: import("vue-demi").PropType<NfTableActionBtnAttributes[]>;
433
425
  default: () => never[];
434
426
  };
427
+ dragCached: {
428
+ type: import("vue-demi").PropType<boolean>;
429
+ default: boolean;
430
+ };
431
+ emptyImageSize: {
432
+ type: import("vue-demi").PropType<number>;
433
+ default: number;
434
+ };
435
435
  calHeight: {
436
436
  type: import("vue-demi").PropType<boolean>;
437
437
  default: boolean;
@@ -504,15 +504,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
504
504
  type: import("vue-demi").PropType<string>;
505
505
  default: string;
506
506
  };
507
- columnCheckWidth: {
508
- type: import("vue-demi").PropType<string>;
509
- default: string;
510
- };
511
- columnCheckConfirmText: {
507
+ columnCheckBasicFieldDesc: {
512
508
  type: import("vue-demi").PropType<string>;
513
509
  default: string;
514
510
  };
515
- columnCheckCancelText: {
511
+ columnCheckWidth: {
516
512
  type: import("vue-demi").PropType<string>;
517
513
  default: string;
518
514
  };
@@ -584,10 +580,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
584
580
  type: import("vue-demi").PropType<string>;
585
581
  default: string;
586
582
  };
587
- columnCheckBasicFieldDesc: {
588
- type: import("vue-demi").PropType<string>;
589
- default: string;
590
- };
591
583
  columnCheckGetCheckedLengthDesc: {
592
584
  type: import("vue-demi").PropType<Function>;
593
585
  default: (length: any) => string;
@@ -635,7 +627,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
635
627
  text: string;
636
628
  selectEmptyWarningTips: string;
637
629
  showColumn: string[];
638
- emptyImageSize: number;
639
630
  searchFormAttrs: NfSearchFormAttributes;
640
631
  searchFormEvents: Partial<Record<NfSearchFormEventKey, Function>>;
641
632
  tableAttrs: ElTableAttributes;
@@ -643,6 +634,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
643
634
  pageAttrs: ElPaginationAttributes;
644
635
  pageEvents: Partial<Record<ElPaginationEventKey, Function>>;
645
636
  actionBarOptList: NfTableActionBtnAttributes[];
637
+ dragCached: boolean;
638
+ emptyImageSize: number;
646
639
  calHeight: boolean;
647
640
  columnPosition: 'free' | 'embed';
648
641
  checkMode: 'dialog' | 'drawer';
@@ -661,9 +654,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
661
654
  columnCheckTitle: string;
662
655
  columnCheckCancelButtonText: string;
663
656
  columnCheckConfirmButtonText: string;
657
+ columnCheckBasicFieldDesc: string;
664
658
  columnCheckWidth: string;
665
- columnCheckConfirmText: string;
666
- columnCheckCancelText: string;
667
659
  columnCheckModalAppendToBody: boolean;
668
660
  columnCheckModal: boolean;
669
661
  columnCheckFullscreen: boolean;
@@ -681,7 +673,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
681
673
  columnCheckFixedLeftDesc: string;
682
674
  columnCheckClearDesc: string;
683
675
  columnCheckNoFixedDesc: string;
684
- columnCheckBasicFieldDesc: string;
685
676
  columnCheckGetCheckedLengthDesc: Function;
686
677
  columnCheckGetAllCheckDesc: Function;
687
678
  loading: boolean;
@@ -693,9 +684,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
693
684
  slot: any;
694
685
  }) => any>> & Partial<Record<any, (_: {
695
686
  slot: any;
696
- }) => any>> & Partial<Record<any, (_: {
697
- row: any;
698
- index: any;
699
687
  }) => any>> & Partial<Record<any, (_: {}) => any>> & Partial<Record<any, (_: {
700
688
  $index: any;
701
689
  column: any;
@@ -74,6 +74,7 @@ const props = withDefaults(defineProps<{
74
74
  width?: string,
75
75
  confirmText?: string
76
76
  cancelText?: string
77
+ basicFieldDesc?: string
77
78
  tableColumns?: Record<string, any>[],
78
79
  modalAppendToBody?: boolean,
79
80
  modal?: boolean,
@@ -95,6 +96,10 @@ const props = withDefaults(defineProps<{
95
96
  show: false,
96
97
  width: '600px',
97
98
  title: '设置显示字段',
99
+ /**
100
+ * 默认category分类标题
101
+ */
102
+ basicFieldDesc: '基础字段',
98
103
  cancelText: '取 消',
99
104
  confirmText: '保 存',
100
105
  tableColumns: () => [],
@@ -139,7 +144,7 @@ const fields = computed(() => {
139
144
  const obj: Record<string, any> = {}
140
145
  props.tableColumns.filter(item => !item.destory).map(item => {
141
146
  if (!item.type) {
142
- const key = item.category || '基础字段'
147
+ const key = item.category || props.basicFieldDesc
143
148
  if (!obj[key]) {
144
149
  obj[key] = []
145
150
  }
@@ -145,35 +145,38 @@ const instance = getCurrentInstance()?.proxy
145
145
 
146
146
 
147
147
  const props = withDefaults(defineProps<{
148
- selectEmptyWarningTips?: string,
149
- // 源序列
150
- tableColumns?: Record<string, any>[],
151
- storageKey?: string
152
- operationPropKey?: string
153
- /**
154
- * 列编辑显示开关
155
- */
156
- columnEdit?: boolean,
157
148
  searchPlaceholder?: string
158
149
  fixedLeftDesc?: string
159
150
  clearDesc?: string
160
151
  noFixedDesc?: string
152
+ /**
153
+ * 默认category分类标题
154
+ */
161
155
  basicFieldDesc?: string
156
+ selectEmptyWarningTips?: string
162
157
  getCheckedLengthDesc?: Function
163
158
  getAllCheckDesc?: Function
159
+ /**
160
+ * 列编辑显示开关
161
+ */
162
+ columnEdit?: boolean,
163
+ // 源序列
164
+ tableColumns?: Record<string, any>[],
165
+ storageKey?: string
166
+ operationPropKey?: string
164
167
  }>(), {
165
- columnEdit: false,
166
168
  selectEmptyWarningTips: '请选择至少一个选项',
167
- tableColumns: () => [],
168
- storageKey: 'nf-table-columns-cached-key',
169
- operationPropKey: 'operation',
170
169
  searchPlaceholder: '搜索',
171
170
  fixedLeftDesc: '固定在左侧',
172
171
  clearDesc: '清除',
173
172
  noFixedDesc: '不固定',
174
173
  basicFieldDesc: '基础字段',
175
174
  getCheckedLengthDesc: (length) => '已选(' + length + ')',
176
- getAllCheckDesc: (length) => '全选(' + length + ')'
175
+ getAllCheckDesc: (length) => '全选(' + length + ')',
176
+ tableColumns: () => [],
177
+ columnEdit: false,
178
+ storageKey: 'nf-table-columns-cached-key',
179
+ operationPropKey: 'operation',
177
180
  })
178
181
 
179
182
  // 获取当前缓存中的动态数据列