@aplus-frontend/ui 0.0.27 → 0.0.29

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 (127) hide show
  1. package/es/src/ap-action/group/index.vue.mjs +27 -31
  2. package/es/src/ap-action/item-dropdown/index.vue.mjs +14 -15
  3. package/es/src/ap-action/style/item-dropdown.css +2 -0
  4. package/es/src/ap-download/hooks/index.mjs +4 -3
  5. package/es/src/ap-download/interface.d.ts +2 -2
  6. package/es/src/ap-field/date/helper.mjs +5 -5
  7. package/es/src/ap-field/date-range/index.vue.mjs +15 -15
  8. package/es/src/ap-form/ap-form-item-group/index.vue.mjs +21 -21
  9. package/es/src/ap-form/ap-form-item.vue.mjs +72 -64
  10. package/es/src/ap-form/ap-form-list.vue.mjs +29 -21
  11. package/es/src/ap-form/ap-form.vue.d.ts +13 -3
  12. package/es/src/ap-form/ap-form.vue2.mjs +87 -66
  13. package/es/src/ap-form/constant.d.ts +1 -0
  14. package/es/src/ap-form/constant.mjs +2 -1
  15. package/es/src/ap-form/context.d.ts +4 -3
  16. package/es/src/ap-form/hooks/use-watch.mjs +20 -16
  17. package/es/src/ap-form/interface.d.ts +39 -4
  18. package/es/src/ap-form/items/checkbox/index.vue.mjs +11 -10
  19. package/es/src/ap-form/items/date/index.vue.mjs +14 -13
  20. package/es/src/ap-form/items/date-range/index.vue.mjs +12 -11
  21. package/es/src/ap-form/items/number/index.vue.mjs +13 -12
  22. package/es/src/ap-form/items/radio/index.vue.mjs +4 -3
  23. package/es/src/ap-form/items/select/index.vue.mjs +3 -2
  24. package/es/src/ap-form/items/switch/index.vue.mjs +9 -8
  25. package/es/src/ap-form/items/text/index.vue2.mjs +15 -14
  26. package/es/src/ap-form/items/text/password.vue.mjs +1 -0
  27. package/es/src/ap-form/items/text-area/index.vue.mjs +7 -6
  28. package/es/src/ap-form/modal-form/index.vue.d.ts +1 -1
  29. package/es/src/ap-form/modal-form/index.vue.mjs +3 -3
  30. package/es/src/ap-form/search-form/index.vue.mjs +123 -99
  31. package/es/src/ap-table/constants.d.ts +132 -0
  32. package/es/src/ap-table/hooks/use-table-paging.mjs +23 -21
  33. package/es/src/ap-upload/apUpload.vue.d.ts +3 -11
  34. package/es/src/ap-upload/apUpload.vue.mjs +42 -36
  35. package/es/src/ap-upload/components/MultipleFile.vue2.mjs +115 -102
  36. package/es/src/ap-upload/components/Picture.vue2.mjs +121 -111
  37. package/es/src/ap-upload/components/SingleFile.vue2.mjs +120 -109
  38. package/es/src/ap-upload/hooks/useOss.d.ts +9 -4
  39. package/es/src/ap-upload/hooks/useOss.mjs +52 -34
  40. package/es/src/ap-upload/utils/accept.d.ts +3 -0
  41. package/es/src/ap-upload/utils/accept.mjs +35 -30
  42. package/es/src/business/ap-status/ApStatusGroup.vue.d.ts +7 -2
  43. package/es/src/business/ap-status/ApStatusGroup.vue2.mjs +7 -6
  44. package/es/src/business/ap-status/interface.d.ts +4 -1
  45. package/es/src/business/expandAlert/ApExpandAlert.vue.d.ts +19 -1
  46. package/es/src/business/expandAlert/ApExpandAlert.vue2.mjs +53 -47
  47. package/es/src/business/expandAlert/interface.d.ts +4 -0
  48. package/es/src/business/index.d.ts +79 -15
  49. package/es/src/business/index.mjs +1 -1
  50. package/es/src/config-provider/config-provider-props.d.ts +5 -1
  51. package/es/src/config-provider/config-provider-props.mjs +4 -0
  52. package/es/src/config-provider/config-provider.d.ts +10 -1
  53. package/es/src/config-provider/config-provider.mjs +9 -8
  54. package/es/src/config-provider/constants.d.ts +10 -0
  55. package/es/src/config-provider/hooks/use-global-config.d.ts +5 -1
  56. package/es/src/config-provider/index.d.ts +20 -1
  57. package/es/src/editable-table/form-item.vue.mjs +72 -74
  58. package/es/src/locale/lang/en.mjs +26 -1
  59. package/es/src/locale/lang/zh-cn.mjs +26 -1
  60. package/es/src/theme/ap-action/item-dropdown.css +2 -0
  61. package/es/src/work-order-modal/createWorkOrder.d.ts +3 -1
  62. package/es/src/work-order-modal/interfaces.d.ts +3 -1
  63. package/es/src/work-order-modal/work-order-modal.vue.mjs +7 -7
  64. package/lib/src/ap-action/group/index.vue.js +1 -1
  65. package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
  66. package/lib/src/ap-action/style/item-dropdown.css +2 -0
  67. package/lib/src/ap-download/hooks/index.js +1 -1
  68. package/lib/src/ap-download/interface.d.ts +2 -2
  69. package/lib/src/ap-field/date/helper.js +1 -1
  70. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  71. package/lib/src/ap-form/ap-form-item-group/index.vue.js +1 -1
  72. package/lib/src/ap-form/ap-form-item.vue.js +1 -1
  73. package/lib/src/ap-form/ap-form-list.vue.js +1 -1
  74. package/lib/src/ap-form/ap-form.vue.d.ts +13 -3
  75. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  76. package/lib/src/ap-form/constant.d.ts +1 -0
  77. package/lib/src/ap-form/constant.js +1 -1
  78. package/lib/src/ap-form/context.d.ts +4 -3
  79. package/lib/src/ap-form/hooks/use-watch.js +1 -1
  80. package/lib/src/ap-form/interface.d.ts +39 -4
  81. package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
  82. package/lib/src/ap-form/items/date/index.vue.js +1 -1
  83. package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
  84. package/lib/src/ap-form/items/number/index.vue.js +1 -1
  85. package/lib/src/ap-form/items/radio/index.vue.js +1 -1
  86. package/lib/src/ap-form/items/select/index.vue.js +1 -1
  87. package/lib/src/ap-form/items/switch/index.vue.js +1 -1
  88. package/lib/src/ap-form/items/text/index.vue2.js +1 -1
  89. package/lib/src/ap-form/items/text/password.vue.js +1 -1
  90. package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
  91. package/lib/src/ap-form/modal-form/index.vue.d.ts +1 -1
  92. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  93. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  94. package/lib/src/ap-table/constants.d.ts +132 -0
  95. package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
  96. package/lib/src/ap-upload/apUpload.vue.d.ts +3 -11
  97. package/lib/src/ap-upload/apUpload.vue.js +1 -1
  98. package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
  99. package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
  100. package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
  101. package/lib/src/ap-upload/hooks/useOss.d.ts +9 -4
  102. package/lib/src/ap-upload/hooks/useOss.js +1 -1
  103. package/lib/src/ap-upload/utils/accept.d.ts +3 -0
  104. package/lib/src/ap-upload/utils/accept.js +1 -1
  105. package/lib/src/business/ap-status/ApStatusGroup.vue.d.ts +7 -2
  106. package/lib/src/business/ap-status/ApStatusGroup.vue2.js +1 -1
  107. package/lib/src/business/ap-status/interface.d.ts +4 -1
  108. package/lib/src/business/expandAlert/ApExpandAlert.vue.d.ts +19 -1
  109. package/lib/src/business/expandAlert/ApExpandAlert.vue2.js +1 -1
  110. package/lib/src/business/expandAlert/interface.d.ts +4 -0
  111. package/lib/src/business/index.d.ts +79 -15
  112. package/lib/src/business/index.js +1 -1
  113. package/lib/src/config-provider/config-provider-props.d.ts +5 -1
  114. package/lib/src/config-provider/config-provider-props.js +1 -1
  115. package/lib/src/config-provider/config-provider.d.ts +10 -1
  116. package/lib/src/config-provider/config-provider.js +1 -1
  117. package/lib/src/config-provider/constants.d.ts +10 -0
  118. package/lib/src/config-provider/hooks/use-global-config.d.ts +5 -1
  119. package/lib/src/config-provider/index.d.ts +20 -1
  120. package/lib/src/editable-table/form-item.vue.js +1 -1
  121. package/lib/src/locale/lang/en.js +1 -1
  122. package/lib/src/locale/lang/zh-cn.js +1 -1
  123. package/lib/src/theme/ap-action/item-dropdown.css +2 -0
  124. package/lib/src/work-order-modal/createWorkOrder.d.ts +3 -1
  125. package/lib/src/work-order-modal/interfaces.d.ts +3 -1
  126. package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
  127. package/package.json +4 -3
