@94ai/nf-table 3.3.45 → 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 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[]>;
@@ -6093,13 +6093,13 @@ __sfc_main.props = {
6093
6093
  key: "columnCheckGetCheckedLengthDesc",
6094
6094
  required: false,
6095
6095
  type: null,
6096
- default: (length) => "已选(" + 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) => "全选(" + 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,
@@ -6942,7 +6949,7 @@ var _sfc_render = function render3() {
6942
6949
  }) : [column.slot ? _vm._t(column.slot, null, {
6943
6950
  "row": scope.row,
6944
6951
  "index": scope.$index
6945
- }) : [column.prop === _vm.operationPropKey && !_vm.hasOperationSlot ? _vm._l(column.operationList, function(item, index2) {
6952
+ }) : [column.prop === _vm.operationPropKey && !_vm.hasOperationSlot ? _vm._l(_vm.getOperationListLocal(column, scope), function(item, index2) {
6946
6953
  return _c("nf-button", _vm._g({
6947
6954
  key: item.key || index2,
6948
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) => "已选(" + 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) => "全选(" + 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,
@@ -6940,7 +6947,7 @@ var _sfc_render = function render3() {
6940
6947
  }) : [column.slot ? _vm._t(column.slot, null, {
6941
6948
  "row": scope.row,
6942
6949
  "index": scope.$index
6943
- }) : [column.prop === _vm.operationPropKey && !_vm.hasOperationSlot ? _vm._l(column.operationList, function(item, index2) {
6950
+ }) : [column.prop === _vm.operationPropKey && !_vm.hasOperationSlot ? _vm._l(_vm.getOperationListLocal(column, scope), function(item, index2) {
6944
6951
  return _c("nf-button", _vm._g({
6945
6952
  key: item.key || index2,
6946
6953
  class: item.class,
@@ -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;
@@ -130,7 +130,7 @@
130
130
  :round="item.round"
131
131
  :circle="item.circle"
132
132
  :style="item.style"
133
- v-for="(item, index) in column.operationList"
133
+ v-for="(item, index) in getOperationListLocal(column, scope)"
134
134
  v-on="item.events"
135
135
  :key="item.key || index"
136
136
  >{{ item.text }}
@@ -747,8 +747,8 @@ const props = withDefaults(defineProps<{
747
747
  columnCheckClearDesc: '清除',
748
748
  columnCheckNoFixedDesc: '不固定',
749
749
  columnCheckBasicFieldDesc: '基础字段',
750
- columnCheckGetCheckedLengthDesc: (length) => '已选(' + length + ')',
751
- columnCheckGetAllCheckDesc: (length) => '全选(' + length + ')'
750
+ columnCheckGetCheckedLengthDesc: (length) => (length) => '已选(' + length + ')',
751
+ columnCheckGetAllCheckDesc: (length) => (length) => '全选(' + length + ')'
752
752
  })
753
753
 
754
754
  const emit = defineEmits<{
@@ -756,6 +756,13 @@ const emit = defineEmits<{
756
756
  (e: 'update:showColumn', event: string[] | undefined): void
757
757
  }>()
758
758
 
759
+ const getOperationListLocal = (column, scope) => {
760
+ if (typeof column.operationList === 'function') {
761
+ return column.operationList(scope)
762
+ }
763
+ return column.operationList || []
764
+ }
765
+
759
766
  const instance = getCurrentInstance()?.proxy
760
767
  const elTableRef = ref()
761
768
  const nfTableActionContainerRef = ref()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@94ai/nf-table",
3
- "version": "3.3.45",
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.45",
18
- "@94ai/nf-button": "^3.3.45",
19
- "@94ai/nf-drawer": "^3.3.45",
20
- "@94ai/nf-message": "^3.3.45",
21
- "@94ai/nf-search-form": "^3.3.45",
22
- "@94ai/nf-theme-chalk": "^3.3.45",
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": "dff35e1dac073742a91b656449c9d4ed833a6258"
40
+ "gitHead": "85e4f8550755e534d3b2da8b16b253e848bff3e0"
41
41
  }