@94ai/nf-table 6.1.1 → 6.1.7
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 +132 -131
- package/lib/nf-table.cjs.js +66 -241
- package/lib/nf-table.esm-bundler.js +61 -236
- package/lib/nf-table.vue.d.ts +135 -34
- package/lib/types.d.ts +0 -8
- package/package/nf-table.vue +116 -265
- package/package/types.ts +0 -16
- package/package.json +8 -10
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { defineComponent, getCurrentInstance, ref, computed, onMounted, onBeforeMount,
|
|
1
|
+
import { defineComponent, getCurrentInstance, ref, computed, onMounted, onBeforeMount, watch, nextTick, set } from "vue-demi";
|
|
2
2
|
import { CachedManager, deepClone } from "@94ai/common-utils";
|
|
3
3
|
import { normalizeComponent } from "@94ai/vue2-runtime-helpers";
|
|
4
4
|
import { Loading } from "element-ui";
|
|
5
|
-
import { getCurrentInstance as getCurrentInstance$1, effectScope, shallowReactive } from "vue";
|
|
6
5
|
import NfMessage from "@94ai/nf-message";
|
|
7
6
|
const __sfc_main$2 = defineComponent({
|
|
8
7
|
name: "NfColumnCheckDialog"
|
|
@@ -5773,32 +5772,6 @@ const _sfc_render$1 = null;
|
|
|
5773
5772
|
const _sfc_staticRenderFns$1 = null;
|
|
5774
5773
|
var __component__$1 = /* @__PURE__ */ normalizeComponent(_sfc_main, _sfc_render$1, _sfc_staticRenderFns$1, false, null, null, null, null);
|
|
5775
5774
|
const RenderComponent = __component__$1.exports;
|
|
5776
|
-
/*!
|
|
5777
|
-
* vue-router v3.6.4
|
|
5778
|
-
* (c) 2022 Evan You
|
|
5779
|
-
* @license MIT
|
|
5780
|
-
*/
|
|
5781
|
-
function throwNoCurrentInstance(method) {
|
|
5782
|
-
if (!getCurrentInstance$1()) {
|
|
5783
|
-
throw new Error("[vue-router]: Missing current instance. " + method + "() must be called inside <script setup> or setup().");
|
|
5784
|
-
}
|
|
5785
|
-
}
|
|
5786
|
-
function useRoute() {
|
|
5787
|
-
if (process.env.NODE_ENV !== "production") {
|
|
5788
|
-
throwNoCurrentInstance("useRoute");
|
|
5789
|
-
}
|
|
5790
|
-
var root = getCurrentInstance$1().proxy.$root;
|
|
5791
|
-
if (!root._$route) {
|
|
5792
|
-
var route = effectScope(true).run(function() {
|
|
5793
|
-
return shallowReactive(Object.assign({}, root.$router.currentRoute));
|
|
5794
|
-
});
|
|
5795
|
-
root._$route = route;
|
|
5796
|
-
root.$router.afterEach(function(to) {
|
|
5797
|
-
Object.assign(route, to);
|
|
5798
|
-
});
|
|
5799
|
-
}
|
|
5800
|
-
return root._$route;
|
|
5801
|
-
}
|
|
5802
5775
|
const __sfc_main = defineComponent({
|
|
5803
5776
|
name: "nf-table"
|
|
5804
5777
|
});
|
|
@@ -5857,30 +5830,6 @@ __sfc_main.props = {
|
|
|
5857
5830
|
type: Array,
|
|
5858
5831
|
default: () => []
|
|
5859
5832
|
},
|
|
5860
|
-
initSearchApi: {
|
|
5861
|
-
key: "initSearchApi",
|
|
5862
|
-
required: false,
|
|
5863
|
-
type: [Boolean, null],
|
|
5864
|
-
default: void 0
|
|
5865
|
-
},
|
|
5866
|
-
pageChangeSearchApi: {
|
|
5867
|
-
key: "pageChangeSearchApi",
|
|
5868
|
-
required: false,
|
|
5869
|
-
type: [Boolean, null],
|
|
5870
|
-
default: void 0
|
|
5871
|
-
},
|
|
5872
|
-
pageKeys: {
|
|
5873
|
-
key: "pageKeys",
|
|
5874
|
-
required: false,
|
|
5875
|
-
type: Array,
|
|
5876
|
-
default: () => ["pageNo", "pageSize"]
|
|
5877
|
-
},
|
|
5878
|
-
setEasyConf: {
|
|
5879
|
-
key: "setEasyConf",
|
|
5880
|
-
required: false,
|
|
5881
|
-
type: Boolean,
|
|
5882
|
-
default: false
|
|
5883
|
-
},
|
|
5884
5833
|
dragCached: {
|
|
5885
5834
|
key: "dragCached",
|
|
5886
5835
|
required: false,
|
|
@@ -5933,13 +5882,13 @@ __sfc_main.props = {
|
|
|
5933
5882
|
key: "storageKey",
|
|
5934
5883
|
required: false,
|
|
5935
5884
|
type: String,
|
|
5936
|
-
default: ""
|
|
5885
|
+
default: "nf-table-columns-cached-key"
|
|
5937
5886
|
},
|
|
5938
5887
|
searchFormStorageKey: {
|
|
5939
5888
|
key: "searchFormStorageKey",
|
|
5940
5889
|
required: false,
|
|
5941
5890
|
type: String,
|
|
5942
|
-
default: ""
|
|
5891
|
+
default: "nf-search-form-columns-cached-key"
|
|
5943
5892
|
},
|
|
5944
5893
|
showColumn: {
|
|
5945
5894
|
key: "showColumn",
|
|
@@ -6244,7 +6193,6 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6244
6193
|
}
|
|
6245
6194
|
return column.operationList || [];
|
|
6246
6195
|
};
|
|
6247
|
-
const routeName = computed(() => useRoute().name);
|
|
6248
6196
|
const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;
|
|
6249
6197
|
const elTableRef = ref();
|
|
6250
6198
|
const nfTableActionContainerRef = ref();
|
|
@@ -6258,28 +6206,6 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6258
6206
|
const columnCheckNfDrawer = ref();
|
|
6259
6207
|
const elTableHeight = ref();
|
|
6260
6208
|
const nfColumCheckDialogVisible = ref(false);
|
|
6261
|
-
const preSearchFormData = ref({});
|
|
6262
|
-
const cPageChangeSearchApi = ref(props.pageChangeSearchApi ?? props.setEasyConf);
|
|
6263
|
-
const cInitSearchApi = ref(props.initSearchApi ?? props.setEasyConf);
|
|
6264
|
-
const cStorageKey = ref(props.storageKey || `nf-table-columns-cached-key-${routeName.value}`);
|
|
6265
|
-
const cPageAttrs = reactive({
|
|
6266
|
-
// 页码,没有props时 & 允许分页时;默认 = 1
|
|
6267
|
-
"current-page": props.pageAttrs["current-page"] || (props.alwaysShowPage ? 1 : void 0),
|
|
6268
|
-
"page-size": props.pageAttrs["page-size"] || 10,
|
|
6269
|
-
pageKeys: props.pageKeys
|
|
6270
|
-
});
|
|
6271
|
-
const tableLoading = ref(false);
|
|
6272
|
-
const isLoading = computed(() => props.loading || tableLoading.value);
|
|
6273
|
-
const handleSizeChange = (val) => {
|
|
6274
|
-
cPageAttrs["page-size"] = val;
|
|
6275
|
-
if (cPageChangeSearchApi.value)
|
|
6276
|
-
onNfSearchFormSearch();
|
|
6277
|
-
};
|
|
6278
|
-
const handleCurrentChange = (val, isSearch = true) => {
|
|
6279
|
-
cPageAttrs["current-page"] = val;
|
|
6280
|
-
if (isSearch && cPageChangeSearchApi.value)
|
|
6281
|
-
onNfSearchFormSearch();
|
|
6282
|
-
};
|
|
6283
6209
|
const showData = computed(() => {
|
|
6284
6210
|
const pageSize = props.pageAttrs["page-size"];
|
|
6285
6211
|
const currentPage = props.pageAttrs["current-page"] || 1;
|
|
@@ -6300,10 +6226,10 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6300
6226
|
});
|
|
6301
6227
|
const loadingInstance = ref();
|
|
6302
6228
|
watch(() => {
|
|
6303
|
-
return props.loading
|
|
6229
|
+
return props.loading;
|
|
6304
6230
|
}, async () => {
|
|
6305
6231
|
var _a2, _b;
|
|
6306
|
-
if (props.loading
|
|
6232
|
+
if (props.loading) {
|
|
6307
6233
|
await nextTick();
|
|
6308
6234
|
const {
|
|
6309
6235
|
target,
|
|
@@ -6379,7 +6305,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6379
6305
|
index: index2
|
|
6380
6306
|
};
|
|
6381
6307
|
});
|
|
6382
|
-
return CachedManager.syncCachedSet(
|
|
6308
|
+
return CachedManager.syncCachedSet(props.storageKey, columnState);
|
|
6383
6309
|
}
|
|
6384
6310
|
};
|
|
6385
6311
|
const syncShowItemToInitHidden = () => {
|
|
@@ -6400,9 +6326,9 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6400
6326
|
const syncCookiesToLocalShowColumn = async () => {
|
|
6401
6327
|
if (props.columnEdit) {
|
|
6402
6328
|
try {
|
|
6403
|
-
let columnState = CachedManager.syncCachedGet(
|
|
6329
|
+
let columnState = CachedManager.syncCachedGet(props.storageKey);
|
|
6404
6330
|
if (!columnState) {
|
|
6405
|
-
columnState = await CachedManager.asyncCachedGet(
|
|
6331
|
+
columnState = await CachedManager.asyncCachedGet(props.storageKey);
|
|
6406
6332
|
}
|
|
6407
6333
|
if (columnState) {
|
|
6408
6334
|
if (typeof columnState === "string") {
|
|
@@ -6426,9 +6352,9 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6426
6352
|
var _a2, _b;
|
|
6427
6353
|
if (props.columnEdit) {
|
|
6428
6354
|
try {
|
|
6429
|
-
let cached = CachedManager.syncCachedGet(
|
|
6355
|
+
let cached = CachedManager.syncCachedGet(props.storageKey);
|
|
6430
6356
|
if (!cached) {
|
|
6431
|
-
cached = await CachedManager.asyncCachedGet(
|
|
6357
|
+
cached = await CachedManager.asyncCachedGet(props.storageKey);
|
|
6432
6358
|
}
|
|
6433
6359
|
const cachedPriority = props.priority === "cached";
|
|
6434
6360
|
if (cachedPriority ? cached : (_a2 = localShowColumn.value) == null ? void 0 : _a2.length) {
|
|
@@ -6441,7 +6367,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6441
6367
|
}
|
|
6442
6368
|
}
|
|
6443
6369
|
if (props.dragCached) {
|
|
6444
|
-
await CachedManager.asyncCachedGet(`${
|
|
6370
|
+
await CachedManager.asyncCachedGet(`${props.storageKey}$drag-column-width`);
|
|
6445
6371
|
}
|
|
6446
6372
|
};
|
|
6447
6373
|
const getMinWidth = (column) => {
|
|
@@ -6473,7 +6399,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6473
6399
|
}
|
|
6474
6400
|
if (props.dragCached) {
|
|
6475
6401
|
const prop = item.prop || ((_a2 = item.attr) == null ? void 0 : _a2.prop);
|
|
6476
|
-
let columnWidth = CachedManager.syncCachedGet(`${
|
|
6402
|
+
let columnWidth = CachedManager.syncCachedGet(`${props.storageKey}$drag-column-width`) || {};
|
|
6477
6403
|
if (columnWidth[prop]) {
|
|
6478
6404
|
attr.width = columnWidth[prop];
|
|
6479
6405
|
}
|
|
@@ -6488,29 +6414,13 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6488
6414
|
set(item, "initHidden", item.initHidden);
|
|
6489
6415
|
set(item, "destory", item.destory);
|
|
6490
6416
|
item.__index = index2;
|
|
6491
|
-
set(item, "optionsTag", {});
|
|
6492
|
-
if (item.getOptions) {
|
|
6493
|
-
set(item, "optionsEnum", {});
|
|
6494
|
-
item.getOptions((list) => {
|
|
6495
|
-
list.forEach((o) => {
|
|
6496
|
-
item.optionsEnum[o.value] = o.label;
|
|
6497
|
-
item.optionsTag[o.value] = o.tagType;
|
|
6498
|
-
});
|
|
6499
|
-
});
|
|
6500
|
-
} else if (item.options) {
|
|
6501
|
-
set(item, "optionsEnum", {});
|
|
6502
|
-
item.options.forEach((o) => {
|
|
6503
|
-
item.optionsEnum[o.value] = o.label;
|
|
6504
|
-
item.optionsTag[o.value] = o.tagType;
|
|
6505
|
-
});
|
|
6506
|
-
}
|
|
6507
6417
|
return item;
|
|
6508
6418
|
});
|
|
6509
6419
|
if (readCached && props.columnEdit) {
|
|
6510
6420
|
try {
|
|
6511
|
-
let columnState = CachedManager.syncCachedGet(
|
|
6421
|
+
let columnState = CachedManager.syncCachedGet(props.storageKey);
|
|
6512
6422
|
if (!columnState) {
|
|
6513
|
-
columnState = await CachedManager.asyncCachedGet(
|
|
6423
|
+
columnState = await CachedManager.asyncCachedGet(props.storageKey);
|
|
6514
6424
|
}
|
|
6515
6425
|
props.columns._skip = true;
|
|
6516
6426
|
if (columnState) {
|
|
@@ -6559,31 +6469,6 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6559
6469
|
}, {
|
|
6560
6470
|
deep: true
|
|
6561
6471
|
});
|
|
6562
|
-
watch(() => props.pageAttrs, (val) => {
|
|
6563
|
-
if ("current-page" in val) {
|
|
6564
|
-
cPageAttrs["current-page"] = Number(val["current-page"]);
|
|
6565
|
-
}
|
|
6566
|
-
if ("page-size" in val) {
|
|
6567
|
-
cPageAttrs["page-size"] = Number(val["page-size"]);
|
|
6568
|
-
}
|
|
6569
|
-
}, {
|
|
6570
|
-
deep: true
|
|
6571
|
-
});
|
|
6572
|
-
if (cInitSearchApi.value)
|
|
6573
|
-
onNfSearchFormSearch();
|
|
6574
|
-
});
|
|
6575
|
-
const searchFormAttrer = computed(() => {
|
|
6576
|
-
const obj = {
|
|
6577
|
-
...props.setEasyConf ? {
|
|
6578
|
-
labelWidth: 80,
|
|
6579
|
-
columns: 4,
|
|
6580
|
-
btnModel: "inline",
|
|
6581
|
-
columnEdit: true
|
|
6582
|
-
} : {},
|
|
6583
|
-
storageKey: props.searchFormStorageKey,
|
|
6584
|
-
...props.searchFormAttrs
|
|
6585
|
-
};
|
|
6586
|
-
return obj;
|
|
6587
6472
|
});
|
|
6588
6473
|
const tableAttrer = computed(() => {
|
|
6589
6474
|
const obj = {
|
|
@@ -6600,9 +6485,6 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6600
6485
|
resizable: true,
|
|
6601
6486
|
border: true,
|
|
6602
6487
|
stripe: window.nfTableStripe,
|
|
6603
|
-
...props.setEasyConf ? {
|
|
6604
|
-
"row-key": "id"
|
|
6605
|
-
} : {},
|
|
6606
6488
|
...props.tableAttrs
|
|
6607
6489
|
};
|
|
6608
6490
|
delete obj.data;
|
|
@@ -6631,16 +6513,13 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6631
6513
|
initPageSizes();
|
|
6632
6514
|
const pageAttrer = computed(() => {
|
|
6633
6515
|
var _a2;
|
|
6634
|
-
|
|
6516
|
+
return {
|
|
6635
6517
|
background: false,
|
|
6636
6518
|
layout: "total, sizes, prev, pager, next, jumper",
|
|
6637
6519
|
"page-sizes": pageSizes.value,
|
|
6638
6520
|
total: typeof props.pageAttrs.total === "undefined" ? (_a2 = props.data) == null ? void 0 : _a2.length : void 0,
|
|
6639
6521
|
...props.pageAttrs
|
|
6640
6522
|
};
|
|
6641
|
-
delete map["current-page"];
|
|
6642
|
-
delete map["page-size"];
|
|
6643
|
-
return map;
|
|
6644
6523
|
});
|
|
6645
6524
|
const isShow = (row) => {
|
|
6646
6525
|
if (row.type) {
|
|
@@ -6716,17 +6595,17 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6716
6595
|
column.width = minWidth;
|
|
6717
6596
|
}
|
|
6718
6597
|
if (props.dragCached) {
|
|
6719
|
-
const columnCachedData = await CachedManager.asyncCachedGet(`${
|
|
6598
|
+
const columnCachedData = await CachedManager.asyncCachedGet(`${props.storageKey}$drag-column-width`) || {};
|
|
6720
6599
|
columnCachedData[column.property] = column.width;
|
|
6721
|
-
await CachedManager.asyncCachedSet(`${
|
|
6600
|
+
await CachedManager.asyncCachedSet(`${props.storageKey}$drag-column-width`, columnCachedData);
|
|
6722
6601
|
}
|
|
6723
6602
|
await ((_b = (_a2 = props.tableEvents)["header-dragend"]) == null ? void 0 : _b.call(_a2, newWidth, oldWidth, column, event));
|
|
6724
6603
|
};
|
|
6725
6604
|
async function clearDragCached() {
|
|
6726
|
-
await CachedManager.asyncCachedSet(`${
|
|
6605
|
+
await CachedManager.asyncCachedSet(`${props.storageKey}$drag-column-width`, null);
|
|
6727
6606
|
}
|
|
6728
6607
|
async function clearColumnEditCached() {
|
|
6729
|
-
await CachedManager.asyncCachedSet(
|
|
6608
|
+
await CachedManager.asyncCachedSet(props.storageKey, null);
|
|
6730
6609
|
}
|
|
6731
6610
|
const columnCheckConfirmFeedback = (value) => {
|
|
6732
6611
|
if (!props.columnEdit) {
|
|
@@ -6772,30 +6651,6 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6772
6651
|
elTableHeight.value = (_b = props.tableAttrs) == null ? void 0 : _b.height;
|
|
6773
6652
|
}
|
|
6774
6653
|
};
|
|
6775
|
-
const searchApi = async (formData = {}) => {
|
|
6776
|
-
var _a2, _b, _c;
|
|
6777
|
-
(_b = (_a2 = props.searchFormEvents) == null ? void 0 : _a2["onSearch"]) == null ? void 0 : _b.call(_a2, formData);
|
|
6778
|
-
if (!((_c = instance == null ? void 0 : instance.$listeners) == null ? void 0 : _c.searchApi))
|
|
6779
|
-
return;
|
|
6780
|
-
tableLoading.value = true;
|
|
6781
|
-
if (JSON.stringify(preSearchFormData.value) !== JSON.stringify(formData)) {
|
|
6782
|
-
handleCurrentChange(1, false);
|
|
6783
|
-
}
|
|
6784
|
-
preSearchFormData.value = formData;
|
|
6785
|
-
await nextTick();
|
|
6786
|
-
emit("searchApi", {
|
|
6787
|
-
data: {
|
|
6788
|
-
...formData,
|
|
6789
|
-
...props.alwaysShowPage ? {
|
|
6790
|
-
[cPageAttrs.pageKeys[0]]: cPageAttrs["current-page"],
|
|
6791
|
-
[cPageAttrs.pageKeys[1]]: cPageAttrs["page-size"]
|
|
6792
|
-
} : {}
|
|
6793
|
-
},
|
|
6794
|
-
callback: () => {
|
|
6795
|
-
tableLoading.value = false;
|
|
6796
|
-
}
|
|
6797
|
-
});
|
|
6798
|
-
};
|
|
6799
6654
|
onMounted(() => {
|
|
6800
6655
|
calcTableHeight();
|
|
6801
6656
|
props.columns.forEach((i) => {
|
|
@@ -6819,16 +6674,11 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6819
6674
|
columnCheckNfDrawer,
|
|
6820
6675
|
elTableHeight,
|
|
6821
6676
|
nfColumCheckDialogVisible,
|
|
6822
|
-
cStorageKey,
|
|
6823
|
-
cPageAttrs,
|
|
6824
|
-
handleSizeChange,
|
|
6825
|
-
handleCurrentChange,
|
|
6826
6677
|
showData,
|
|
6827
6678
|
hasOperationSlot,
|
|
6828
6679
|
hasActionBarSlot,
|
|
6829
6680
|
tableColumns,
|
|
6830
6681
|
elTableRefKey,
|
|
6831
|
-
searchFormAttrer,
|
|
6832
6682
|
tableAttrer,
|
|
6833
6683
|
tableEventer,
|
|
6834
6684
|
renderPage,
|
|
@@ -6837,7 +6687,6 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6837
6687
|
getActionBarItemStyle,
|
|
6838
6688
|
fieldsConfirm,
|
|
6839
6689
|
columnCheckConfirm,
|
|
6840
|
-
searchApi,
|
|
6841
6690
|
nfTableBorder
|
|
6842
6691
|
}, {
|
|
6843
6692
|
/**
|
|
@@ -6952,10 +6801,6 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6952
6801
|
* 渲染表格项数据
|
|
6953
6802
|
*/
|
|
6954
6803
|
tableColumns,
|
|
6955
|
-
/**
|
|
6956
|
-
* 表格loading
|
|
6957
|
-
*/
|
|
6958
|
-
isLoading,
|
|
6959
6804
|
/**
|
|
6960
6805
|
* 计算表格高度
|
|
6961
6806
|
*/
|
|
@@ -6992,11 +6837,8 @@ var _sfc_render = function render3() {
|
|
|
6992
6837
|
}, [_vm._t("searchBox", function() {
|
|
6993
6838
|
var _a2;
|
|
6994
6839
|
return [_c("nf-search-form", _vm._g(_vm._b({
|
|
6995
|
-
ref: "nfSearchFormRef"
|
|
6996
|
-
|
|
6997
|
-
"onSearch": _vm.searchApi
|
|
6998
|
-
}
|
|
6999
|
-
}, "nf-search-form", _vm.searchFormAttrer, false), _vm.searchFormEvents), [_vm._l(((_a2 = _vm.nfSearchFormRef) == null ? void 0 : _a2.renderSearchFormItemOptions) || [], function(item) {
|
|
6840
|
+
ref: "nfSearchFormRef"
|
|
6841
|
+
}, "nf-search-form", _vm.searchFormAttrs, false), _vm.searchFormEvents), [_vm._l(((_a2 = _vm.nfSearchFormRef) == null ? void 0 : _a2.renderSearchFormItemOptions) || [], function(item) {
|
|
7000
6842
|
var _a3, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B;
|
|
7001
6843
|
return [((_a3 = item.tooltip) == null ? void 0 : _a3.slot) ? _vm._t(item.tooltip.slot, null, {
|
|
7002
6844
|
"slot": item.tooltip.slot
|
|
@@ -7065,11 +6907,16 @@ var _sfc_render = function render3() {
|
|
|
7065
6907
|
"height": _vm.elTableHeight
|
|
7066
6908
|
}
|
|
7067
6909
|
}, "el-table", _vm.tableAttrer, false), _vm.tableEventer), [_vm._l(_vm.tableColumns, function(column) {
|
|
7068
|
-
return [
|
|
6910
|
+
return [_vm.isShow(column) ? [column.type ? [column.type !== "expand" ? _c("el-table-column", _vm._b({
|
|
6911
|
+
key: column.key || column.prop || column.type,
|
|
6912
|
+
attrs: {
|
|
6913
|
+
"type": column.type,
|
|
6914
|
+
"label": column.label
|
|
6915
|
+
}
|
|
6916
|
+
}, "el-table-column", column.attr, false)) : _c("el-table-column", _vm._b({
|
|
7069
6917
|
key: column.key || column.prop || column.type,
|
|
7070
6918
|
attrs: {
|
|
7071
6919
|
"type": column.type,
|
|
7072
|
-
"prop": column.prop,
|
|
7073
6920
|
"label": column.label
|
|
7074
6921
|
},
|
|
7075
6922
|
scopedSlots: _vm._u([{
|
|
@@ -7081,22 +6928,35 @@ var _sfc_render = function render3() {
|
|
|
7081
6928
|
})] : void 0;
|
|
7082
6929
|
}
|
|
7083
6930
|
}], null, true)
|
|
7084
|
-
}, "el-table-column", column.attr, false)
|
|
7085
|
-
key: column.key || column.prop
|
|
6931
|
+
}, "el-table-column", column.attr, false))] : [column.attr && column.attr.formatter ? _c("el-table-column", _vm._b({
|
|
6932
|
+
key: column.key || column.prop,
|
|
7086
6933
|
attrs: {
|
|
7087
|
-
"type": column.type,
|
|
7088
6934
|
"prop": column.prop,
|
|
7089
6935
|
"label": column.label
|
|
7090
6936
|
},
|
|
7091
6937
|
scopedSlots: _vm._u([{
|
|
7092
6938
|
key: "header",
|
|
7093
6939
|
fn: function(scope) {
|
|
7094
|
-
return [
|
|
7095
|
-
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
|
|
6940
|
+
return [column.headerSlot ? [_vm._t(column.headerSlot, null, {
|
|
6941
|
+
"$index": scope.$index,
|
|
6942
|
+
"column": scope.column
|
|
6943
|
+
})] : _c("span", [_vm._v(" " + _vm._s(column.label) + " ")])];
|
|
6944
|
+
}
|
|
6945
|
+
}], null, true)
|
|
6946
|
+
}, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2) : _c("el-table-column", _vm._b({
|
|
6947
|
+
key: column.key || column.prop,
|
|
6948
|
+
attrs: {
|
|
6949
|
+
"prop": column.prop,
|
|
6950
|
+
"label": column.label
|
|
6951
|
+
},
|
|
6952
|
+
scopedSlots: _vm._u([{
|
|
6953
|
+
key: "header",
|
|
6954
|
+
fn: function(scope) {
|
|
6955
|
+
return [column.headerSlot ? [_vm._t(column.headerSlot, null, {
|
|
6956
|
+
"$index": scope.$index,
|
|
6957
|
+
"column": scope.column
|
|
6958
|
+
})] : _c("span", [_vm._v(" " + _vm._s(column.label) + " ")]), column.prop === _vm.operationPropKey && _vm.columnEdit && _vm.columnPosition === "embed" ? _vm._t("operationIconColumnCheck", function() {
|
|
6959
|
+
return [_c("el-tooltip", {
|
|
7100
6960
|
attrs: {
|
|
7101
6961
|
"popper-class": "actionTooltipRef",
|
|
7102
6962
|
"placement": "top",
|
|
@@ -7113,43 +6973,20 @@ var _sfc_render = function render3() {
|
|
|
7113
6973
|
})])];
|
|
7114
6974
|
}, {
|
|
7115
6975
|
"column": column
|
|
7116
|
-
}) :
|
|
7117
|
-
staticStyle: {
|
|
7118
|
-
"white-space": "nowrap"
|
|
7119
|
-
}
|
|
7120
|
-
}, [_vm._v(" " + _vm._s(column.label) + " ")]), _c("el-tooltip", {
|
|
7121
|
-
attrs: {
|
|
7122
|
-
"placement": "right",
|
|
7123
|
-
"effect": "light"
|
|
7124
|
-
}
|
|
7125
|
-
}, [_c("div", {
|
|
7126
|
-
attrs: {
|
|
7127
|
-
"slot": "content"
|
|
7128
|
-
},
|
|
7129
|
-
slot: "content"
|
|
7130
|
-
}, [_vm._v(_vm._s(column.labelTooltip))]), _c("i", {
|
|
7131
|
-
staticClass: "iconfont icon-bangzhuzhongxin",
|
|
7132
|
-
staticStyle: {
|
|
7133
|
-
"font-weight": "normal"
|
|
7134
|
-
}
|
|
7135
|
-
})])] : column.headerSlot ? [_vm._t(column.headerSlot, null, {
|
|
7136
|
-
"$index": scope.$index,
|
|
7137
|
-
"column": scope.column
|
|
7138
|
-
})] : _c("span", [_vm._v(" " + _vm._s(column.label) + " ")])];
|
|
6976
|
+
}) : _vm._e()];
|
|
7139
6977
|
}
|
|
7140
6978
|
}, {
|
|
7141
6979
|
key: "default",
|
|
7142
6980
|
fn: function(scope) {
|
|
7143
|
-
|
|
7144
|
-
return [column.slot ? _vm._t(column.slot, null, {
|
|
7145
|
-
"row": scope.row,
|
|
7146
|
-
"index": scope.$index
|
|
7147
|
-
}) : column.render ? _c("render-component", {
|
|
6981
|
+
return [column.render ? _c("render-component", {
|
|
7148
6982
|
attrs: {
|
|
7149
6983
|
"render": column.render,
|
|
7150
6984
|
"row": scope.row
|
|
7151
6985
|
}
|
|
7152
|
-
}) : column.
|
|
6986
|
+
}) : [column.slot ? _vm._t(column.slot, null, {
|
|
6987
|
+
"row": scope.row,
|
|
6988
|
+
"index": scope.$index
|
|
6989
|
+
}) : [column.prop === _vm.operationPropKey && !_vm.hasOperationSlot ? _vm._l(_vm.getOperationListLocal(column, scope), function(item, index2) {
|
|
7153
6990
|
return _c("nf-button", _vm._g({
|
|
7154
6991
|
key: item.key || index2,
|
|
7155
6992
|
class: item.class,
|
|
@@ -7165,14 +7002,10 @@ var _sfc_render = function render3() {
|
|
|
7165
7002
|
"circle": item.circle
|
|
7166
7003
|
}
|
|
7167
7004
|
}, item.events), [_vm._v(_vm._s(item.text) + " ")]);
|
|
7168
|
-
}) :
|
|
7169
|
-
attrs: {
|
|
7170
|
-
"type": column.optionsTag[scope.row[column.prop]]
|
|
7171
|
-
}
|
|
7172
|
-
}, [_vm._v(_vm._s(column.optionsEnum[scope.row[column.prop]]))]) : _c("span", [_vm._v(" " + _vm._s(column.optionsEnum[scope.row[column.prop]]) + " ")])] : _c("span", [_vm._v(" " + _vm._s(scope.row[column.prop]) + _vm._s(column.unit) + " ")])];
|
|
7005
|
+
}) : _c("span", [_vm._v(_vm._s(scope.row[column.prop]))])]]];
|
|
7173
7006
|
}
|
|
7174
7007
|
}], null, true)
|
|
7175
|
-
}, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2) : _vm._e()];
|
|
7008
|
+
}, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2)]] : _vm._e()];
|
|
7176
7009
|
}), _vm._t("append", null, {
|
|
7177
7010
|
"slot": "append"
|
|
7178
7011
|
}), _vm._t("empty", function() {
|
|
@@ -7566,15 +7399,7 @@ var _sfc_render = function render3() {
|
|
|
7566
7399
|
}), _vm._t("pagination", function() {
|
|
7567
7400
|
return [_vm.renderPage ? _c("el-pagination", _vm._g(_vm._b({
|
|
7568
7401
|
ref: "nfTablePaginationRef",
|
|
7569
|
-
staticClass: "nf-pagination-box nf-fr"
|
|
7570
|
-
attrs: {
|
|
7571
|
-
"current-page": _vm.cPageAttrs["current-page"],
|
|
7572
|
-
"page-size": _vm.cPageAttrs["page-size"]
|
|
7573
|
-
},
|
|
7574
|
-
on: {
|
|
7575
|
-
"size-change": _vm.handleSizeChange,
|
|
7576
|
-
"current-change": _vm.handleCurrentChange
|
|
7577
|
-
}
|
|
7402
|
+
staticClass: "nf-pagination-box nf-fr"
|
|
7578
7403
|
}, "el-pagination", _vm.pageAttrer, false), _vm.pageEvents)) : _vm._e()];
|
|
7579
7404
|
})], 2)], 2), _vm.nfColumCheckDialogVisible && _vm.checkMode === "dialog" ? _c("column-check-dialog", {
|
|
7580
7405
|
ref: "columnCheckDialog",
|
|
@@ -7586,7 +7411,7 @@ var _sfc_render = function render3() {
|
|
|
7586
7411
|
"show": _vm.nfColumCheckDialogVisible,
|
|
7587
7412
|
"table-columns": _vm.columns,
|
|
7588
7413
|
"column-edit": _vm.columnEdit,
|
|
7589
|
-
"storage-key": _vm.
|
|
7414
|
+
"storage-key": _vm.storageKey,
|
|
7590
7415
|
"width": _vm.columnCheckWidth,
|
|
7591
7416
|
"modal-append-to-body": _vm.columnCheckModalAppendToBody,
|
|
7592
7417
|
"modal": _vm.columnCheckModal,
|
|
@@ -7650,7 +7475,7 @@ var _sfc_render = function render3() {
|
|
|
7650
7475
|
"get-all-check-desc": _vm.columnCheckGetAllCheckDesc,
|
|
7651
7476
|
"column-edit": _vm.columnEdit,
|
|
7652
7477
|
"operation-prop-key": _vm.operationPropKey,
|
|
7653
|
-
"storage-key": _vm.
|
|
7478
|
+
"storage-key": _vm.storageKey,
|
|
7654
7479
|
"table-columns": _vm.columns
|
|
7655
7480
|
}
|
|
7656
7481
|
})], 2) : _vm._e()], 2);
|