@@ -1,9 +1,14 @@
1
- import { Oss } from '@aplus-frontend/oss';
1
+ import { client, Oss } from '@aplus-frontend/oss';
2
+ import { Translator } from '../../config-provider';
3
+ import { Ref } from 'vue';
4
+
2
5
  export type { Oss } from '@aplus-frontend/oss';
6
+ export type GetOssAccess = Parameters<typeof client.initOssClient>[0]['getOssAccess'];
7
+ export declare function injectLocaleToOss(tValue: Translator, langValue: Ref<string>): void;
3
8
  declare function put({ file, dirName, oss, successCallBack, errorCallBack, progressCallBack }: {
4
9
  file: File;
5
10
  dirName: string;
6
- oss: any;
11
+ oss: Oss;
7
12
  successCallBack: (saveUrl: string, previewUrl: string) => void;
8
13
  errorCallBack: (msg: string) => void;
9
14
  progressCallBack: (p: number) => void;
@@ -12,8 +17,8 @@ export declare function useOss(): {
12
17
  client: Oss;
13
18
  put: typeof put;
14
19
  };
15
- export declare function useOssInit(getOssAccess: any): Promise<{
20
+ export declare function useOssInit(getOssAccess: GetOssAccess): Promise<{
16
21
  client: Oss;
17
22
  put: typeof put;
18
23
  }>;
19
- export declare function getOssInstance(getOssAccess: any): Promise< Oss>;
24
+ export declare function getOssInstance(getOssAccess: Parameters<typeof client.initOssClient>[0]['getOssAccess']): Promise<Oss>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@aplus-frontend/oss");async function l({file:t,dirName:s,oss:e,successCallBack:u,errorCallBack:o,progressCallBack:r}){try{const n=await e.put({fileName:t.name,dirName:s,data:t,progressCallBack:i=>{r(i)}});if(n.status===204)return;if(n.status===200){const{saveUrl:i,previewUrl:g}=n;u(i,g)}else o((n==null?void 0:n.message)||"网络异常")}catch(n){o(n)}}function c(){return{client:a.client,put:l}}async function w(t){if(!t)throw new Error("请传入getOssAccess");return await a.client.initOssClient({getOssAccess:t,onFailure:s=>{throw new Error(typeof(s==null?void 0:s.message)=="string"?s.message:"获取oss临时权限失败")}}),c()}async function f(t){if(!t)throw new Error("请传入getOssAccess");const s=a.createOssInstance();return await s.initOssClient({getOssAccess:t,onFailure:e=>{throw new Error(typeof(e==null?void 0:e.message)=="string"?e.message:"获取oss临时权限失败")}}),s}exports.getOssInstance=f;exports.useOss=c;exports.useOssInit=w;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@aplus-frontend/oss");let a,l;function f(e,s){a=e,l=s}const m={"zh-cn":"zh_CN",en:"en_US"};function p(){return m[l.value]??"zh_CN"}async function w({file:e,dirName:s,oss:n,successCallBack:u,errorCallBack:o,progressCallBack:O}){if(!s){o("required dirName");return}try{const t=await n.put({fileName:e.name,dirName:s,data:e,progressCallBack:i=>{O(i)}});if(t.status===204)return;if(t.status===200){const{saveUrl:i,previewUrl:g}=t;u(i,g)}else o((t==null?void 0:t.message)||a("ap.apUpload.networkAnomaly"))}catch(t){o(t)}}function r(){return{client:c.client,put:w}}async function d(e){if(!e)throw new Error(`${a("ap.apUpload.pleasePass")}getOssAccess`);return await c.client.initOssClient({getOssAccess:e,locale:p(),onFailure:s=>{throw new Error(typeof(s==null?void 0:s.message)=="string"?s.message:a("ap.apUpload.FailedToObtainOssTemporaryPermissions"))}}),r()}async function y(e){if(!e)throw new Error(`${a("ap.apUpload.pleasePass")}getOssAccess`);const s=c.createOssInstance();return await s.initOssClient({getOssAccess:e,locale:p(),onFailure:n=>{throw new Error(typeof(n==null?void 0:n.message)=="string"?n.message:a("ap.apUpload.FailedToObtainOssTemporaryPermissions"))}}),s}exports.getOssInstance=y;exports.injectLocaleToOss=f;exports.useOss=r;exports.useOssInit=d;
@@ -1,3 +1,6 @@
1
+ import { Translator } from '../../config-provider';
2
+
3
+ export declare function injectLocaleToAccept(value: Translator): void;
1
4
  /**
2
5
  * 校验文件是否满足指定的格式
3
6
  * @param file
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("mime");function f(n,i){var s,c,o,u;const e=i.split(",").map(t=>t.trim());for(const t of e){if(t==="*")return!0;if(t.endsWith("/*")){const[r]=t.split("/"),[a]=n.type.split("/");if(r===a)return!0}else if(/^\./.test(t)){if(n.type===p.getType(t))return!0;const r=(s=n.name)==null?void 0:s.lastIndexOf(".");if(r>-1&&((c=n.name)==null?void 0:c.slice(r))===t)return!0}else{if(n.type===t)return!0;const r=(o=n.name)==null?void 0:o.lastIndexOf(".");if(r>-1&&[...p.getAllExtensions(t)||[]].map(l=>`.${l}`).includes((u=n.name)==null?void 0:u.slice(r)))return!0}}return!1}function m(n){const i={image:"图片类型",video:"视频类型",audio:"音频类型",application:"文档类型","*":"全部类型"};return n.split(",").map(e=>e.trim()).map(e=>{if(e==="*")return i[e];if(e.endsWith("/*")){const[s]=e.split("/");return i[s]||s}else return/^\./.test(e)?e:[...p.getAllExtensions(e)||[]].map(s=>`.${s}`).join(",")||e}).join(",")}exports.fileMatchesAccept=f;exports.getAcceptText=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("mime");let a;function f(t){a=t}function y(t,i){var p,c,o,l;const e=i.split(",").map(n=>n.trim());for(const n of e){if(n==="*")return!0;if(n.endsWith("/*")){const[s]=n.split("/"),[u]=t.type.split("/");if(s===u)return!0}else if(/^\./.test(n)){if(t.type===r.getType(n))return!0;const s=(p=t.name)==null?void 0:p.lastIndexOf(".");if(s>-1&&((c=t.name)==null?void 0:c.slice(s))===n)return!0}else{if(t.type===n)return!0;const s=(o=t.name)==null?void 0:o.lastIndexOf(".");if(s>-1&&[...r.getAllExtensions(n)||[]].map(d=>`.${d}`).includes((l=t.name)==null?void 0:l.slice(s)))return!0}}return!1}function m(t){const i={image:a("ap.apUpload.pictureType"),video:a("ap.apUpload.videoType"),audio:a("ap.apUpload.audioType"),application:a("ap.apUpload.documentType"),"*":a("ap.apUpload.allTypes")};return t.split(",").map(e=>e.trim()).map(e=>{if(e==="*")return i[e];if(e.endsWith("/*")){const[p]=e.split("/");return i[p]||p}else return/^\./.test(e)?e:[...r.getAllExtensions(e)||[]].map(p=>`.${p}`).join(",")||e}).join(",")}exports.fileMatchesAccept=y;exports.getAcceptText=m;exports.injectLocaleToAccept=f;
@@ -1,18 +1,23 @@
1
- import { ApStatusGroupProps, ApStatusGroupItemProps } from './interface';
1
+ import { ApStatusGroupProps, ApStatusProps } from './interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
3
 
4
4
  declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApStatusGroupProps>, {
5
5
  currentValue: number;
6
6
  padding: number;
7
7
  statusList: null;
8
+ show: boolean;
8
9
  }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApStatusGroupProps>, {
9
10
  currentValue: number;
10
11
  padding: number;
11
12
  statusList: null;
13
+ show: boolean;
12
14
  }>>>, {
13
15
  padding: number;
16
+ show: boolean;
14
17
  currentValue: string | number;
15
- statusList: ApStatusGroupItemProps[] | null;
18
+ statusList: Required<Pick< ApStatusProps, "text" | "color"> & {
19
+ value: string | number;
20
+ }>[] | null;
16
21
  }, {}>;
17
22
  export default _default;
18
23
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../config-provider/index.js");require("./ApStatus.vue.js");const l=require("../../config-provider/hooks/use-namespace.js"),o=require("./ApStatus.vue2.js"),p=e.defineComponent({name:"ApStatusGroup",__name:"ApStatusGroup",props:{padding:{default:8},currentValue:{default:0},statusList:{default:null},style:{}},setup(r){const t=r,a=e.computed(()=>({"padding-left":t.padding+"px","padding-right":t.padding+"px",...t.style})),{b:s}=l.useNamespace("ap-status-group");return(n,c)=>t.statusList?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(s)()]),style:e.normalizeStyle(a.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.statusList,u=>(e.openBlock(),e.createBlock(o.default,{key:u.value,show:u.value===n.currentValue,color:u.color,text:u.text,padding:t.padding},null,8,["show","color","text","padding"]))),128))],6)):e.createCommentVNode("",!0)}});exports.default=p;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../config-provider/index.js");require("./ApStatus.vue.js");const n=require("../../config-provider/hooks/use-namespace.js"),o=require("./ApStatus.vue2.js"),p=e.defineComponent({name:"ApStatusGroup",__name:"ApStatusGroup",props:{padding:{default:8},currentValue:{default:0},statusList:{default:null},style:{},show:{type:Boolean,default:!0}},setup(r){const t=r,a=e.computed(()=>({"padding-left":t.padding+"px","padding-right":t.padding+"px",...t.style})),{b:s}=n.useNamespace("ap-status-group");return(l,c)=>t.statusList?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(s)()]),style:e.normalizeStyle(a.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.statusList,u=>(e.openBlock(),e.createBlock(o.default,{key:u.value,show:u.value===l.currentValue,color:u.color,text:u.text,padding:t.padding},null,8,["show","color","text","padding"]))),128))],6)):e.createCommentVNode("",!0)}});exports.default=p;
@@ -5,12 +5,15 @@ export type ApStatusProps = {
5
5
  show?: boolean;
6
6
  style?: object;
7
7
  };
8
- export type ApStatusGroupItemProps = ApStatusProps & {
8
+ type ApStatusGroupItemUnion = Pick<ApStatusProps, 'text' | 'color'> & {
9
9
  value: number | string;
10
10
  };
11
+ export type ApStatusGroupItemProps = Required<ApStatusGroupItemUnion>;
11
12
  export type ApStatusGroupProps = {
12
13
  padding: number;
13
14
  currentValue: number | string;
14
15
  statusList: ApStatusGroupItemProps[] | null;
15
16
  style?: object;
17
+ show?: boolean;
16
18
  };
19
+ export {};
@@ -1,6 +1,11 @@
1
1
  import { ApExpandAlertProps } from './interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
3
 
4
+ /**
5
+ * @description: 手动调用收起展开
6
+ * @param {boolean} state true 展开 false 收起
7
+ */
8
+ declare function setExpand(state?: boolean): void;
4
9
  declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApExpandAlertProps>, {
5
10
  /**
6
11
  * Alert类型
@@ -22,7 +27,14 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
22
27
  * 分隔符
23
28
  */
24
29
  separator: string;
25
- }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
30
+ /**
31
+ * 内容达到几行显示展开收起
32
+ */
33
+ rows: number;
34
+ }>, {
35
+ setExpand: typeof setExpand;
36
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
37
+ expand: (...args: any[]) => void;
26
38
  choose: (...args: any[]) => void;
27
39
  }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApExpandAlertProps>, {
28
40
  /**
@@ -45,13 +57,19 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
45
57
  * 分隔符
46
58
  */
47
59
  separator: string;
60
+ /**
61
+ * 内容达到几行显示展开收起
62
+ */
63
+ rows: number;
48
64
  }>>> & {
65
+ onExpand?: ((...args: any[]) => any) | undefined;
49
66
  onChoose?: ((...args: any[]) => any) | undefined;
50
67
  }, {
51
68
  type: "success" | "error" | "info" | "warning" | undefined;
52
69
  data: string | any[];
53
70
  prefix: string;
54
71
  separator: string;
72
+ rows: string | number;
55
73
  tipTitle: string;
56
74
  }, {}>, {
57
75
  default?(_: {}): any;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("@ant-design/icons-vue"),u=require("ant-design-vue"),h=require("../../ap-action/index.js");require("../../config-provider/index.js");require("./style.css");const w=require("../../config-provider/hooks/use-namespace.js"),x=require("../../config-provider/hooks/use-global-config.js"),B={key:0},b=["onClick"],N=e.defineComponent({__name:"ApExpandAlert",props:{type:{default:"warning"},data:{default:()=>[]},prefix:{default:""},tipTitle:{default:"查看详情"},mapLabel:{},separator:{default:"|"}},emits:["choose"],setup(c){const p=c,l=e.ref(""),o=e.ref(null),d=e.computed(()=>({fontWeight:"400",wordBreak:"break-all",overflow:"hidden",display:"-webkit-box",webkitLineClamp:l.value,webkitBoxOrient:"vertical",lineHeight:"22px"}));function f(){l.value==="1"?l.value="":l.value="1"}const m=e.computed(()=>l.value==="1"?"展开":"收起"),s=e.ref(!0),i=e.computed(()=>l.value!=="1");e.watch(()=>p.data,()=>{l.value="",e.nextTick(()=>{if(o.value){const t=Number(o.value.clientHeight),r=Number(parseInt(o.value.style.lineHeight));t<=r&&i.value?s.value=!1:s.value=!0}})},{immediate:!0});const{b:k,e:a,m:v}=w.useNamespace("ap-expand-alert"),g=x.useGlobalConfig("uiMode","aplus");return(t,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(k)(),`${e.unref(v)(e.unref(g))}`])},[e.createVNode(e.unref(u.Alert),{type:t.type,"show-icon":"",class:e.normalizeClass(e.unref(a)("antAlert"))},{action:e.withCtx(()=>[s.value?(e.openBlock(),e.createBlock(e.unref(h.ApActionItem),{key:0,size:"small",onClick:r[0]||(r[0]=n=>f()),style:{"font-size":"12px","padding-left":"16px"}},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(a)("expandText"))},e.toDisplayString(m.value),3),e.createVNode(e.unref(C.DownOutlined),{class:e.normalizeClass(i.value?e.unref(a)("expandIcon"):e.unref(a)("collapseIcon"))},null,8,["class"])]),_:1})):e.createCommentVNode("",!0)]),message:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle(d.value),class:e.normalizeClass(e.unref(a)("alertContent")),ref_key:"ellipsisBoxRef",ref:o},[e.renderSlot(t.$slots,"default",{},()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(a)("prefix"))},e.toDisplayString(t.prefix),3),typeof t.data=="string"?(e.openBlock(),e.createElementBlock("span",B,e.toDisplayString(t.data),1)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.data,(n,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[e.createVNode(e.unref(u.Tooltip),{title:t.tipTitle},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(a)("showItem")),onClick:E=>t.$emit("choose",n)},e.toDisplayString(t.mapLabel?n[t.mapLabel]:n),11,b)]),_:2},1032,["title"]),y!==t.data.length-1?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(a)("spliter"))},e.toDisplayString(t.separator),3)):e.createCommentVNode("",!0)],64))),128))])],6)]),_:3},8,["type","class"])],2))}});exports.default=N;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("@ant-design/icons-vue"),c=require("ant-design-vue"),B=require("../../ap-action/index.js");require("../../config-provider/index.js");require("./style.css");const E=require("../../config-provider/hooks/use-namespace.js"),N=require("../../config-provider/hooks/use-global-config.js"),z={key:0},V=["onClick"],S=e.defineComponent({__name:"ApExpandAlert",props:{type:{default:"warning"},data:{default:()=>[]},prefix:{default:""},tipTitle:{default:"查看详情"},mapLabel:{},separator:{default:"|"},rows:{default:1}},emits:["choose","expand"],setup(p,{expose:d,emit:f}){const m=f,i=p,a=e.ref(""),o=e.ref(null),v=e.computed(()=>({fontWeight:"400",wordBreak:"break-all",overflow:"hidden",display:"-webkit-box",webkitLineClamp:a.value,webkitBoxOrient:"vertical",lineHeight:"22px"}));function k(){a.value==="1"?a.value="":a.value="1",m("expand")}const g=e.computed(()=>a.value==="1"?"展开":"收起"),r=e.ref(!0),u=e.computed(()=>a.value!=="1");function y(t){t?a.value="":a.value="1"}e.watch(()=>i.data,()=>{a.value="",e.nextTick(()=>{if(o.value){const t=Number(o.value.clientHeight),s=Number(parseInt(o.value.style.lineHeight));t<s*Number(i.rows)&&u.value?r.value=!1:r.value=!0}})},{immediate:!0});const{b:C,e:l,m:h}=E.useNamespace("ap-expand-alert"),w=N.useGlobalConfig("uiMode","aplus");return d({setExpand:y}),(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(C)(),`${e.unref(h)(e.unref(w))}`])},[e.createVNode(e.unref(c.Alert),{type:t.type,"show-icon":"",class:e.normalizeClass(e.unref(l)("antAlert"))},{action:e.withCtx(()=>[r.value?(e.openBlock(),e.createBlock(e.unref(B.ApActionItem),{key:0,size:"small",onClick:s[0]||(s[0]=n=>k()),style:{"font-size":"12px","padding-left":"16px"}},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(l)("expandText"))},e.toDisplayString(g.value),3),e.createVNode(e.unref(b.DownOutlined),{class:e.normalizeClass(u.value?e.unref(l)("expandIcon"):e.unref(l)("collapseIcon"))},null,8,["class"])]),_:1})):e.createCommentVNode("",!0)]),message:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle(v.value),class:e.normalizeClass(e.unref(l)("alertContent")),ref_key:"ellipsisBoxRef",ref:o},[e.renderSlot(t.$slots,"default",{},()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(l)("prefix"))},e.toDisplayString(t.prefix),3),typeof t.data=="string"?(e.openBlock(),e.createElementBlock("span",z,e.toDisplayString(t.data),1)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.data,(n,x)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[e.createVNode(e.unref(c.Tooltip),{title:t.tipTitle},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(l)("showItem")),onClick:q=>t.$emit("choose",n)},e.toDisplayString(t.mapLabel?n[t.mapLabel]:n),11,V)]),_:2},1032,["title"]),x!==t.data.length-1?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(l)("spliter"))},e.toDisplayString(t.separator),3)):e.createCommentVNode("",!0)],64))),128))])],6)]),_:3},8,["type","class"])],2))}});exports.default=S;
