pro-design-vue 1.3.31 → 1.3.33

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.
Files changed (53) hide show
  1. package/dist/index.full.js +37 -20
  2. package/dist/index.full.min.js +4 -4
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +5 -5
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +37 -20
  7. package/es/components/button/index.d.ts +17 -8
  8. package/es/components/button/src/Button.d.ts +17 -8
  9. package/es/components/table/src/components/AutoHeightHeader/Header.vue.d.ts +17 -8
  10. package/es/components/table/src/components/AutoHeightHeader/HeaderRow.vue.d.ts +17 -8
  11. package/es/components/table/src/components/Filter/FilterDropdown.vue.d.ts +17 -8
  12. package/es/components/table/src/components/Header/Header.vue.d.ts +17 -8
  13. package/es/components/table/src/components/Header/HeaderCell.vue.d.ts +17 -8
  14. package/es/components/table/src/components/Header/HeaderRows.vue.d.ts +17 -8
  15. package/es/components/table/src/components/Header/HeaderRowsWrap.vue.d.ts +17 -8
  16. package/es/components/table/src/components/InteralTable.vue.d.ts +34 -16
  17. package/es/components/table/src/components/interface.d.ts +1 -1
  18. package/es/components/table/src/hooks/useFetchData.d.ts +1 -1
  19. package/es/index.d.ts +18 -9
  20. package/es/packages/components/button/src/Button.mjs +26 -12
  21. package/es/packages/components/button/src/Button.mjs.map +1 -1
  22. package/es/packages/components/table/src/components/Table.mjs +2 -2
  23. package/es/packages/components/table/src/components/Table.mjs.map +1 -1
  24. package/es/packages/components/table/src/components/interface.mjs.map +1 -1
  25. package/es/packages/components/table/src/hooks/useFetchData.mjs +7 -4
  26. package/es/packages/components/table/src/hooks/useFetchData.mjs.map +1 -1
  27. package/es/version.d.ts +1 -1
  28. package/es/version.mjs +1 -1
  29. package/es/version.mjs.map +1 -1
  30. package/lib/components/button/index.d.ts +17 -8
  31. package/lib/components/button/src/Button.d.ts +17 -8
  32. package/lib/components/table/src/components/AutoHeightHeader/Header.vue.d.ts +17 -8
  33. package/lib/components/table/src/components/AutoHeightHeader/HeaderRow.vue.d.ts +17 -8
  34. package/lib/components/table/src/components/Filter/FilterDropdown.vue.d.ts +17 -8
  35. package/lib/components/table/src/components/Header/Header.vue.d.ts +17 -8
  36. package/lib/components/table/src/components/Header/HeaderCell.vue.d.ts +17 -8
  37. package/lib/components/table/src/components/Header/HeaderRows.vue.d.ts +17 -8
  38. package/lib/components/table/src/components/Header/HeaderRowsWrap.vue.d.ts +17 -8
  39. package/lib/components/table/src/components/InteralTable.vue.d.ts +34 -16
  40. package/lib/components/table/src/components/interface.d.ts +1 -1
  41. package/lib/components/table/src/hooks/useFetchData.d.ts +1 -1
  42. package/lib/index.d.ts +18 -9
  43. package/lib/packages/components/button/src/Button.js +26 -12
  44. package/lib/packages/components/button/src/Button.js.map +1 -1
  45. package/lib/packages/components/table/src/components/Table.js +2 -2
  46. package/lib/packages/components/table/src/components/Table.js.map +1 -1
  47. package/lib/packages/components/table/src/components/interface.js.map +1 -1
  48. package/lib/packages/components/table/src/hooks/useFetchData.js +7 -4
  49. package/lib/packages/components/table/src/hooks/useFetchData.js.map +1 -1
  50. package/lib/version.d.ts +1 -1
  51. package/lib/version.js +1 -1
  52. package/lib/version.js.map +1 -1
  53. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- /*! Pro Design Vue v1.3.31 */
