@94ai/nf-table 3.2.56 → 3.2.58

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.
@@ -57,6 +57,12 @@ __sfc_main$2.props = {
57
57
  type: String,
58
58
  default: "取 消"
59
59
  },
60
+ basicFieldDesc: {
61
+ key: "basicFieldDesc",
62
+ required: false,
63
+ type: String,
64
+ default: "基础字段"
65
+ },
60
66
  tableColumns: {
61
67
  key: "tableColumns",
62
68
  required: false,
@@ -161,7 +167,7 @@ __sfc_main$2.setup = (__props, __ctx) => {
161
167
  const obj = {};
162
168
  props.tableColumns.filter((item) => !item.destory).map((item) => {
163
169
  if (!item.type) {
164
- const key = item.category || "基础字段";
170
+ const key = item.category || props.basicFieldDesc;
165
171
  if (!obj[key]) {
166
172
  obj[key] = [];
167
173
  }
@@ -5250,36 +5256,6 @@ const __sfc_main$1 = vueDemi.defineComponent({
5250
5256
  name: "NfColumnCheckDrawer"
5251
5257
  });
5252
5258
  __sfc_main$1.props = {
5253
- selectEmptyWarningTips: {
5254
- key: "selectEmptyWarningTips",
5255
- required: false,
5256
- type: String,
5257
- default: "请选择至少一个选项"
5258
- },
5259
- tableColumns: {
5260
- key: "tableColumns",
5261
- required: false,
5262
- type: Array,
5263
- default: () => []
5264
- },
5265
- storageKey: {
5266
- key: "storageKey",
5267
- required: false,
5268
- type: String,
5269
- default: "nf-table-columns-cached-key"
5270
- },
5271
- operationPropKey: {
5272
- key: "operationPropKey",
5273
- required: false,
5274
- type: String,
5275
- default: "operation"
5276
- },
5277
- columnEdit: {
5278
- key: "columnEdit",
5279
- required: false,
5280
- type: Boolean,
5281
- default: false
5282
- },
5283
5259
  searchPlaceholder: {
5284
5260
  key: "searchPlaceholder",
5285
5261
  required: false,
@@ -5310,6 +5286,12 @@ __sfc_main$1.props = {
5310
5286
  type: String,
5311
5287
  default: "基础字段"
5312
5288
  },
5289
+ selectEmptyWarningTips: {
5290
+ key: "selectEmptyWarningTips",
5291
+ required: false,
5292
+ type: String,
5293
+ default: "请选择至少一个选项"
5294
+ },
5313
5295
  getCheckedLengthDesc: {
5314
5296
  key: "getCheckedLengthDesc",
5315
5297
  required: false,
@@ -5321,6 +5303,30 @@ __sfc_main$1.props = {
5321
5303
  required: false,
5322
5304
  type: Function,
5323
5305
  default: (length) => "全选(" + length + ")"
5306
+ },
5307
+ columnEdit: {
5308
+ key: "columnEdit",
5309
+ required: false,
5310
+ type: Boolean,
5311
+ default: false
5312
+ },
5313
+ tableColumns: {
5314
+ key: "tableColumns",
5315
+ required: false,
5316
+ type: Array,
5317
+ default: () => []
5318
+ },
5319
+ storageKey: {
5320
+ key: "storageKey",
5321
+ required: false,
5322
+ type: String,
5323
+ default: "nf-table-columns-cached-key"
5324
+ },
5325
+ operationPropKey: {
5326
+ key: "operationPropKey",
5327
+ required: false,
5328
+ type: String,
5329
+ default: "operation"
5324
5330
  }
5325
5331
  };
5326
5332
  __sfc_main$1.setup = (__props, __ctx) => {
@@ -5771,12 +5777,6 @@ const __sfc_main = vueDemi.defineComponent({
5771
5777
  name: "nf-table"
5772
5778
  });
5773
5779
  __sfc_main.props = {
5774
- emptyImageSize: {
5775
- key: "emptyImageSize",
5776
- required: false,
5777
- type: Number,
5778
- default: 145
5779
- },
5780
5780
  data: {
5781
5781
  key: "data",
5782
5782
  required: false,
@@ -5831,6 +5831,18 @@ __sfc_main.props = {
5831
5831
  type: Array,
5832
5832
  default: () => []
5833
5833
  },
5834
+ dragCached: {
5835
+ key: "dragCached",
5836
+ required: false,
5837
+ type: Boolean,
5838
+ default: true
5839
+ },
5840
+ emptyImageSize: {
5841
+ key: "emptyImageSize",
5842
+ required: false,
5843
+ type: Number,
5844
+ default: 145
5845
+ },
5834
5846
  calHeight: {
5835
5847
  key: "calHeight",
5836
5848
  required: false,
@@ -5963,23 +5975,17 @@ __sfc_main.props = {
5963
5975
  type: String,
5964
5976
  default: "确定"
5965
5977
  },
5966
- columnCheckWidth: {
5967
- key: "columnCheckWidth",
5968
- required: false,
5969
- type: String,
5970
- default: "600px"
5971
- },
5972
- columnCheckConfirmText: {
5973
- key: "columnCheckConfirmText",
5978
+ columnCheckBasicFieldDesc: {
5979
+ key: "columnCheckBasicFieldDesc",
5974
5980
  required: false,
5975
5981
  type: String,
5976
- default: "保 存"
5982
+ default: "基础字段"
5977
5983
  },
5978
- columnCheckCancelText: {
5979
- key: "columnCheckCancelText",
5984
+ columnCheckWidth: {
5985
+ key: "columnCheckWidth",
5980
5986
  required: false,
5981
5987
  type: String,
5982
- default: "取 消"
5988
+ default: "600px"
5983
5989
  },
5984
5990
  columnCheckModalAppendToBody: {
5985
5991
  key: "columnCheckModalAppendToBody",
@@ -6083,12 +6089,6 @@ __sfc_main.props = {
6083
6089
  type: String,
6084
6090
  default: "不固定"
6085
6091
  },
6086
- columnCheckBasicFieldDesc: {
6087
- key: "columnCheckBasicFieldDesc",
6088
- required: false,
6089
- type: String,
6090
- default: "基础字段"
6091
- },
6092
6092
  columnCheckGetCheckedLengthDesc: {
6093
6093
  key: "columnCheckGetCheckedLengthDesc",
6094
6094
  required: false,
@@ -6355,24 +6355,36 @@ __sfc_main.setup = (__props, __ctx) => {
6355
6355
  console.log(e);
6356
6356
  }
6357
6357
  }
6358
+ if (props.dragCached) {
6359
+ await commonUtils.CachedManager.asyncCachedGet(`${props.storageKey}$drag-column-width`);
6360
+ }
6361
+ };
6362
+ const getMinWidth = (column) => {
6363
+ const fs = 14;
6364
+ const label = column.customLabel || column.label;
6365
+ const char = label.match(/[\u2E80-\u9FFF]/g);
6366
+ const charLen = char ? char.length : 0;
6367
+ const num = label.match(/\d|\./g);
6368
+ const numLen = num ? num.length : 0;
6369
+ const otherLen = label.length - charLen - numLen;
6370
+ return fs * (charLen * 1 + numLen * 0.7 + otherLen * 0.58) + 20 + (column.sortable ? 24 : 0);
6358
6371
  };
6359
6372
  const tableColumns = vueDemi.ref([]);
6360
6373
  const elTableRefKey = vueDemi.ref(Date.now());
6361
- const syncCookiesToTableColumn = async (readCached = true) => {
6374
+ const syncCookiesToTableColumn = async (readCached = true, init = false) => {
6362
6375
  props.columns._skip = true;
6363
6376
  const columns = props.columns.map((item, index2) => {
6364
6377
  var _a2;
6365
- ((_a2 = item.label) == null ? void 0 : _a2.length) || 0;
6366
6378
  const attr = item.attr || {};
6367
6379
  if (!attr["min-width"] && item.label) {
6368
- const fs = 14;
6369
- const char = item.label.match(/[\u2E80-\u9FFF]/g);
6370
- const charLen = char ? char.length : 0;
6371
- const num = item.label.match(/\d|\./g);
6372
- const numLen = num ? num.length : 0;
6373
- const otherLen = item.label.length - charLen - numLen;
6374
- const minWidth = fs * (charLen * 1.1 + numLen * 0.65 + otherLen * 0.5) + 32 + (attr.sortable ? 24 : 0);
6375
- attr["min-width"] = String(minWidth) + "px";
6380
+ attr["min-width"] = String(getMinWidth(item)) + "px";
6381
+ }
6382
+ if (init && props.dragCached) {
6383
+ const prop = item.prop || ((_a2 = item.attr) == null ? void 0 : _a2.prop);
6384
+ let columnWidth = commonUtils.CachedManager.syncCachedGet(`${props.storageKey}$drag-column-width`) || {};
6385
+ if (columnWidth[prop]) {
6386
+ attr.width = columnWidth[prop];
6387
+ }
6376
6388
  }
6377
6389
  item.attr = {
6378
6390
  ...item.attr,
@@ -6424,7 +6436,7 @@ __sfc_main.setup = (__props, __ctx) => {
6424
6436
  };
6425
6437
  const initColumn = async () => {
6426
6438
  await initCachedData();
6427
- syncCookiesToTableColumn();
6439
+ syncCookiesToTableColumn(true, true);
6428
6440
  };
6429
6441
  initColumn();
6430
6442
  vueDemi.onBeforeMount(() => {
@@ -6551,8 +6563,14 @@ __sfc_main.setup = (__props, __ctx) => {
6551
6563
  const headerDragend = async (newWidth, oldWidth, column, event) => {
6552
6564
  var _a2, _b;
6553
6565
  await vueDemi.nextTick();
6554
- if (newWidth < column.minWidth) {
6555
- column.width = column.minWidth;
6566
+ const minWidth = getMinWidth(column);
6567
+ if (newWidth < minWidth) {
6568
+ column.width = minWidth;
6569
+ }
6570
+ if (props.dragCached) {
6571
+ const columnCachedData = await commonUtils.CachedManager.asyncCachedGet(`${props.storageKey}$drag-column-width`) || {};
6572
+ columnCachedData[column.property] = column.width;
6573
+ await commonUtils.CachedManager.asyncCachedSet(`${props.storageKey}$drag-column-width`, columnCachedData);
6556
6574
  }
6557
6575
  await ((_b = (_a2 = props.tableEvents)["header-dragend"]) == null ? void 0 : _b.call(_a2, newWidth, oldWidth, column, event));
6558
6576
  };
@@ -6780,13 +6798,7 @@ var _sfc_render = function render3() {
6780
6798
  }, [_vm._t("searchBox", function() {
6781
6799
  var _a2;
6782
6800
  return [_c("nf-search-form", _vm._g(_vm._b({
6783
- ref: "nfSearchFormRef",
6784
- attrs: {
6785
- "operation-prop-key": _vm.operationPropKey,
6786
- "storage-key": _vm.searchFormStorageKey,
6787
- "property": _vm.priority,
6788
- "select-empty-warning-tips": _vm.selectEmptyWarningTips
6789
- }
6801
+ ref: "nfSearchFormRef"
6790
6802
  }, "nf-search-form", _vm.searchFormAttrs, false), _vm.searchFormEvents), [_vm._l(((_a2 = _vm.nfSearchFormRef) == null ? void 0 : _a2.renderSearchFormItemOptions) || [], function(item) {
6791
6803
  var _a3;
6792
6804
  return [((_a3 = item.tooltip) == null ? void 0 : _a3.slot) ? [_vm._t(item.tooltip.slot, null, {
@@ -6836,33 +6848,13 @@ var _sfc_render = function render3() {
6836
6848
  "height": _vm.elTableHeight
6837
6849
  }
6838
6850
  }, "el-table", _vm.tableAttrer, false), _vm.tableEventer), [_vm._l(_vm.tableColumns, function(column) {
6839
- return [_vm.isShow(column) ? [column.type ? [column.render || column.prop || column.slot ? _c("el-table-column", _vm._b({
6840
- key: column.key || column.prop,
6841
- attrs: {
6842
- "type": column.type,
6843
- "label": column.label
6844
- },
6845
- scopedSlots: _vm._u([{
6846
- key: "default",
6847
- fn: function(scope) {
6848
- return [column.render ? _c("render-component", {
6849
- attrs: {
6850
- "render": column.render,
6851
- "row": scope.row
6852
- }
6853
- }) : [column.slot ? _vm._t(column.slot, null, {
6854
- "row": scope.row,
6855
- "index": scope.$index
6856
- }) : _c("span", [_vm._v(_vm._s(scope.row[column.prop]))])]];
6857
- }
6858
- }], null, true)
6859
- }, "el-table-column", column.attr, false)) : _c("el-table-column", _vm._b({
6860
- key: column.key || column.prop,
6851
+ return [_vm.isShow(column) ? [column.type ? _c("el-table-column", _vm._b({
6852
+ key: column.key || column.prop || column.type,
6861
6853
  attrs: {
6862
6854
  "type": column.type,
6863
6855
  "label": column.label
6864
6856
  }
6865
- }, "el-table-column", column.attr, false))] : [column.attr && column.attr.formatter ? _c("el-table-column", _vm._b({
6857
+ }, "el-table-column", column.attr, false)) : [column.attr && column.attr.formatter ? _c("el-table-column", _vm._b({
6866
6858
  key: column.key || column.prop,
6867
6859
  attrs: {
6868
6860
  "prop": column.prop,
@@ -7371,14 +7363,15 @@ var _sfc_render = function render3() {
7371
7363
  })], 2)], 2), _vm.nfColumCheckDialogVisible && _vm.checkMode === "dialog" ? _c("column-check-dialog", {
7372
7364
  ref: "columnCheckDialog",
7373
7365
  attrs: {
7366
+ "title": _vm.columnCheckTitle,
7367
+ "confirm-text": _vm.columnCheckConfirmButtonText,
7368
+ "cancel-text": _vm.columnCheckCancelButtonText,
7369
+ "basic-field-desc": _vm.columnCheckBasicFieldDesc,
7374
7370
  "show": _vm.nfColumCheckDialogVisible,
7375
7371
  "table-columns": _vm.columns,
7376
7372
  "column-edit": _vm.columnEdit,
7377
7373
  "storage-key": _vm.storageKey,
7378
- "title": _vm.columnCheckTitle,
7379
7374
  "width": _vm.columnCheckWidth,
7380
- "confirm-text": _vm.columnCheckConfirmText,
7381
- "cancel-text": _vm.columnCheckCancelText,
7382
7375
  "modal-append-to-body": _vm.columnCheckModalAppendToBody,
7383
7376
  "modal": _vm.columnCheckModal,
7384
7377
  "fullscreen": _vm.columnCheckFullscreen,
@@ -7407,10 +7400,10 @@ var _sfc_render = function render3() {
7407
7400
  })], 2) : _vm._e(), _vm.checkMode === "drawer" ? _c("nf-drawer", {
7408
7401
  ref: "columnCheckNfDrawer",
7409
7402
  attrs: {
7410
- "size": "680px",
7411
7403
  "title": _vm.columnCheckTitle,
7412
7404
  "cancel-button-text": _vm.columnCheckCancelButtonText,
7413
7405
  "confirm-button-text": _vm.columnCheckConfirmButtonText,
7406
+ "size": "680px",
7414
7407
  "visible": _vm.nfColumCheckDialogVisible,
7415
7408
  "tabs": _vm.columnCheckTabs,
7416
7409
  "destroy-on-close": true,
@@ -7436,13 +7429,13 @@ var _sfc_render = function render3() {
7436
7429
  "clear-desc": _vm.columnCheckClearDesc,
7437
7430
  "no-fixed-desc": _vm.columnCheckNoFixedDesc,
7438
7431
  "basic-field-desc": _vm.columnCheckBasicFieldDesc,
7439
- "column-edit": _vm.columnEdit,
7432
+ "select-empty-warning-tips": _vm.selectEmptyWarningTips,
7440
7433
  "get-checked-length-desc": _vm.columnCheckGetCheckedLengthDesc,
7441
7434
  "get-all-check-desc": _vm.columnCheckGetAllCheckDesc,
7435
+ "column-edit": _vm.columnEdit,
7442
7436
  "operation-prop-key": _vm.operationPropKey,
7443
7437
  "storage-key": _vm.storageKey,
7444
- "table-columns": _vm.columns,
7445
- "select-empty-warning-tips": _vm.selectEmptyWarningTips
7438
+ "table-columns": _vm.columns
7446
7439
  }
7447
7440
  })], 2) : _vm._e()], 2);
7448
7441
  };
@@ -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,
@@ -6353,24 +6353,36 @@ __sfc_main.setup = (__props, __ctx) => {
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
6370
  const tableColumns = ref([]);
6358
6371
  const elTableRefKey = ref(Date.now());
6359
- const syncCookiesToTableColumn = async (readCached = true) => {
6372
+ const syncCookiesToTableColumn = async (readCached = true, init = false) => {
6360
6373
  props.columns._skip = true;
6361
6374
  const columns = props.columns.map((item, index2) => {
6362
6375
  var _a2;
6363
- ((_a2 = item.label) == null ? void 0 : _a2.length) || 0;
6364
6376
  const attr = item.attr || {};
6365
6377
  if (!attr["min-width"] && item.label) {
6366
- const fs = 14;
6367
- const char = item.label.match(/[\u2E80-\u9FFF]/g);
6368
- const charLen = char ? char.length : 0;
6369
- const num = item.label.match(/\d|\./g);
6370
- const numLen = num ? num.length : 0;
6371
- const otherLen = item.label.length - charLen - numLen;
6372
- const minWidth = fs * (charLen * 1.1 + numLen * 0.65 + otherLen * 0.5) + 32 + (attr.sortable ? 24 : 0);
6373
- 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
+ }
6374
6386
  }
6375
6387
  item.attr = {
6376
6388
  ...item.attr,
@@ -6422,7 +6434,7 @@ __sfc_main.setup = (__props, __ctx) => {
6422
6434
  };
6423
6435
  const initColumn = async () => {
6424
6436
  await initCachedData();
6425
- syncCookiesToTableColumn();
6437
+ syncCookiesToTableColumn(true, true);
6426
6438
  };
6427
6439
  initColumn();
6428
6440
  onBeforeMount(() => {
@@ -6549,8 +6561,14 @@ __sfc_main.setup = (__props, __ctx) => {
6549
6561
  const headerDragend = async (newWidth, oldWidth, column, event) => {
6550
6562
  var _a2, _b;
6551
6563
  await nextTick();
6552
- if (newWidth < column.minWidth) {
6553
- 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);
6554
6572
  }
6555
6573
  await ((_b = (_a2 = props.tableEvents)["header-dragend"]) == null ? void 0 : _b.call(_a2, newWidth, oldWidth, column, event));
6556
6574
  };
@@ -6778,13 +6796,7 @@ var _sfc_render = function render3() {
6778
6796
  }, [_vm._t("searchBox", function() {
6779
6797
  var _a2;
6780
6798
  return [_c("nf-search-form", _vm._g(_vm._b({
6781
- ref: "nfSearchFormRef",
6782
- attrs: {
6783
- "operation-prop-key": _vm.operationPropKey,
6784
- "storage-key": _vm.searchFormStorageKey,
6785
- "property": _vm.priority,
6786
- "select-empty-warning-tips": _vm.selectEmptyWarningTips
6787
- }
6799
+ ref: "nfSearchFormRef"
6788
6800
  }, "nf-search-form", _vm.searchFormAttrs, false), _vm.searchFormEvents), [_vm._l(((_a2 = _vm.nfSearchFormRef) == null ? void 0 : _a2.renderSearchFormItemOptions) || [], function(item) {
6789
6801
  var _a3;
6790
6802
  return [((_a3 = item.tooltip) == null ? void 0 : _a3.slot) ? [_vm._t(item.tooltip.slot, null, {
@@ -6834,33 +6846,13 @@ var _sfc_render = function render3() {
6834
6846
  "height": _vm.elTableHeight
6835
6847
  }
6836
6848
  }, "el-table", _vm.tableAttrer, false), _vm.tableEventer), [_vm._l(_vm.tableColumns, function(column) {
6837
- return [_vm.isShow(column) ? [column.type ? [column.render || column.prop || column.slot ? _c("el-table-column", _vm._b({
6838
- key: column.key || column.prop,
6839
- attrs: {
6840
- "type": column.type,
6841
- "label": column.label
6842
- },
6843
- scopedSlots: _vm._u([{
6844
- key: "default",
6845
- fn: function(scope) {
6846
- return [column.render ? _c("render-component", {
6847
- attrs: {
6848
- "render": column.render,
6849
- "row": scope.row
6850
- }
6851
- }) : [column.slot ? _vm._t(column.slot, null, {
6852
- "row": scope.row,
6853
- "index": scope.$index
6854
- }) : _c("span", [_vm._v(_vm._s(scope.row[column.prop]))])]];
6855
- }
6856
- }], null, true)
6857
- }, "el-table-column", column.attr, false)) : _c("el-table-column", _vm._b({
6858
- 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,
6859
6851
  attrs: {
6860
6852
  "type": column.type,
6861
6853
  "label": column.label
6862
6854
  }
6863
- }, "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({
6864
6856
  key: column.key || column.prop,
6865
6857
  attrs: {
6866
6858
  "prop": column.prop,
@@ -7369,14 +7361,15 @@ var _sfc_render = function render3() {
7369
7361
  })], 2)], 2), _vm.nfColumCheckDialogVisible && _vm.checkMode === "dialog" ? _c("column-check-dialog", {
7370
7362
  ref: "columnCheckDialog",
7371
7363
  attrs: {
7364
+ "title": _vm.columnCheckTitle,
7365
+ "confirm-text": _vm.columnCheckConfirmButtonText,
7366
+ "cancel-text": _vm.columnCheckCancelButtonText,
7367
+ "basic-field-desc": _vm.columnCheckBasicFieldDesc,
7372
7368
  "show": _vm.nfColumCheckDialogVisible,
7373
7369
  "table-columns": _vm.columns,
7374
7370
  "column-edit": _vm.columnEdit,
7375
7371
  "storage-key": _vm.storageKey,
7376
- "title": _vm.columnCheckTitle,
7377
7372
  "width": _vm.columnCheckWidth,
7378
- "confirm-text": _vm.columnCheckConfirmText,
7379
- "cancel-text": _vm.columnCheckCancelText,
7380
7373
  "modal-append-to-body": _vm.columnCheckModalAppendToBody,
7381
7374
  "modal": _vm.columnCheckModal,
7382
7375
  "fullscreen": _vm.columnCheckFullscreen,
@@ -7405,10 +7398,10 @@ var _sfc_render = function render3() {
7405
7398
  })], 2) : _vm._e(), _vm.checkMode === "drawer" ? _c("nf-drawer", {
7406
7399
  ref: "columnCheckNfDrawer",
7407
7400
  attrs: {
7408
- "size": "680px",
7409
7401
  "title": _vm.columnCheckTitle,
7410
7402
  "cancel-button-text": _vm.columnCheckCancelButtonText,
7411
7403
  "confirm-button-text": _vm.columnCheckConfirmButtonText,
7404
+ "size": "680px",
7412
7405
  "visible": _vm.nfColumCheckDialogVisible,
7413
7406
  "tabs": _vm.columnCheckTabs,
7414
7407
  "destroy-on-close": true,
@@ -7434,13 +7427,13 @@ var _sfc_render = function render3() {
7434
7427
  "clear-desc": _vm.columnCheckClearDesc,
7435
7428
  "no-fixed-desc": _vm.columnCheckNoFixedDesc,
7436
7429
  "basic-field-desc": _vm.columnCheckBasicFieldDesc,
7437
- "column-edit": _vm.columnEdit,
7430
+ "select-empty-warning-tips": _vm.selectEmptyWarningTips,
7438
7431
  "get-checked-length-desc": _vm.columnCheckGetCheckedLengthDesc,
7439
7432
  "get-all-check-desc": _vm.columnCheckGetAllCheckDesc,
7433
+ "column-edit": _vm.columnEdit,
7440
7434
  "operation-prop-key": _vm.operationPropKey,
7441
7435
  "storage-key": _vm.storageKey,
7442
- "table-columns": _vm.columns,
7443
- "select-empty-warning-tips": _vm.selectEmptyWarningTips
7436
+ "table-columns": _vm.columns
7444
7437
  }
7445
7438
  })], 2) : _vm._e()], 2);
7446
7439
  };