@@ -23,4 +23,8 @@ export interface ApExpandAlertProps {
23
23
  * 分隔符
24
24
  */
25
25
  separator: string;
26
+ /**
27
+ * 内容达到几行显示展开收起,默认是一行
28
+ */
29
+ rows: string | number;
26
30
  }
@@ -1,7 +1,7 @@
1
1
  import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin, CSSProperties } from 'vue';
2
2
  import { LiteralUnion } from 'ant-design-vue/es/_util/type';
3
3
  import { TooltipPlacement } from 'ant-design-vue/es/tooltip';
4
- import { ApStatusGroupItemProps } from './ap-status/interface';
4
+ import { ApStatusProps } from './ap-status/interface';
5
5
  export type { ApTitleProps } from './title/interface';
6
6
  export type { ApExpandAlertProps } from './expandAlert/interface';
7
7
  export type { ApLabelProps } from './ap-label/interface';
@@ -171,6 +171,11 @@ export declare const ApExpandAlert: {
171
171
  required: true;
172
172
  default: string;
173
173
  };
174
+ rows: {
175
+ type: PropType<string | number>;
176
+ required: true;
177
+ default: number;
178
+ };
174
179
  tipTitle: {
175
180
  type: PropType<string>;
176
181
  default: string;
@@ -179,8 +184,12 @@ export declare const ApExpandAlert: {
179
184
  type: PropType<string>;
180
185
  };
181
186
  }>> & {
187
+ onExpand?: ((...args: any[]) => any) | undefined;
182
188
  onChoose?: ((...args: any[]) => any) | undefined;
183
- }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
189
+ }, {
190
+ setExpand: (state?: boolean | undefined) => void;
191
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
192
+ expand: (...args: any[]) => void;
184
193
  choose: (...args: any[]) => void;
185
194
  }, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{
186
195
  type: {
@@ -202,6 +211,11 @@ export declare const ApExpandAlert: {
202
211
  required: true;
203
212
  default: string;
204
213
  };
214
+ rows: {
215
+ type: PropType<string | number>;
216
+ required: true;
217
+ default: number;
218
+ };
205
219
  tipTitle: {
206
220
  type: PropType<string>;
207
221
  default: string;
@@ -210,12 +224,14 @@ export declare const ApExpandAlert: {
210
224
  type: PropType<string>;
211
225
  };
212
226
  }>> & {
227
+ onExpand?: ((...args: any[]) => any) | undefined;
213
228
  onChoose?: ((...args: any[]) => any) | undefined;
214
229
  }, {
215
230
  type: "success" | "error" | "info" | "warning" | undefined;
216
231
  data: string | any[];
217
232
  prefix: string;
218
233
  separator: string;
234
+ rows: string | number;
219
235
  tipTitle: string;
220
236
  }, true, {}, {}, {
221
237
  P: {};
@@ -244,6 +260,11 @@ export declare const ApExpandAlert: {
244
260
  required: true;
245
261
  default: string;
246
262
  };
263
+ rows: {
264
+ type: PropType<string | number>;
265
+ required: true;
266
+ default: number;
267
+ };
247
268
  tipTitle: {
248
269
  type: PropType<string>;
249
270
  default: string;
@@ -252,12 +273,16 @@ export declare const ApExpandAlert: {
252
273
  type: PropType<string>;
253
274
  };
254
275
  }>> & {
276
+ onExpand?: ((...args: any[]) => any) | undefined;
255
277
  onChoose?: ((...args: any[]) => any) | undefined;
256
- }, {}, {}, {}, {}, {
278
+ }, {
279
+ setExpand: (state?: boolean | undefined) => void;
280
+ }, {}, {}, {}, {
257
281
  type: "success" | "error" | "info" | "warning" | undefined;
258
282
  data: string | any[];
259
283
  prefix: string;
260
284
  separator: string;
285
+ rows: string | number;
261
286
  tipTitle: string;
262
287
  }>;
263
288
  __isFragment?: undefined;
@@ -283,6 +308,11 @@ export declare const ApExpandAlert: {
283
308
  required: true;
284
309
  default: string;
285
310
  };
311
+ rows: {
312
+ type: PropType<string | number>;
313
+ required: true;
314
+ default: number;
315
+ };
286
316
  tipTitle: {
287
317
  type: PropType<string>;
288
318
  default: string;
@@ -291,23 +321,24 @@ export declare const ApExpandAlert: {
291
321
  type: PropType<string>;
292
322
  };
293
323
  }>> & {
324
+ onExpand?: ((...args: any[]) => any) | undefined;
294
325
  onChoose?: ((...args: any[]) => any) | undefined;
295
- }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
326
+ }, {
327
+ setExpand: (state?: boolean | undefined) => void;
328
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
329
+ expand: (...args: any[]) => void;
296
330
  choose: (...args: any[]) => void;
297
331
  }, string, {
298
332
  type: "success" | "error" | "info" | "warning" | undefined;
299
333
  data: string | any[];
300
334
  prefix: string;
301
335
  separator: string;
336
+ rows: string | number;
302
337
  tipTitle: string;
303
338
  }, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
304
339
  $slots: {
305
340
  default?(_: {}): any;
306
341
  };
307
- }) & Plugin<any[]> & (new (...args: any[]) => {
308
- $props: {
309
- onClick?: (() => void) | undefined;
310
- };
311
342
  });