1
+ /*! Pro Design Vue v1.3.33 */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('ant-design-vue'), require('vue'), require('ant-design-vue/es/locale/zh_CN.js')) :
@@ -32,7 +32,7 @@
32
32
  const DEFAULT_NAMESPACE = "pro";
33
33
  const DEFAULT_LOCALE = "zh-CN";
34
34
 
35
- const version$1 = "1.3.31";
35
+ const version$1 = "1.3.33";
36
36
 
37
37
  const makeInstaller = (components = []) => {
38
38
  const install = (app) => {
@@ -10375,6 +10375,10 @@
10375
10375
  type: String,
10376
10376
  default: ""
10377
10377
  },
10378
+ data: {
10379
+ type: [String, Boolean, Number, Array, Object],
10380
+ default: void 0
10381
+ },
10378
10382
  items: {
10379
10383
  type: Array,
10380
10384
  default: () => []
@@ -10388,7 +10392,8 @@
10388
10392
  emits: ["confirm", "click", "cancel", "menu-click"],
10389
10393
  setup(props, {
10390
10394
  attrs,
10391
- slots
10395
+ slots,
10396
+ emit
10392
10397
  }) {
10393
10398
  const prefixCls = usePrefixCls("button");
10394
10399
  const {
@@ -10404,27 +10409,27 @@
10404
10409
  }
10405
10410
  return void 0;
10406
10411
  };
10407
- const onClick = (e) => {
10408
- var _a, _b, _c, _d, _e;
10412
+ const handleClick = (e) => {
10413
+ var _a, _b, _c, _d;
10409
10414
  if (props.stop) {
10410
10415
  e.stopPropagation();
10411
10416
  }
10412
10417
  if (props.mode === "default") {
10413
- (_a = props.onClick) == null ? void 0 : _a.call(props, e);
10418
+ emit("click", e, props.data);
10414
10419
  return;
10415
10420
  }
10416
10421
  if (props.mode === "confirm") {
10417
10422
  confirm({
10418
10423
  ...props.confirmProps,
10419
- content: renderConfirmContent((_b = props.confirmProps) == null ? void 0 : _b.content) || ((_c = props.confirmProps) == null ? void 0 : _c.content),
10420
- title: renderConfirmContent((_d = props.confirmProps) == null ? void 0 : _d.title) || ((_e = props.confirmProps) == null ? void 0 : _e.title),
10424
+ content: renderConfirmContent((_a = props.confirmProps) == null ? void 0 : _a.content) || ((_b = props.confirmProps) == null ? void 0 : _b.content),
10425
+ title: renderConfirmContent((_c = props.confirmProps) == null ? void 0 : _c.title) || ((_d = props.confirmProps) == null ? void 0 : _d.title),
10421
10426
  onCancel() {
10422
10427
  var _a2;
10423
- return (_a2 = props.onCancel) == null ? void 0 : _a2.call(props);
10428
+ return (_a2 = props.onCancel) == null ? void 0 : _a2.call(props, props.data);
10424
10429
  },
10425
10430
  onOk() {
10426
10431
  var _a2;
10427
- return (_a2 = props.onConfirm) == null ? void 0 : _a2.call(props);
10432
+ return (_a2 = props.onConfirm) == null ? void 0 : _a2.call(props, props.data);
10428
10433
  }
10429
10434
  });
10430
10435
  }
@@ -10444,7 +10449,7 @@
10444
10449
  }
10445
10450
  const buttonProps = {
10446
10451
  ...omit(props, ["items", "permission", "iconStyle", "icon", "stop", "confirmProps", "popconfirmProps", "menuProps", "dropdownProps", "tooltipProps", "tooltip", "mode", "onConfirm", "onClick", "onCancel", "onMenuClick"]),
10447
- onClick
10452
+ onClick: handleClick
10448
10453
  };
10449
10454
  let defaultDom = vue.createVNode(antDesignVue.Button, vue.mergeProps(attrs, buttonProps, {
10450
10455
  "class": prefixCls
@@ -10470,8 +10475,14 @@
10470
10475
  }
10471
10476
  if (props.mode === "popconfirm") {
10472
10477
  return vue.createVNode(antDesignVue.Popconfirm, vue.mergeProps(props.popconfirmProps, {
10473
- "onConfirm": props.onConfirm,
10474
- "onCancel": props.onCancel
10478
+ "onConfirm": () => {
10479
+ var _a2;
10480
+ return (_a2 = props.onConfirm) == null ? void 0 : _a2.call(props, props.data);
10481
+ },
10482
+ "onCancel": () => {
10483
+ var _a2;
10484
+ return (_a2 = props.onCancel) == null ? void 0 : _a2.call(props, props.data);
10485
+ }
10475
10486
  }), _isSlot$8(defaultDom) ? defaultDom : {
10476
10487
  default: () => [defaultDom]
10477
10488
  });
@@ -10481,7 +10492,10 @@
10481
10492
  default: () => [defaultDom],
10482
10493
  overlay: () => vue.createVNode(antDesignVue.Menu, vue.mergeProps(props.menuProps, {
10483
10494
  "items": props.items,
10484
- "onClick": props.onMenuClick
10495
+ "onClick": (...args) => {
10496
+ var _a2;
10497
+ return (_a2 = props.onMenuClick) == null ? void 0 : _a2.call(props, ...args, props.data);
10498
+ }
10485
10499
  }), null)
10486
10500
  });
10487
10501
  }
@@ -24582,7 +24596,7 @@
24582
24596
  setTableLoading(false);
24583
24597
  pollingLoading.value = false;
24584
24598
  };
24585
- const fetchList = async (isPolling) => {
24599
+ const fetchList = async (isPolling, abort) => {
24586
24600
  var _a2, _b, _c, _d, _e, _f, _g;
24587
24601
  if (manualRequestRef.value) {
24588
24602
  manualRequestRef.value = false;
@@ -24614,7 +24628,8 @@
24614
24628
  success,
24615
24629
  total = 0,
24616
24630
  ...rest
24617
- } = await ((_e = getData.value) == null ? void 0 : _e.call(getData, params, vue.toRaw(sorters.value), vue.toRaw(filter.value))) || {};
24631
+ } = await ((_e = getData.value) == null ? void 0 : _e.call(getData, params, vue.toRaw(sorters.value), vue.toRaw(filter.value), abort)) || {};
24632
+ if (abort.signal.aborted) return;
24618
24633
  if (success === false) return [];
24619
24634
  setTableDataList(data);
24620
24635
  if (((_f = pagination.value) == null ? void 0 : _f.total) !== total) {
@@ -24627,7 +24642,9 @@
24627
24642
  if (tableDataList.value === void 0) setTableDataList([]);
24628
24643
  props.onRequestError(e);
24629
24644
  } finally {
24630
- requestFinally();
24645
+ if (!abort.signal.aborted) {
24646
+ requestFinally();
24647
+ }
24631
24648
  }
24632
24649
  };
24633
24650
  const fetchListDebounce = useDebounceFn(async (isPolling) => {
@@ -24641,7 +24658,7 @@
24641
24658
  abortRef.value = abort;
24642
24659
  try {
24643
24660
  const msg = await Promise.race([
24644
- fetchList(isPolling),
24661
+ fetchList(isPolling, abort),
24645
24662
  new Promise((_, reject) => {
24646
24663
  var _a2;
24647
24664
  (_a2 = abortRef.value) == null ? void 0 : _a2.signal.addEventListener("abort", () => {
@@ -37734,12 +37751,12 @@
37734
37751
  };
37735
37752
  const fetchData = vue.computed(() => {
37736
37753
  if (!props.request) return void 0;
37737
- return async (params, sorters, filter) => {
37754
+ return async (params, sorters, filter, abort) => {
37738
37755
  const actionParams = {
37739
37756
  ...params || {},
37740
37757
  ...props.params || {}
37741
37758
  };
37742
- const response = await props.request(actionParams, sorters, filter);
37759
+ const response = await props.request(actionParams, sorters, filter, abort);
37743
37760
  return response;
37744
37761
  };
37745
37762
  });