@aplus-frontend/ui 7.1.1 → 7.2.0

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 (57) hide show
  1. package/es/index.mjs +143 -147
  2. package/es/src/ap-pro-card/components/title/index.vue.d.ts +3 -0
  3. package/es/src/ap-pro-card/components/title/index.vue2.mjs +18 -13
  4. package/es/src/ap-upload/apUpload.vue.d.ts +1 -1
  5. package/es/src/business/ap-image/ApImage.vue2.mjs +45 -42
  6. package/es/src/business/ap-image/interface.d.ts +2 -0
  7. package/es/src/business/ap-title/ApTitle.vue2.mjs +24 -21
  8. package/es/src/business/ap-title/interface.d.ts +2 -0
  9. package/es/src/business/hooks/index.d.ts +0 -2
  10. package/es/src/business/hooks/index.mjs +5 -9
  11. package/es/src/business/hooks/usePageListApGrid.d.ts +1 -2
  12. package/es/src/business/hooks/usePageListApGrid.mjs +35 -44
  13. package/es/src/business/hooks/usePageListApTable.d.ts +1 -2
  14. package/es/src/business/hooks/usePageListApTable.mjs +46 -48
  15. package/es/src/config-provider/config-provider-props.d.ts +20 -3
  16. package/es/src/config-provider/config-provider-props.mjs +12 -0
  17. package/es/src/config-provider/config-provider.d.ts +33 -3
  18. package/es/src/config-provider/config-provider.mjs +35 -35
  19. package/es/src/config-provider/constants.d.ts +1 -0
  20. package/es/src/config-provider/hooks/use-global-config.d.ts +17 -2
  21. package/es/src/config-provider/index.d.ts +49 -4
  22. package/es/src/index.mjs +147 -151
  23. package/es/src/version.d.ts +1 -1
  24. package/es/src/version.mjs +1 -1
  25. package/lib/index.js +1 -1
  26. package/lib/src/ap-pro-card/components/title/index.vue.d.ts +3 -0
  27. package/lib/src/ap-pro-card/components/title/index.vue2.js +1 -1
  28. package/lib/src/ap-upload/apUpload.vue.d.ts +1 -1
  29. package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
  30. package/lib/src/business/ap-image/interface.d.ts +2 -0
  31. package/lib/src/business/ap-title/ApTitle.vue2.js +1 -1
  32. package/lib/src/business/ap-title/interface.d.ts +2 -0
  33. package/lib/src/business/hooks/index.d.ts +0 -2
  34. package/lib/src/business/hooks/index.js +1 -1
  35. package/lib/src/business/hooks/usePageListApGrid.d.ts +1 -2
  36. package/lib/src/business/hooks/usePageListApGrid.js +1 -1
  37. package/lib/src/business/hooks/usePageListApTable.d.ts +1 -2
  38. package/lib/src/business/hooks/usePageListApTable.js +1 -1
  39. package/lib/src/config-provider/config-provider-props.d.ts +20 -3
  40. package/lib/src/config-provider/config-provider-props.js +1 -1
  41. package/lib/src/config-provider/config-provider.d.ts +33 -3
  42. package/lib/src/config-provider/config-provider.js +1 -1
  43. package/lib/src/config-provider/constants.d.ts +1 -0
  44. package/lib/src/config-provider/hooks/use-global-config.d.ts +17 -2
  45. package/lib/src/config-provider/index.d.ts +49 -4
  46. package/lib/src/index.js +1 -1
  47. package/lib/src/version.d.ts +1 -1
  48. package/lib/src/version.js +1 -1
  49. package/package.json +3 -3
  50. package/es/src/business/hooks/useGridRefresh.d.ts +0 -17
  51. package/es/src/business/hooks/useGridRefresh.mjs +0 -16
  52. package/es/src/business/hooks/useTableRefresh.d.ts +0 -20
  53. package/es/src/business/hooks/useTableRefresh.mjs +0 -57
  54. package/lib/src/business/hooks/useGridRefresh.d.ts +0 -17
  55. package/lib/src/business/hooks/useGridRefresh.js +0 -1
  56. package/lib/src/business/hooks/useTableRefresh.d.ts +0 -20
  57. package/lib/src/business/hooks/useTableRefresh.js +0 -1
@@ -1,20 +0,0 @@
1
- import { Ref } from 'vue';
2
- import { ApTableExpose } from '../../';
3
- export interface UseTableRefreshOption {
4
- /**
5
- * apTable实例
6
- */
7
- apTableRef?: Ref<ApTableExpose | undefined | null>;
8
- /**
9
- * 刷新类型,reset:重置,submit:提交
10
- */
11
- refreshType?: 'reset' | 'submit';
12
- /**
13
- * 刷新前执行,返回false则不执行
14
- */
15
- refreshBefore?: () => boolean;
16
- }
17
- export declare function useTableRefresh(option?: UseTableRefreshOption): {
18
- tableScrollX: Ref<number, number>;
19
- tableScrollY: Ref<number, number>;
20
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue");require("../../index.js");const v=require("../../config-provider/hooks/use-global-config.js");function T(e){return e==="admin"?window:(window.top!==window?window.top:window)??window}function n(e,r){return r.document.querySelector(e)}function w(e,r=".demo",u){const t=n(r,u);t&&(t.scrollTop=e)}function S(e){const r=v.useGlobalConfig("scrollYDomName"),u=v.useGlobalConfig("uiMode"),t=T(u.value??"aplus");let a=!0;const c=s.ref(0),i=s.ref(0),m=(["reset","submit",void 0].includes(e?.refreshType)?e?.refreshType:"submit")??"submit",b=e?.refreshBefore??(()=>!0);let f=!0;const d=l=>{if(a===!1)return;const o=l.target;i.value=o.scrollTop};return s.onMounted(()=>{s.nextTick(()=>{f=!1})}),s.onActivated(()=>{const l=b?.();if(f){setTimeout(()=>{const o=n(r.value,t);o&&o.addEventListener("scroll",d)});return}l&&setTimeout(()=>{a=!0,e?.apTableRef?.value?.[m](),e?.apTableRef?.value?.scrollBar?.x?.scroll?.(c.value),w(i.value,r.value,t);const o=n(r.value,t);o&&o.addEventListener("scroll",d)})}),s.onDeactivated(()=>{a=!1,c.value=e?.apTableRef?.value?.scrollBar?.x?.getCurrentScroll?.()??0;const l=n(r.value,t);l&&l.removeEventListener("scroll",d)}),{tableScrollX:c,tableScrollY:i}}exports.useTableRefresh=S;