312
343
  export declare const ApLabel: {
313
344
  new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
@@ -680,13 +711,19 @@ export declare const ApStatusGroup: {
680
711
  required: true;
681
712
  default: number;
682
713
  };
714
+ show: {
715
+ type: PropType<boolean>;
716
+ default: boolean;
717
+ };
683
718
  currentValue: {
684
719
  type: PropType<string | number>;
685
720
  required: true;
686
721
  default: number;
687
722
  };
688
723
  statusList: {
689
- type: PropType< ApStatusGroupItemProps[] | null>;
724
+ type: PropType<Required<Pick< ApStatusProps, "text" | "color"> & {
725
+ value: string | number;
726
+ }>[] | null>;
690
727
  required: true;
691
728
  default: null;
692
729
  };
@@ -699,20 +736,29 @@ export declare const ApStatusGroup: {
699
736
  required: true;
700
737
  default: number;
701
738
  };
739
+ show: {
740
+ type: PropType<boolean>;
741
+ default: boolean;
742
+ };
702
743
  currentValue: {
703
744
  type: PropType<string | number>;
704
745
  required: true;
705
746
  default: number;
706
747
  };
707
748
  statusList: {
708
- type: PropType< ApStatusGroupItemProps[] | null>;
749
+ type: PropType<Required<Pick< ApStatusProps, "text" | "color"> & {
750
+ value: string | number;
751
+ }>[] | null>;
709
752
  required: true;
710
753
  default: null;
711
754
  };
712
755
  }>>, {
713
756
  padding: number;
757
+ show: boolean;
714
758
  currentValue: string | number;
715
- statusList: ApStatusGroupItemProps[] | null;
759
+ statusList: Required<Pick< ApStatusProps, "text" | "color"> & {
760
+ value: string | number;
761
+ }>[] | null;
716
762
  }, true, {}, {}, {
717
763
  P: {};
718
764
  B: {};
@@ -729,20 +775,29 @@ export declare const ApStatusGroup: {
729
775
  required: true;
730
776
  default: number;
731
777
  };
778
+ show: {
779
+ type: PropType<boolean>;
780
+ default: boolean;
781
+ };
732
782
  currentValue: {
733
783
  type: PropType<string | number>;
734
784
  required: true;
735
785
  default: number;
736
786
  };
737
787
  statusList: {
738
- type: PropType< ApStatusGroupItemProps[] | null>;
788
+ type: PropType<Required<Pick< ApStatusProps, "text" | "color"> & {
789
+ value: string | number;
790
+ }>[] | null>;
739
791
  required: true;
740
792
  default: null;
741
793
  };
742
794
  }>>, {}, {}, {}, {}, {
743
795
  padding: number;
796
+ show: boolean;
744
797
  currentValue: string | number;
745
- statusList: ApStatusGroupItemProps[] | null;
798
+ statusList: Required<Pick< ApStatusProps, "text" | "color"> & {
799
+ value: string | number;
800
+ }>[] | null;
746
801
  }>;
