@94ai/nf-table 3.3.44 → 3.3.50
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 +12 -12
- package/lib/nf-table.cjs.js +20 -7
- package/lib/nf-table.esm-bundler.js +20 -7
- package/lib/nf-table.vue.d.ts +4 -4
- package/package/nf-table.vue +31 -14
- package/package.json +8 -8
package/lib/index.d.ts
CHANGED
|
@@ -234,11 +234,11 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
|
|
|
234
234
|
};
|
|
235
235
|
columnCheckGetCheckedLengthDesc: {
|
|
236
236
|
type: import("vue-demi").PropType<any>;
|
|
237
|
-
default: (length: any) => string;
|
|
237
|
+
default: (length: any) => (length: any) => string;
|
|
238
238
|
};
|
|
239
239
|
columnCheckGetAllCheckDesc: {
|
|
240
240
|
type: import("vue-demi").PropType<any>;
|
|
241
|
-
default: (length: any) => string;
|
|
241
|
+
default: (length: any) => (length: any) => string;
|
|
242
242
|
};
|
|
243
243
|
columnCheckTabs: {
|
|
244
244
|
type: import("vue-demi").PropType<import("@94ai/nf-drawer/lib/types").ITabItem[]>;
|
|
@@ -501,11 +501,11 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
|
|
|
501
501
|
};
|
|
502
502
|
columnCheckGetCheckedLengthDesc: {
|
|
503
503
|
type: import("vue-demi").PropType<any>;
|
|
504
|
-
default: (length: any) => string;
|
|
504
|
+
default: (length: any) => (length: any) => string;
|
|
505
505
|
};
|
|
506
506
|
columnCheckGetAllCheckDesc: {
|
|
507
507
|
type: import("vue-demi").PropType<any>;
|
|
508
|
-
default: (length: any) => string;
|
|
508
|
+
default: (length: any) => (length: any) => string;
|
|
509
509
|
};
|
|
510
510
|
columnCheckTabs: {
|
|
511
511
|
type: import("vue-demi").PropType<import("@94ai/nf-drawer/lib/types").ITabItem[]>;
|
|
@@ -837,11 +837,11 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
|
|
|
837
837
|
};
|
|
838
838
|
columnCheckGetCheckedLengthDesc: {
|
|
839
839
|
type: import("vue-demi").PropType<any>;
|
|
840
|
-
default: (length: any) => string;
|
|
840
|
+
default: (length: any) => (length: any) => string;
|
|
841
841
|
};
|
|
842
842
|
columnCheckGetAllCheckDesc: {
|
|
843
843
|
type: import("vue-demi").PropType<any>;
|
|
844
|
-
default: (length: any) => string;
|
|
844
|
+
default: (length: any) => (length: any) => string;
|
|
845
845
|
};
|
|
846
846
|
columnCheckTabs: {
|
|
847
847
|
type: import("vue-demi").PropType<import("@94ai/nf-drawer/lib/types").ITabItem[]>;
|
|
@@ -1184,11 +1184,11 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
|
|
|
1184
1184
|
};
|
|
1185
1185
|
columnCheckGetCheckedLengthDesc: {
|
|
1186
1186
|
type: import("vue-demi").PropType<any>;
|
|
1187
|
-
default: (length: any) => string;
|
|
1187
|
+
default: (length: any) => (length: any) => string;
|
|
1188
1188
|
};
|
|
1189
1189
|
columnCheckGetAllCheckDesc: {
|
|
1190
1190
|
type: import("vue-demi").PropType<any>;
|
|
1191
|
-
default: (length: any) => string;
|
|
1191
|
+
default: (length: any) => (length: any) => string;
|
|
1192
1192
|
};
|
|
1193
1193
|
columnCheckTabs: {
|
|
1194
1194
|
type: import("vue-demi").PropType<import("@94ai/nf-drawer/lib/types").ITabItem[]>;
|
|
@@ -1451,11 +1451,11 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
|
|
|
1451
1451
|
};
|
|
1452
1452
|
columnCheckGetCheckedLengthDesc: {
|
|
1453
1453
|
type: import("vue-demi").PropType<any>;
|
|
1454
|
-
default: (length: any) => string;
|
|
1454
|
+
default: (length: any) => (length: any) => string;
|
|
1455
1455
|
};
|
|
1456
1456
|
columnCheckGetAllCheckDesc: {
|
|
1457
1457
|
type: import("vue-demi").PropType<any>;
|
|
1458
|
-
default: (length: any) => string;
|
|
1458
|
+
default: (length: any) => (length: any) => string;
|
|
1459
1459
|
};
|
|
1460
1460
|
columnCheckTabs: {
|
|
1461
1461
|
type: import("vue-demi").PropType<import("@94ai/nf-drawer/lib/types").ITabItem[]>;
|
|
@@ -1868,11 +1868,11 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
|
|
|
1868
1868
|
};
|
|
1869
1869
|
columnCheckGetCheckedLengthDesc: {
|
|
1870
1870
|
type: import("vue-demi").PropType<any>;
|
|
1871
|
-
default: (length: any) => string;
|
|
1871
|
+
default: (length: any) => (length: any) => string;
|
|
1872
1872
|
};
|
|
1873
1873
|
columnCheckGetAllCheckDesc: {
|
|
1874
1874
|
type: import("vue-demi").PropType<any>;
|
|
1875
|
-
default: (length: any) => string;
|
|
1875
|
+
default: (length: any) => (length: any) => string;
|
|
1876
1876
|
};
|
|
1877
1877
|
columnCheckTabs: {
|
|
1878
1878
|
type: import("vue-demi").PropType<import("@94ai/nf-drawer/lib/types").ITabItem[]>;
|
package/lib/nf-table.cjs.js
CHANGED
|
@@ -6093,13 +6093,13 @@ __sfc_main.props = {
|
|
|
6093
6093
|
key: "columnCheckGetCheckedLengthDesc",
|
|
6094
6094
|
required: false,
|
|
6095
6095
|
type: null,
|
|
6096
|
-
default: (length) => "已选(" +
|
|
6096
|
+
default: (length) => (length2) => "已选(" + length2 + ")"
|
|
6097
6097
|
},
|
|
6098
6098
|
columnCheckGetAllCheckDesc: {
|
|
6099
6099
|
key: "columnCheckGetAllCheckDesc",
|
|
6100
6100
|
required: false,
|
|
6101
6101
|
type: null,
|
|
6102
|
-
default: (length) => "全选(" +
|
|
6102
|
+
default: (length) => (length2) => "全选(" + length2 + ")"
|
|
6103
6103
|
},
|
|
6104
6104
|
columnCheckTabs: {
|
|
6105
6105
|
key: "columnCheckTabs",
|
|
@@ -6182,6 +6182,12 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6182
6182
|
var _a;
|
|
6183
6183
|
const props = __props;
|
|
6184
6184
|
const emit = __ctx.emit;
|
|
6185
|
+
const getOperationListLocal = (column, scope) => {
|
|
6186
|
+
if (typeof column.operationList === "function") {
|
|
6187
|
+
return column.operationList(scope);
|
|
6188
|
+
}
|
|
6189
|
+
return column.operationList || [];
|
|
6190
|
+
};
|
|
6185
6191
|
const instance = (_a = vueDemi.getCurrentInstance()) == null ? void 0 : _a.proxy;
|
|
6186
6192
|
const elTableRef = vueDemi.ref();
|
|
6187
6193
|
const nfTableActionContainerRef = vueDemi.ref();
|
|
@@ -6640,6 +6646,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6640
6646
|
});
|
|
6641
6647
|
});
|
|
6642
6648
|
return Object.assign({
|
|
6649
|
+
getOperationListLocal,
|
|
6643
6650
|
elTableRef,
|
|
6644
6651
|
nfTableActionContainerRef,
|
|
6645
6652
|
nfTablePaginationRef,
|
|
@@ -6863,7 +6870,13 @@ var _sfc_render = function render3() {
|
|
|
6863
6870
|
"height": _vm.elTableHeight
|
|
6864
6871
|
}
|
|
6865
6872
|
}, "el-table", _vm.tableAttrer, false), _vm.tableEventer), [_vm._l(_vm.tableColumns, function(column) {
|
|
6866
|
-
return [_vm.isShow(column) ? [column.type ? _c("el-table-column", _vm._b({
|
|
6873
|
+
return [_vm.isShow(column) ? [column.type ? [column.type !== "expand" ? _c("el-table-column", _vm._b({
|
|
6874
|
+
key: column.key || column.prop || column.type,
|
|
6875
|
+
attrs: {
|
|
6876
|
+
"type": column.type,
|
|
6877
|
+
"label": column.label
|
|
6878
|
+
}
|
|
6879
|
+
}, "el-table-column", column.attr, false)) : _c("el-table-column", _vm._b({
|
|
6867
6880
|
key: column.key || column.prop || column.type,
|
|
6868
6881
|
attrs: {
|
|
6869
6882
|
"type": column.type,
|
|
@@ -6872,13 +6885,13 @@ var _sfc_render = function render3() {
|
|
|
6872
6885
|
scopedSlots: _vm._u([{
|
|
6873
6886
|
key: "default",
|
|
6874
6887
|
fn: function(scope) {
|
|
6875
|
-
return column.
|
|
6888
|
+
return column.slot ? [_vm._t(column.slot, null, {
|
|
6876
6889
|
"row": scope.row,
|
|
6877
6890
|
"index": scope.$index
|
|
6878
|
-
})
|
|
6891
|
+
})] : void 0;
|
|
6879
6892
|
}
|
|
6880
6893
|
}], null, true)
|
|
6881
|
-
}, "el-table-column", column.attr, false)) : [column.attr && column.attr.formatter ? _c("el-table-column", _vm._b({
|
|
6894
|
+
}, "el-table-column", column.attr, false))] : [column.attr && column.attr.formatter ? _c("el-table-column", _vm._b({
|
|
6882
6895
|
key: column.key || column.prop,
|
|
6883
6896
|
attrs: {
|
|
6884
6897
|
"prop": column.prop,
|
|
@@ -6936,7 +6949,7 @@ var _sfc_render = function render3() {
|
|
|
6936
6949
|
}) : [column.slot ? _vm._t(column.slot, null, {
|
|
6937
6950
|
"row": scope.row,
|
|
6938
6951
|
"index": scope.$index
|
|
6939
|
-
}) : [column.prop === _vm.operationPropKey && !_vm.hasOperationSlot ? _vm._l(column
|
|
6952
|
+
}) : [column.prop === _vm.operationPropKey && !_vm.hasOperationSlot ? _vm._l(_vm.getOperationListLocal(column, scope), function(item, index2) {
|
|
6940
6953
|
return _c("nf-button", _vm._g({
|
|
6941
6954
|
key: item.key || index2,
|
|
6942
6955
|
class: item.class,
|
|
@@ -6091,13 +6091,13 @@ __sfc_main.props = {
|
|
|
6091
6091
|
key: "columnCheckGetCheckedLengthDesc",
|
|
6092
6092
|
required: false,
|
|
6093
6093
|
type: null,
|
|
6094
|
-
default: (length) => "已选(" +
|
|
6094
|
+
default: (length) => (length2) => "已选(" + length2 + ")"
|
|
6095
6095
|
},
|
|
6096
6096
|
columnCheckGetAllCheckDesc: {
|
|
6097
6097
|
key: "columnCheckGetAllCheckDesc",
|
|
6098
6098
|
required: false,
|
|
6099
6099
|
type: null,
|
|
6100
|
-
default: (length) => "全选(" +
|
|
6100
|
+
default: (length) => (length2) => "全选(" + length2 + ")"
|
|
6101
6101
|
},
|
|
6102
6102
|
columnCheckTabs: {
|
|
6103
6103
|
key: "columnCheckTabs",
|
|
@@ -6180,6 +6180,12 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6180
6180
|
var _a;
|
|
6181
6181
|
const props = __props;
|
|
6182
6182
|
const emit = __ctx.emit;
|
|
6183
|
+
const getOperationListLocal = (column, scope) => {
|
|
6184
|
+
if (typeof column.operationList === "function") {
|
|
6185
|
+
return column.operationList(scope);
|
|
6186
|
+
}
|
|
6187
|
+
return column.operationList || [];
|
|
6188
|
+
};
|
|
6183
6189
|
const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;
|
|
6184
6190
|
const elTableRef = ref();
|
|
6185
6191
|
const nfTableActionContainerRef = ref();
|
|
@@ -6638,6 +6644,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6638
6644
|
});
|
|
6639
6645
|
});
|
|
6640
6646
|
return Object.assign({
|
|
6647
|
+
getOperationListLocal,
|
|
6641
6648
|
elTableRef,
|
|
6642
6649
|
nfTableActionContainerRef,
|
|
6643
6650
|
nfTablePaginationRef,
|
|
@@ -6861,7 +6868,13 @@ var _sfc_render = function render3() {
|
|
|
6861
6868
|
"height": _vm.elTableHeight
|
|
6862
6869
|
}
|
|
6863
6870
|
}, "el-table", _vm.tableAttrer, false), _vm.tableEventer), [_vm._l(_vm.tableColumns, function(column) {
|
|
6864
|
-
return [_vm.isShow(column) ? [column.type ? _c("el-table-column", _vm._b({
|
|
6871
|
+
return [_vm.isShow(column) ? [column.type ? [column.type !== "expand" ? _c("el-table-column", _vm._b({
|
|
6872
|
+
key: column.key || column.prop || column.type,
|
|
6873
|
+
attrs: {
|
|
6874
|
+
"type": column.type,
|
|
6875
|
+
"label": column.label
|
|
6876
|
+
}
|
|
6877
|
+
}, "el-table-column", column.attr, false)) : _c("el-table-column", _vm._b({
|
|
6865
6878
|
key: column.key || column.prop || column.type,
|
|
6866
6879
|
attrs: {
|
|
6867
6880
|
"type": column.type,
|
|
@@ -6870,13 +6883,13 @@ var _sfc_render = function render3() {
|
|
|
6870
6883
|
scopedSlots: _vm._u([{
|
|
6871
6884
|
key: "default",
|
|
6872
6885
|
fn: function(scope) {
|
|
6873
|
-
return column.
|
|
6886
|
+
return column.slot ? [_vm._t(column.slot, null, {
|
|
6874
6887
|
"row": scope.row,
|
|
6875
6888
|
"index": scope.$index
|
|
6876
|
-
})
|
|
6889
|
+
})] : void 0;
|
|
6877
6890
|
}
|
|
6878
6891
|
}], null, true)
|
|
6879
|
-
}, "el-table-column", column.attr, false)) : [column.attr && column.attr.formatter ? _c("el-table-column", _vm._b({
|
|
6892
|
+
}, "el-table-column", column.attr, false))] : [column.attr && column.attr.formatter ? _c("el-table-column", _vm._b({
|
|
6880
6893
|
key: column.key || column.prop,
|
|
6881
6894
|
attrs: {
|
|
6882
6895
|
"prop": column.prop,
|
|
@@ -6934,7 +6947,7 @@ var _sfc_render = function render3() {
|
|
|
6934
6947
|
}) : [column.slot ? _vm._t(column.slot, null, {
|
|
6935
6948
|
"row": scope.row,
|
|
6936
6949
|
"index": scope.$index
|
|
6937
|
-
}) : [column.prop === _vm.operationPropKey && !_vm.hasOperationSlot ? _vm._l(column
|
|
6950
|
+
}) : [column.prop === _vm.operationPropKey && !_vm.hasOperationSlot ? _vm._l(_vm.getOperationListLocal(column, scope), function(item, index2) {
|
|
6938
6951
|
return _c("nf-button", _vm._g({
|
|
6939
6952
|
key: item.key || index2,
|
|
6940
6953
|
class: item.class,
|
package/lib/nf-table.vue.d.ts
CHANGED
|
@@ -132,8 +132,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
|
|
|
132
132
|
columnCheckClearDesc: string;
|
|
133
133
|
columnCheckNoFixedDesc: string;
|
|
134
134
|
columnCheckBasicFieldDesc: string;
|
|
135
|
-
columnCheckGetCheckedLengthDesc: (length: any) => string;
|
|
136
|
-
columnCheckGetAllCheckDesc: (length: any) => string;
|
|
135
|
+
columnCheckGetCheckedLengthDesc: (length: any) => (length: any) => string;
|
|
136
|
+
columnCheckGetAllCheckDesc: (length: any) => (length: any) => string;
|
|
137
137
|
}>, {
|
|
138
138
|
clearFilter: () => void;
|
|
139
139
|
sort: (prop: any, order: any) => void;
|
|
@@ -349,8 +349,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
|
|
|
349
349
|
columnCheckClearDesc: string;
|
|
350
350
|
columnCheckNoFixedDesc: string;
|
|
351
351
|
columnCheckBasicFieldDesc: string;
|
|
352
|
-
columnCheckGetCheckedLengthDesc: (length: any) => string;
|
|
353
|
-
columnCheckGetAllCheckDesc: (length: any) => string;
|
|
352
|
+
columnCheckGetCheckedLengthDesc: (length: any) => (length: any) => string;
|
|
353
|
+
columnCheckGetAllCheckDesc: (length: any) => (length: any) => string;
|
|
354
354
|
}>>>, {
|
|
355
355
|
background: string;
|
|
356
356
|
columns: NfTableColumnAttributes[] | any;
|
package/package/nf-table.vue
CHANGED
|
@@ -49,17 +49,27 @@
|
|
|
49
49
|
>
|
|
50
50
|
<template v-for="column in tableColumns">
|
|
51
51
|
<template v-if="isShow(column)">
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
52
|
+
<template v-if="column.type">
|
|
53
|
+
<el-table-column
|
|
54
|
+
v-if="column.type!=='expand'"
|
|
55
|
+
:key="column.key || column.prop || column.type"
|
|
56
|
+
:type="column.type"
|
|
57
|
+
:label="column.label"
|
|
58
|
+
v-bind="column.attr"
|
|
59
|
+
>
|
|
60
|
+
</el-table-column>
|
|
61
|
+
<el-table-column
|
|
62
|
+
v-else
|
|
63
|
+
:key="column.key || column.prop || column.type"
|
|
64
|
+
:type="column.type"
|
|
65
|
+
:label="column.label"
|
|
66
|
+
v-bind="column.attr"
|
|
67
|
+
>
|
|
68
|
+
<template slot-scope="scope" v-if="column.slot">
|
|
69
|
+
<slot :name="column.slot" :row="scope.row" :index="scope.$index" />
|
|
70
|
+
</template>
|
|
71
|
+
</el-table-column>
|
|
72
|
+
</template>
|
|
63
73
|
<template v-else>
|
|
64
74
|
<el-table-column
|
|
65
75
|
v-if="column.attr&&column.attr.formatter"
|
|
@@ -120,7 +130,7 @@
|
|
|
120
130
|
:round="item.round"
|
|
121
131
|
:circle="item.circle"
|
|
122
132
|
:style="item.style"
|
|
123
|
-
v-for="(item, index) in column
|
|
133
|
+
v-for="(item, index) in getOperationListLocal(column, scope)"
|
|
124
134
|
v-on="item.events"
|
|
125
135
|
:key="item.key || index"
|
|
126
136
|
>{{ item.text }}
|
|
@@ -737,8 +747,8 @@ const props = withDefaults(defineProps<{
|
|
|
737
747
|
columnCheckClearDesc: '清除',
|
|
738
748
|
columnCheckNoFixedDesc: '不固定',
|
|
739
749
|
columnCheckBasicFieldDesc: '基础字段',
|
|
740
|
-
columnCheckGetCheckedLengthDesc: (length) => '已选(' + length + ')',
|
|
741
|
-
columnCheckGetAllCheckDesc: (length) => '全选(' + length + ')'
|
|
750
|
+
columnCheckGetCheckedLengthDesc: (length) => (length) => '已选(' + length + ')',
|
|
751
|
+
columnCheckGetAllCheckDesc: (length) => (length) => '全选(' + length + ')'
|
|
742
752
|
})
|
|
743
753
|
|
|
744
754
|
const emit = defineEmits<{
|
|
@@ -746,6 +756,13 @@ const emit = defineEmits<{
|
|
|
746
756
|
(e: 'update:showColumn', event: string[] | undefined): void
|
|
747
757
|
}>()
|
|
748
758
|
|
|
759
|
+
const getOperationListLocal = (column, scope) => {
|
|
760
|
+
if (typeof column.operationList === 'function') {
|
|
761
|
+
return column.operationList(scope)
|
|
762
|
+
}
|
|
763
|
+
return column.operationList || []
|
|
764
|
+
}
|
|
765
|
+
|
|
749
766
|
const instance = getCurrentInstance()?.proxy
|
|
750
767
|
const elTableRef = ref()
|
|
751
768
|
const nfTableActionContainerRef = ref()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@94ai/nf-table",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.50",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "zoujiahe <zoujiahe@94ai.com>",
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
"url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@94ai/common-utils": "^3.3.
|
|
18
|
-
"@94ai/nf-button": "^3.3.
|
|
19
|
-
"@94ai/nf-drawer": "^3.3.
|
|
20
|
-
"@94ai/nf-message": "^3.3.
|
|
21
|
-
"@94ai/nf-search-form": "^3.3.
|
|
22
|
-
"@94ai/nf-theme-chalk": "^3.3.
|
|
17
|
+
"@94ai/common-utils": "^3.3.50",
|
|
18
|
+
"@94ai/nf-button": "^3.3.50",
|
|
19
|
+
"@94ai/nf-drawer": "^3.3.50",
|
|
20
|
+
"@94ai/nf-message": "^3.3.50",
|
|
21
|
+
"@94ai/nf-search-form": "^3.3.50",
|
|
22
|
+
"@94ai/nf-theme-chalk": "^3.3.50",
|
|
23
23
|
"idb-keyval": "^6.2.1",
|
|
24
24
|
"vue-demi": "^0.14.5",
|
|
25
25
|
"vuedraggable": "^2.24.3"
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"types": "lib/index.d.ts",
|
|
38
38
|
"main": "lib/nf-table.cjs.js",
|
|
39
39
|
"module": "lib/nf-table.esm-bundler.js",
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "85e4f8550755e534d3b2da8b16b253e848bff3e0"
|
|
41
41
|
}
|