@94ai/nf-table 100.1.44 → 100.1.46
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 +92 -120
- package/lib/nf-column-check-dialog.vue.d.ts +9 -0
- package/lib/nf-column-check-drawer.vue.d.ts +12 -12
- package/lib/nf-table.cjs.js +87 -77
- package/lib/nf-table.esm-bundler.js +87 -77
- package/lib/nf-table.vue.d.ts +32 -42
- package/package/nf-column-check-dialog.vue +6 -1
- package/package/nf-column-check-drawer.vue +17 -14
- package/package/nf-table.vue +53 -30
- package/package.json +8 -8
package/lib/nf-table.cjs.js
CHANGED
|
@@ -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,18 +5777,6 @@ const __sfc_main = vueDemi.defineComponent({
|
|
|
5771
5777
|
name: "nf-table"
|
|
5772
5778
|
});
|
|
5773
5779
|
__sfc_main.props = {
|
|
5774
|
-
dragCached: {
|
|
5775
|
-
key: "dragCached",
|
|
5776
|
-
required: false,
|
|
5777
|
-
type: Boolean,
|
|
5778
|
-
default: true
|
|
5779
|
-
},
|
|
5780
|
-
emptyImageSize: {
|
|
5781
|
-
key: "emptyImageSize",
|
|
5782
|
-
required: false,
|
|
5783
|
-
type: Number,
|
|
5784
|
-
default: 145
|
|
5785
|
-
},
|
|
5786
5780
|
data: {
|
|
5787
5781
|
key: "data",
|
|
5788
5782
|
required: false,
|
|
@@ -5837,6 +5831,18 @@ __sfc_main.props = {
|
|
|
5837
5831
|
type: Array,
|
|
5838
5832
|
default: () => []
|
|
5839
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
|
+
},
|
|
5840
5846
|
calHeight: {
|
|
5841
5847
|
key: "calHeight",
|
|
5842
5848
|
required: false,
|
|
@@ -5969,23 +5975,17 @@ __sfc_main.props = {
|
|
|
5969
5975
|
type: String,
|
|
5970
5976
|
default: "确定"
|
|
5971
5977
|
},
|
|
5972
|
-
|
|
5973
|
-
key: "
|
|
5974
|
-
required: false,
|
|
5975
|
-
type: String,
|
|
5976
|
-
default: "600px"
|
|
5977
|
-
},
|
|
5978
|
-
columnCheckConfirmText: {
|
|
5979
|
-
key: "columnCheckConfirmText",
|
|
5978
|
+
columnCheckBasicFieldDesc: {
|
|
5979
|
+
key: "columnCheckBasicFieldDesc",
|
|
5980
5980
|
required: false,
|
|
5981
5981
|
type: String,
|
|
5982
|
-
default: "
|
|
5982
|
+
default: "基础字段"
|
|
5983
5983
|
},
|
|
5984
|
-
|
|
5985
|
-
key: "
|
|
5984
|
+
columnCheckWidth: {
|
|
5985
|
+
key: "columnCheckWidth",
|
|
5986
5986
|
required: false,
|
|
5987
5987
|
type: String,
|
|
5988
|
-
default: "
|
|
5988
|
+
default: "600px"
|
|
5989
5989
|
},
|
|
5990
5990
|
columnCheckModalAppendToBody: {
|
|
5991
5991
|
key: "columnCheckModalAppendToBody",
|
|
@@ -6089,12 +6089,6 @@ __sfc_main.props = {
|
|
|
6089
6089
|
type: String,
|
|
6090
6090
|
default: "不固定"
|
|
6091
6091
|
},
|
|
6092
|
-
columnCheckBasicFieldDesc: {
|
|
6093
|
-
key: "columnCheckBasicFieldDesc",
|
|
6094
|
-
required: false,
|
|
6095
|
-
type: String,
|
|
6096
|
-
default: "基础字段"
|
|
6097
|
-
},
|
|
6098
6092
|
columnCheckGetCheckedLengthDesc: {
|
|
6099
6093
|
key: "columnCheckGetCheckedLengthDesc",
|
|
6100
6094
|
required: false,
|
|
@@ -6182,6 +6176,11 @@ __sfc_main.props = {
|
|
|
6182
6176
|
required: false,
|
|
6183
6177
|
type: String,
|
|
6184
6178
|
default: "operation"
|
|
6179
|
+
},
|
|
6180
|
+
searchForm: {
|
|
6181
|
+
key: "searchForm",
|
|
6182
|
+
required: true,
|
|
6183
|
+
type: null
|
|
6185
6184
|
}
|
|
6186
6185
|
};
|
|
6187
6186
|
__sfc_main.setup = (__props, __ctx) => {
|
|
@@ -6361,6 +6360,9 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6361
6360
|
console.log(e);
|
|
6362
6361
|
}
|
|
6363
6362
|
}
|
|
6363
|
+
if (props.dragCached) {
|
|
6364
|
+
await commonUtils.CachedManager.asyncCachedGet(`${props.storageKey}$drag-column-width`);
|
|
6365
|
+
}
|
|
6364
6366
|
};
|
|
6365
6367
|
const getMinWidth = (column) => {
|
|
6366
6368
|
const fs = 14;
|
|
@@ -6374,13 +6376,21 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6374
6376
|
};
|
|
6375
6377
|
const tableColumns = vueDemi.ref([]);
|
|
6376
6378
|
const elTableRefKey = vueDemi.ref(Date.now());
|
|
6377
|
-
const syncCookiesToTableColumn = async (readCached = true) => {
|
|
6379
|
+
const syncCookiesToTableColumn = async (readCached = true, init = false) => {
|
|
6378
6380
|
props.columns._skip = true;
|
|
6379
6381
|
const columns = props.columns.map((item, index2) => {
|
|
6382
|
+
var _a2;
|
|
6380
6383
|
const attr = item.attr || {};
|
|
6381
6384
|
if (!attr["min-width"] && item.label) {
|
|
6382
6385
|
attr["min-width"] = String(getMinWidth(item)) + "px";
|
|
6383
6386
|
}
|
|
6387
|
+
if (init && props.dragCached) {
|
|
6388
|
+
const prop = item.prop || ((_a2 = item.attr) == null ? void 0 : _a2.prop);
|
|
6389
|
+
let columnWidth = commonUtils.CachedManager.syncCachedGet(`${props.storageKey}$drag-column-width`) || {};
|
|
6390
|
+
if (columnWidth[prop]) {
|
|
6391
|
+
attr.width = columnWidth[prop];
|
|
6392
|
+
}
|
|
6393
|
+
}
|
|
6384
6394
|
item.attr = {
|
|
6385
6395
|
...item.attr,
|
|
6386
6396
|
...attr
|
|
@@ -6431,7 +6441,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6431
6441
|
};
|
|
6432
6442
|
const initColumn = async () => {
|
|
6433
6443
|
await initCachedData();
|
|
6434
|
-
syncCookiesToTableColumn();
|
|
6444
|
+
syncCookiesToTableColumn(true, true);
|
|
6435
6445
|
};
|
|
6436
6446
|
initColumn();
|
|
6437
6447
|
vueDemi.onBeforeMount(() => {
|
|
@@ -6562,6 +6572,11 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6562
6572
|
if (newWidth < minWidth) {
|
|
6563
6573
|
column.width = minWidth;
|
|
6564
6574
|
}
|
|
6575
|
+
if (props.dragCached) {
|
|
6576
|
+
const columnCachedData = await commonUtils.CachedManager.asyncCachedGet(`${props.storageKey}$drag-column-width`) || {};
|
|
6577
|
+
columnCachedData[column.property] = column.width;
|
|
6578
|
+
await commonUtils.CachedManager.asyncCachedSet(`${props.storageKey}$drag-column-width`, columnCachedData);
|
|
6579
|
+
}
|
|
6565
6580
|
await ((_b = (_a2 = props.tableEvents)["header-dragend"]) == null ? void 0 : _b.call(_a2, newWidth, oldWidth, column, event));
|
|
6566
6581
|
};
|
|
6567
6582
|
const columnCheckConfirmFeedback = (value) => {
|
|
@@ -6788,13 +6803,7 @@ var _sfc_render = function render3() {
|
|
|
6788
6803
|
}, [_vm._t("searchBox", function() {
|
|
6789
6804
|
var _a2;
|
|
6790
6805
|
return [_c("nf-search-form", _vm._g(_vm._b({
|
|
6791
|
-
ref: "nfSearchFormRef"
|
|
6792
|
-
attrs: {
|
|
6793
|
-
"operation-prop-key": _vm.operationPropKey,
|
|
6794
|
-
"storage-key": _vm.searchFormStorageKey,
|
|
6795
|
-
"property": _vm.priority,
|
|
6796
|
-
"select-empty-warning-tips": _vm.selectEmptyWarningTips
|
|
6797
|
-
}
|
|
6806
|
+
ref: "nfSearchFormRef"
|
|
6798
6807
|
}, "nf-search-form", _vm.searchFormAttrs, false), _vm.searchFormEvents), [_vm._l(((_a2 = _vm.nfSearchFormRef) == null ? void 0 : _a2.renderSearchFormItemOptions) || [], function(item) {
|
|
6799
6808
|
var _a3;
|
|
6800
6809
|
return [((_a3 = item.tooltip) == null ? void 0 : _a3.slot) ? [_vm._t(item.tooltip.slot, null, {
|
|
@@ -7359,14 +7368,15 @@ var _sfc_render = function render3() {
|
|
|
7359
7368
|
})], 2)], 2), _vm.nfColumCheckDialogVisible && _vm.checkMode === "dialog" ? _c("column-check-dialog", {
|
|
7360
7369
|
ref: "columnCheckDialog",
|
|
7361
7370
|
attrs: {
|
|
7371
|
+
"title": _vm.columnCheckTitle,
|
|
7372
|
+
"confirm-text": _vm.columnCheckConfirmButtonText,
|
|
7373
|
+
"cancel-text": _vm.columnCheckCancelButtonText,
|
|
7374
|
+
"basic-field-desc": _vm.columnCheckBasicFieldDesc,
|
|
7362
7375
|
"show": _vm.nfColumCheckDialogVisible,
|
|
7363
7376
|
"table-columns": _vm.columns,
|
|
7364
7377
|
"column-edit": _vm.columnEdit,
|
|
7365
7378
|
"storage-key": _vm.storageKey,
|
|
7366
|
-
"title": _vm.columnCheckTitle,
|
|
7367
7379
|
"width": _vm.columnCheckWidth,
|
|
7368
|
-
"confirm-text": _vm.columnCheckConfirmText,
|
|
7369
|
-
"cancel-text": _vm.columnCheckCancelText,
|
|
7370
7380
|
"modal-append-to-body": _vm.columnCheckModalAppendToBody,
|
|
7371
7381
|
"modal": _vm.columnCheckModal,
|
|
7372
7382
|
"fullscreen": _vm.columnCheckFullscreen,
|
|
@@ -7395,10 +7405,10 @@ var _sfc_render = function render3() {
|
|
|
7395
7405
|
})], 2) : _vm._e(), _vm.checkMode === "drawer" ? _c("nf-drawer", {
|
|
7396
7406
|
ref: "columnCheckNfDrawer",
|
|
7397
7407
|
attrs: {
|
|
7398
|
-
"size": "680px",
|
|
7399
7408
|
"title": _vm.columnCheckTitle,
|
|
7400
7409
|
"cancel-button-text": _vm.columnCheckCancelButtonText,
|
|
7401
7410
|
"confirm-button-text": _vm.columnCheckConfirmButtonText,
|
|
7411
|
+
"size": "680px",
|
|
7402
7412
|
"visible": _vm.nfColumCheckDialogVisible,
|
|
7403
7413
|
"tabs": _vm.columnCheckTabs,
|
|
7404
7414
|
"destroy-on-close": true,
|
|
@@ -7424,13 +7434,13 @@ var _sfc_render = function render3() {
|
|
|
7424
7434
|
"clear-desc": _vm.columnCheckClearDesc,
|
|
7425
7435
|
"no-fixed-desc": _vm.columnCheckNoFixedDesc,
|
|
7426
7436
|
"basic-field-desc": _vm.columnCheckBasicFieldDesc,
|
|
7427
|
-
"
|
|
7437
|
+
"select-empty-warning-tips": _vm.selectEmptyWarningTips,
|
|
7428
7438
|
"get-checked-length-desc": _vm.columnCheckGetCheckedLengthDesc,
|
|
7429
7439
|
"get-all-check-desc": _vm.columnCheckGetAllCheckDesc,
|
|
7440
|
+
"column-edit": _vm.columnEdit,
|
|
7430
7441
|
"operation-prop-key": _vm.operationPropKey,
|
|
7431
7442
|
"storage-key": _vm.storageKey,
|
|
7432
|
-
"table-columns": _vm.columns
|
|
7433
|
-
"select-empty-warning-tips": _vm.selectEmptyWarningTips
|
|
7443
|
+
"table-columns": _vm.columns
|
|
7434
7444
|
}
|
|
7435
7445
|
})], 2) : _vm._e()], 2);
|
|
7436
7446
|
};
|
|
@@ -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,18 +5775,6 @@ const __sfc_main = defineComponent({
|
|
|
5769
5775
|
name: "nf-table"
|
|
5770
5776
|
});
|
|
5771
5777
|
__sfc_main.props = {
|
|
5772
|
-
dragCached: {
|
|
5773
|
-
key: "dragCached",
|
|
5774
|
-
required: false,
|
|
5775
|
-
type: Boolean,
|
|
5776
|
-
default: true
|
|
5777
|
-
},
|
|
5778
|
-
emptyImageSize: {
|
|
5779
|
-
key: "emptyImageSize",
|
|
5780
|
-
required: false,
|
|
5781
|
-
type: Number,
|
|
5782
|
-
default: 145
|
|
5783
|
-
},
|
|
5784
5778
|
data: {
|
|
5785
5779
|
key: "data",
|
|
5786
5780
|
required: false,
|
|
@@ -5835,6 +5829,18 @@ __sfc_main.props = {
|
|
|
5835
5829
|
type: Array,
|
|
5836
5830
|
default: () => []
|
|
5837
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
|
+
},
|
|
5838
5844
|
calHeight: {
|
|
5839
5845
|
key: "calHeight",
|
|
5840
5846
|
required: false,
|
|
@@ -5967,23 +5973,17 @@ __sfc_main.props = {
|
|
|
5967
5973
|
type: String,
|
|
5968
5974
|
default: "确定"
|
|
5969
5975
|
},
|
|
5970
|
-
|
|
5971
|
-
key: "
|
|
5972
|
-
required: false,
|
|
5973
|
-
type: String,
|
|
5974
|
-
default: "600px"
|
|
5975
|
-
},
|
|
5976
|
-
columnCheckConfirmText: {
|
|
5977
|
-
key: "columnCheckConfirmText",
|
|
5976
|
+
columnCheckBasicFieldDesc: {
|
|
5977
|
+
key: "columnCheckBasicFieldDesc",
|
|
5978
5978
|
required: false,
|
|
5979
5979
|
type: String,
|
|
5980
|
-
default: "
|
|
5980
|
+
default: "基础字段"
|
|
5981
5981
|
},
|
|
5982
|
-
|
|
5983
|
-
key: "
|
|
5982
|
+
columnCheckWidth: {
|
|
5983
|
+
key: "columnCheckWidth",
|
|
5984
5984
|
required: false,
|
|
5985
5985
|
type: String,
|
|
5986
|
-
default: "
|
|
5986
|
+
default: "600px"
|
|
5987
5987
|
},
|
|
5988
5988
|
columnCheckModalAppendToBody: {
|
|
5989
5989
|
key: "columnCheckModalAppendToBody",
|
|
@@ -6087,12 +6087,6 @@ __sfc_main.props = {
|
|
|
6087
6087
|
type: String,
|
|
6088
6088
|
default: "不固定"
|
|
6089
6089
|
},
|
|
6090
|
-
columnCheckBasicFieldDesc: {
|
|
6091
|
-
key: "columnCheckBasicFieldDesc",
|
|
6092
|
-
required: false,
|
|
6093
|
-
type: String,
|
|
6094
|
-
default: "基础字段"
|
|
6095
|
-
},
|
|
6096
6090
|
columnCheckGetCheckedLengthDesc: {
|
|
6097
6091
|
key: "columnCheckGetCheckedLengthDesc",
|
|
6098
6092
|
required: false,
|
|
@@ -6180,6 +6174,11 @@ __sfc_main.props = {
|
|
|
6180
6174
|
required: false,
|
|
6181
6175
|
type: String,
|
|
6182
6176
|
default: "operation"
|
|
6177
|
+
},
|
|
6178
|
+
searchForm: {
|
|
6179
|
+
key: "searchForm",
|
|
6180
|
+
required: true,
|
|
6181
|
+
type: null
|
|
6183
6182
|
}
|
|
6184
6183
|
};
|
|
6185
6184
|
__sfc_main.setup = (__props, __ctx) => {
|
|
@@ -6359,6 +6358,9 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6359
6358
|
console.log(e);
|
|
6360
6359
|
}
|
|
6361
6360
|
}
|
|
6361
|
+
if (props.dragCached) {
|
|
6362
|
+
await CachedManager.asyncCachedGet(`${props.storageKey}$drag-column-width`);
|
|
6363
|
+
}
|
|
6362
6364
|
};
|
|
6363
6365
|
const getMinWidth = (column) => {
|
|
6364
6366
|
const fs = 14;
|
|
@@ -6372,13 +6374,21 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6372
6374
|
};
|
|
6373
6375
|
const tableColumns = ref([]);
|
|
6374
6376
|
const elTableRefKey = ref(Date.now());
|
|
6375
|
-
const syncCookiesToTableColumn = async (readCached = true) => {
|
|
6377
|
+
const syncCookiesToTableColumn = async (readCached = true, init = false) => {
|
|
6376
6378
|
props.columns._skip = true;
|
|
6377
6379
|
const columns = props.columns.map((item, index2) => {
|
|
6380
|
+
var _a2;
|
|
6378
6381
|
const attr = item.attr || {};
|
|
6379
6382
|
if (!attr["min-width"] && item.label) {
|
|
6380
6383
|
attr["min-width"] = String(getMinWidth(item)) + "px";
|
|
6381
6384
|
}
|
|
6385
|
+
if (init && props.dragCached) {
|
|
6386
|
+
const prop = item.prop || ((_a2 = item.attr) == null ? void 0 : _a2.prop);
|
|
6387
|
+
let columnWidth = CachedManager.syncCachedGet(`${props.storageKey}$drag-column-width`) || {};
|
|
6388
|
+
if (columnWidth[prop]) {
|
|
6389
|
+
attr.width = columnWidth[prop];
|
|
6390
|
+
}
|
|
6391
|
+
}
|
|
6382
6392
|
item.attr = {
|
|
6383
6393
|
...item.attr,
|
|
6384
6394
|
...attr
|
|
@@ -6429,7 +6439,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6429
6439
|
};
|
|
6430
6440
|
const initColumn = async () => {
|
|
6431
6441
|
await initCachedData();
|
|
6432
|
-
syncCookiesToTableColumn();
|
|
6442
|
+
syncCookiesToTableColumn(true, true);
|
|
6433
6443
|
};
|
|
6434
6444
|
initColumn();
|
|
6435
6445
|
onBeforeMount(() => {
|
|
@@ -6560,6 +6570,11 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6560
6570
|
if (newWidth < minWidth) {
|
|
6561
6571
|
column.width = minWidth;
|
|
6562
6572
|
}
|
|
6573
|
+
if (props.dragCached) {
|
|
6574
|
+
const columnCachedData = await CachedManager.asyncCachedGet(`${props.storageKey}$drag-column-width`) || {};
|
|
6575
|
+
columnCachedData[column.property] = column.width;
|
|
6576
|
+
await CachedManager.asyncCachedSet(`${props.storageKey}$drag-column-width`, columnCachedData);
|
|
6577
|
+
}
|
|
6563
6578
|
await ((_b = (_a2 = props.tableEvents)["header-dragend"]) == null ? void 0 : _b.call(_a2, newWidth, oldWidth, column, event));
|
|
6564
6579
|
};
|
|
6565
6580
|
const columnCheckConfirmFeedback = (value) => {
|
|
@@ -6786,13 +6801,7 @@ var _sfc_render = function render3() {
|
|
|
6786
6801
|
}, [_vm._t("searchBox", function() {
|
|
6787
6802
|
var _a2;
|
|
6788
6803
|
return [_c("nf-search-form", _vm._g(_vm._b({
|
|
6789
|
-
ref: "nfSearchFormRef"
|
|
6790
|
-
attrs: {
|
|
6791
|
-
"operation-prop-key": _vm.operationPropKey,
|
|
6792
|
-
"storage-key": _vm.searchFormStorageKey,
|
|
6793
|
-
"property": _vm.priority,
|
|
6794
|
-
"select-empty-warning-tips": _vm.selectEmptyWarningTips
|
|
6795
|
-
}
|
|
6804
|
+
ref: "nfSearchFormRef"
|
|
6796
6805
|
}, "nf-search-form", _vm.searchFormAttrs, false), _vm.searchFormEvents), [_vm._l(((_a2 = _vm.nfSearchFormRef) == null ? void 0 : _a2.renderSearchFormItemOptions) || [], function(item) {
|
|
6797
6806
|
var _a3;
|
|
6798
6807
|
return [((_a3 = item.tooltip) == null ? void 0 : _a3.slot) ? [_vm._t(item.tooltip.slot, null, {
|
|
@@ -7357,14 +7366,15 @@ var _sfc_render = function render3() {
|
|
|
7357
7366
|
})], 2)], 2), _vm.nfColumCheckDialogVisible && _vm.checkMode === "dialog" ? _c("column-check-dialog", {
|
|
7358
7367
|
ref: "columnCheckDialog",
|
|
7359
7368
|
attrs: {
|
|
7369
|
+
"title": _vm.columnCheckTitle,
|
|
7370
|
+
"confirm-text": _vm.columnCheckConfirmButtonText,
|
|
7371
|
+
"cancel-text": _vm.columnCheckCancelButtonText,
|
|
7372
|
+
"basic-field-desc": _vm.columnCheckBasicFieldDesc,
|
|
7360
7373
|
"show": _vm.nfColumCheckDialogVisible,
|
|
7361
7374
|
"table-columns": _vm.columns,
|
|
7362
7375
|
"column-edit": _vm.columnEdit,
|
|
7363
7376
|
"storage-key": _vm.storageKey,
|
|
7364
|
-
"title": _vm.columnCheckTitle,
|
|
7365
7377
|
"width": _vm.columnCheckWidth,
|
|
7366
|
-
"confirm-text": _vm.columnCheckConfirmText,
|
|
7367
|
-
"cancel-text": _vm.columnCheckCancelText,
|
|
7368
7378
|
"modal-append-to-body": _vm.columnCheckModalAppendToBody,
|
|
7369
7379
|
"modal": _vm.columnCheckModal,
|
|
7370
7380
|
"fullscreen": _vm.columnCheckFullscreen,
|
|
@@ -7393,10 +7403,10 @@ var _sfc_render = function render3() {
|
|
|
7393
7403
|
})], 2) : _vm._e(), _vm.checkMode === "drawer" ? _c("nf-drawer", {
|
|
7394
7404
|
ref: "columnCheckNfDrawer",
|
|
7395
7405
|
attrs: {
|
|
7396
|
-
"size": "680px",
|
|
7397
7406
|
"title": _vm.columnCheckTitle,
|
|
7398
7407
|
"cancel-button-text": _vm.columnCheckCancelButtonText,
|
|
7399
7408
|
"confirm-button-text": _vm.columnCheckConfirmButtonText,
|
|
7409
|
+
"size": "680px",
|
|
7400
7410
|
"visible": _vm.nfColumCheckDialogVisible,
|
|
7401
7411
|
"tabs": _vm.columnCheckTabs,
|
|
7402
7412
|
"destroy-on-close": true,
|
|
@@ -7422,13 +7432,13 @@ var _sfc_render = function render3() {
|
|
|
7422
7432
|
"clear-desc": _vm.columnCheckClearDesc,
|
|
7423
7433
|
"no-fixed-desc": _vm.columnCheckNoFixedDesc,
|
|
7424
7434
|
"basic-field-desc": _vm.columnCheckBasicFieldDesc,
|
|
7425
|
-
"
|
|
7435
|
+
"select-empty-warning-tips": _vm.selectEmptyWarningTips,
|
|
7426
7436
|
"get-checked-length-desc": _vm.columnCheckGetCheckedLengthDesc,
|
|
7427
7437
|
"get-all-check-desc": _vm.columnCheckGetAllCheckDesc,
|
|
7438
|
+
"column-edit": _vm.columnEdit,
|
|
7428
7439
|
"operation-prop-key": _vm.operationPropKey,
|
|
7429
7440
|
"storage-key": _vm.storageKey,
|
|
7430
|
-
"table-columns": _vm.columns
|
|
7431
|
-
"select-empty-warning-tips": _vm.selectEmptyWarningTips
|
|
7441
|
+
"table-columns": _vm.columns
|
|
7432
7442
|
}
|
|
7433
7443
|
})], 2) : _vm._e()], 2);
|
|
7434
7444
|
};
|