747
802
  __isFragment?: undefined;
748
803
  __isTeleport?: undefined;
@@ -756,20 +811,29 @@ export declare const ApStatusGroup: {
756
811
  required: true;
757
812
  default: number;
758
813
  };
814
+ show: {
815
+ type: PropType<boolean>;
816
+ default: boolean;
817
+ };
759
818
  currentValue: {
760
819
  type: PropType<string | number>;
761
820
  required: true;
762
821
  default: number;
763
822
  };
764
823
  statusList: {
765
- type: PropType< ApStatusGroupItemProps[] | null>;
824
+ type: PropType<Required<Pick< ApStatusProps, "text" | "color"> & {
825
+ value: string | number;
826
+ }>[] | null>;
766
827
  required: true;
767
828
  default: null;
768
829
  };
769
830
  }>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
770
831
  padding: number;
832
+ show: boolean;
771
833
  currentValue: string | number;
772
- statusList: ApStatusGroupItemProps[] | null;
834
+ statusList: Required<Pick< ApStatusProps, "text" | "color"> & {
835
+ value: string | number;
836
+ }>[] | null;
773
837
  }, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & Plugin<any[]> & (new (...args: any[]) => {
774
838
  $props: {
775
839
  onClick?: (() => void) | undefined;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@aplus-frontend/utils");require("./title/ApTitle.vue.js");require("./expandAlert/ApExpandAlert.vue.js");require("./ap-label/ApLabel.vue.js");require("./ap-status/ApStatus.vue.js");require("./ap-status/ApStatusGroup.vue.js");const e=require("./title/ApTitle.vue2.js"),u=require("./expandAlert/ApExpandAlert.vue2.js"),r=require("./ap-label/ApLabel.vue2.js"),p=require("./ap-status/ApStatus.vue2.js"),s=require("./ap-status/ApStatusGroup.vue2.js"),_=t.withInstall(e.default),l=t.withInstall(u.default),a=t.withInstall(r.default),i=t.withInstall(p.default),n=t.withInstall(s.default);exports.ApExpandAlert=l;exports.ApLabel=a;exports.ApStatus=i;exports.ApStatusGroup=n;exports.ApTitle=_;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@aplus-frontend/utils");require("./title/ApTitle.vue.js");require("./expandAlert/ApExpandAlert.vue.js");require("./ap-label/ApLabel.vue.js");require("./ap-status/ApStatus.vue.js");require("./ap-status/ApStatusGroup.vue.js");const e=require("./title/ApTitle.vue2.js"),u=require("./expandAlert/ApExpandAlert.vue2.js"),r=require("./ap-label/ApLabel.vue2.js"),p=require("./ap-status/ApStatus.vue2.js"),_=require("./ap-status/ApStatusGroup.vue2.js"),s=t.withInstall(e.default),l=u.default,a=t.withInstall(r.default),i=t.withInstall(p.default),n=t.withInstall(_.default);exports.ApExpandAlert=l;exports.ApLabel=a;exports.ApStatus=i;exports.ApStatusGroup=n;exports.ApTitle=s;
@@ -1,6 +1,6 @@
1
1
  import { ExtractPropTypes, PropType } from 'vue';
2
2
  import { LocaleType } from '../locale/interface';
3
- import { ApiType, ScrollbarGlobalConfig, TableDefaultConfig } from './constants';
3
+ import { ApiType, ScrollbarGlobalConfig, TableDefaultConfig, ApUploadConfig } from './constants';
4
4
  import { default as __DTS_DEFAULT_0__ } from 'ant-design-vue/es/config-provider/renderEmpty';
5
5
  import { TransformCellTextProps } from 'ant-design-vue/es/table/interface';
6
6
  import { CSPConfig, SizeType, ThemeConfig } from 'ant-design-vue/es/config-provider/context';
@@ -148,5 +148,9 @@ export declare const configProviderProps: () => {
148
148
  type: PropType<"aplus" | "admin">;
149
149
  default: string;
150
150
  };
151
+ apUpload: {
152
+ type: PropType<ApUploadConfig>;
153
+ default: () => {};
154
+ };
151
155
  };
152
156
  export type ConfigProviderProps = Partial<ExtractPropTypes<ReturnType<typeof configProviderProps>>>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("ant-design-vue/es/config-provider/context"),t=()=>({aplusLocale:{type:Object},namespace:{type:String,default:"aplus"},api:{type:Object,default:()=>({})},table:{type:Object},scrollbar:{type:Object,default:()=>({native:!1})},uiMode:{type:String,default:"aplus"},...e.configProviderProps()});exports.configProviderProps=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("ant-design-vue/es/config-provider/context"),t=()=>({aplusLocale:{type:Object},namespace:{type:String,default:"aplus"},api:{type:Object,default:()=>({})},table:{type:Object},scrollbar:{type:Object,default:()=>({native:!1})},uiMode:{type:String,default:"aplus"},apUpload:{type:Object,default:()=>({})},...e.configProviderProps()});exports.configProviderProps=t;
@@ -8,7 +8,7 @@ import { ValidateMessages } from 'ant-design-vue/es/form/interface';
8
8
  import { RequiredMark } from 'ant-design-vue/es/form/Form';
9
9
  import { ThemeConfig } from 'ant-design-vue/es/config-provider/context';
10
10
  import { LocaleType } from '..';
11
- import { ApiType, TableDefaultConfig, ScrollbarGlobalConfig } from './constants';
11
+ import { ApiType, TableDefaultConfig, ScrollbarGlobalConfig, ApUploadConfig } from './constants';
12
12
  export declare const ConfigProvider: DefineComponent<{
13
13
  iconPrefixCls: StringConstructor;
14
14
  getTargetContainer: {
@@ -146,6 +146,10 @@ export declare const ConfigProvider: DefineComponent<{
146
146
  type: PropType<"aplus" | "admin">;
147
147
  default: string;
148
148
  };
149
+ apUpload: {
150
+ type: PropType<ApUploadConfig>;
151
+ default: () => {};
152
+ };
149
153
  }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
150
154
  iconPrefixCls: StringConstructor;
151
155
  getTargetContainer: {
@@ -283,6 +287,10 @@ export declare const ConfigProvider: DefineComponent<{
283
287
  type: PropType<"aplus" | "admin">;
284
288
  default: string;
285
289
  };
290
+ apUpload: {
291
+ type: PropType<ApUploadConfig>;
292
+ default: () => {};
293
+ };
286
294
  }>>, {
287
295
  theme: ThemeConfig;
288
296
  direction: "ltr" | "rtl";
@@ -319,5 +327,6 @@ export declare const ConfigProvider: DefineComponent<{
319
327
  api: ApiType;
320
328
  scrollbar: ScrollbarGlobalConfig;
321
329
  uiMode: "aplus" | "admin";
330
+ apUpload: ApUploadConfig;
322
331
  }, {}>;
323
332
  export type ConfigProviderInstance = InstanceType<typeof ConfigProvider>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),c=require("ant-design-vue"),l=require("./hooks/use-global-config.js"),a=require("./config-provider-props.js"),u=require("./constants.js"),s=require("../utils/config-provider-preset.js");function d(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!o.isVNode(e)}const f=o.defineComponent({name:"AplusConfigProvider",props:a.configProviderProps(),setup(e,{slots:n}){const i=o.computed(()=>({namespace:e.namespace,aplusLocale:e.aplusLocale,api:e.api,table:{...u.tableDefaultConfig,...e.table||{}},scrollbar:e.scrollbar,uiMode:e.uiMode})),t=l.provideGlobalConfig(i);return()=>{let r;return o.createVNode(c.ConfigProvider,s.mergeAntdProvideConfig(e),d(r=o.renderSlot(n,"default",{config:t==null?void 0:t.value}))?r:{default:()=>[r]})}}});exports.ConfigProvider=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),a=require("ant-design-vue"),l=require("./hooks/use-global-config.js"),c=require("./config-provider-props.js"),u=require("./constants.js"),d=require("../utils/config-provider-preset.js");function s(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!o.isVNode(e)}const f=o.defineComponent({name:"AplusConfigProvider",props:c.configProviderProps(),setup(e,{slots:n}){const i=o.computed(()=>({namespace:e.namespace,aplusLocale:e.aplusLocale,api:e.api,table:{...u.tableDefaultConfig,...e.table||{}},scrollbar:e.scrollbar,uiMode:e.uiMode,apUpload:e.apUpload})),t=l.provideGlobalConfig(i);return()=>{let r;return o.createVNode(a.ConfigProvider,d.mergeAntdProvideConfig(e),s(r=o.renderSlot(n,"default",{config:t==null?void 0:t.value}))?r:{default:()=>[r]})}}});exports.ConfigProvider=f;
@@ -3,6 +3,7 @@ import { InjectionKey, Ref } from 'vue';
3
3
  import { SizeType, SorterResult } from '../pro-table/types/table';
4
4
  import { Fn } from '../type';
5
5
  import { CommonOptionItem, ApiSelectOption } from '../pro-form/components/interface';
6
+ import { client } from '@aplus-frontend/oss';
6
7
 
7
8
  export type ConfigProviderContext = Partial<ConfigProviderProps>;
8
9
  export declare const configProviderContextKey: InjectionKey<Ref<ConfigProviderContext>>;
@@ -29,4 +30,13 @@ export type ApiType = {
29
30
  radioGroup?: (args?: any) => Promise<CommonOptionItem[]>;
30
31
  select?: (args?: any) => Promise<ApiSelectOption[]>;
31
32
  };
33
+ export type ApUploadConfig = {
34
+ dirName?: string;
35
+ getOssAccess?: Parameters<typeof client.initOssClient>[0]['getOssAccess'];
36
+ needName?: boolean | {
37
+ pathKey?: string;
38
+ nameKey?: string;
39
+ };
40
+ accept?: string;
41
+ };
32
42
  export {};
@@ -1,6 +1,6 @@
1
1
  import { MaybeRef } from '@aplus-frontend/utils';
2
2
  import { App, Ref, ComputedRef, ExtractPropTypes, PropType } from 'vue';
3
- import { ConfigProviderContext, ApiType, TableDefaultConfig, ScrollbarGlobalConfig } from '../constants';
3
+ import { ConfigProviderContext, ApiType, TableDefaultConfig, ScrollbarGlobalConfig, ApUploadConfig } from '../constants';
4
4
  import { default as __DTS_DEFAULT_0__ } from 'ant-design-vue/es/config-provider/renderEmpty';
5
5
  import { TransformCellTextProps } from 'ant-design-vue/es/table/interface';
6
6
  import { CSPConfig } from 'ant-design-vue/es/config-provider';
@@ -151,4 +151,8 @@ export declare const provideGlobalConfig: (config: MaybeRef<ConfigProviderContex
151
151
  type: PropType<"aplus" | "admin">;
152
152
  default: string;
153
153
  };
154
+ apUpload: {
155
+ type: PropType<ApUploadConfig>;
156
+ default: () => {};
157
+ };
154
158
  }>>>> | undefined;
@@ -8,7 +8,7 @@ import { ValidateMessages } from 'ant-design-vue/es/form/interface';
8
8
  import { RequiredMark } from 'ant-design-vue/es/form/Form';
9
9
  import { ThemeConfig } from 'ant-design-vue/es/config-provider/context';
10
10
  import { LocaleType } from '..';
11
- import { ApiType, TableDefaultConfig, ScrollbarGlobalConfig } from './constants';
11
+ import { ApiType, TableDefaultConfig, ScrollbarGlobalConfig, ApUploadConfig } from './constants';
12
12
  export * from './config-provider-props';
13
13
  export * from './constants';
14
14
  export * from './hooks/use-global-config';
@@ -153,6 +153,10 @@ export declare const APConfigProvider: {
153
153
  type: PropType<"aplus" | "admin">;
154
154
  default: string;
155
155
  };
156
+ apUpload: {
157
+ type: PropType<ApUploadConfig>;
158
+ default: () => {};
159
+ };
156
160
  }>>, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{
157
161
  iconPrefixCls: StringConstructor;
158
162
  getTargetContainer: {
@@ -290,6 +294,10 @@ export declare const APConfigProvider: {
290
294
  type: PropType<"aplus" | "admin">;
291
295
  default: string;
292
296
  };
297
+ apUpload: {
298
+ type: PropType<ApUploadConfig>;
299
+ default: () => {};
300
+ };
293
301
  }>>, {
294
302
  theme: ThemeConfig;
295
303
  direction: "ltr" | "rtl";
@@ -326,6 +334,7 @@ export declare const APConfigProvider: {
326
334
  api: ApiType;
327
335
  scrollbar: ScrollbarGlobalConfig;
328
336
  uiMode: "aplus" | "admin";
337
+ apUpload: ApUploadConfig;
329
338
  }, true, {}, {}, {
330
339
  P: {};
331
340
  B: {};
@@ -470,6 +479,10 @@ export declare const APConfigProvider: {
470
479
  type: PropType<"aplus" | "admin">;
471
480
  default: string;
472
481
  };
482
+ apUpload: {
483
+ type: PropType<ApUploadConfig>;
484
+ default: () => {};
485
+ };
473
486
  }>>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
474
487
  theme: ThemeConfig;
475
488
  direction: "ltr" | "rtl";
@@ -506,6 +519,7 @@ export declare const APConfigProvider: {
506
519
  api: ApiType;
507
520
  scrollbar: ScrollbarGlobalConfig;
508
521
  uiMode: "aplus" | "admin";
522
+ apUpload: ApUploadConfig;
509
523
  }>;
510
524
  __isFragment?: undefined;
511
525
  __isTeleport?: undefined;
@@ -647,6 +661,10 @@ export declare const APConfigProvider: {
647
661
  type: PropType<"aplus" | "admin">;
648
662
  default: string;
649
663
  };
664
+ apUpload: {
665
+ type: PropType<ApUploadConfig>;
666
+ default: () => {};
667
+ };
650
668
  }>>, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
651
669
  theme: ThemeConfig;
652
670
  direction: "ltr" | "rtl";
@@ -683,6 +701,7 @@ export declare const APConfigProvider: {
683
701
  api: ApiType;
684
702
  scrollbar: ScrollbarGlobalConfig;
685
703
  uiMode: "aplus" | "admin";
704
+ apUpload: ApUploadConfig;
686
705
  }, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & Plugin<any[]> & (new (...args: any[]) => {
687
706
  $props: {
688
707
  onClick?: (() => void) | undefined;