@aplus-frontend/ui 6.30.1 → 6.31.1

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 (40) hide show
  1. package/es/src/ap-grid/utils/col.d.ts +1 -0
  2. package/es/src/ap-grid/utils/col.mjs +54 -49
  3. package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +95 -81
  4. package/es/src/business/ap-appendix/icons/empty-admin-icon.vue.d.ts +3 -0
  5. package/es/src/business/ap-appendix/icons/empty-admin-icon.vue.mjs +20 -0
  6. package/es/src/business/ap-appendix/icons/empty-aplus-icon.vue.d.ts +3 -0
  7. package/es/src/business/ap-appendix/icons/empty-aplus-icon.vue.mjs +20 -0
  8. package/es/src/business/ap-appendix/interface.d.ts +1 -0
  9. package/es/src/business/ap-copy/ApCopy.d.ts +28 -1
  10. package/es/src/business/ap-copy/ApCopy.mjs +42 -38
  11. package/es/src/business/ap-copy/constans.d.ts +12 -0
  12. package/es/src/business/ap-copy/constans.mjs +13 -0
  13. package/es/src/business/ap-copy/index.d.ts +48 -3
  14. package/es/src/business/ap-copy/interface.d.ts +4 -1
  15. package/es/src/locale/lang/en.mjs +2 -1
  16. package/es/src/locale/lang/zh-cn.mjs +2 -1
  17. package/es/src/version.d.ts +1 -1
  18. package/es/src/version.mjs +1 -1
  19. package/lib/src/ap-grid/utils/col.d.ts +1 -0
  20. package/lib/src/ap-grid/utils/col.js +1 -1
  21. package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
  22. package/lib/src/business/ap-appendix/icons/empty-admin-icon.vue.d.ts +3 -0
  23. package/lib/src/business/ap-appendix/icons/empty-admin-icon.vue.js +1 -0
  24. package/lib/src/business/ap-appendix/icons/empty-aplus-icon.vue.d.ts +3 -0
  25. package/lib/src/business/ap-appendix/icons/empty-aplus-icon.vue.js +1 -0
  26. package/lib/src/business/ap-appendix/interface.d.ts +1 -0
  27. package/lib/src/business/ap-copy/ApCopy.d.ts +28 -1
  28. package/lib/src/business/ap-copy/ApCopy.js +1 -1
  29. package/lib/src/business/ap-copy/constans.d.ts +12 -0
  30. package/lib/src/business/ap-copy/constans.js +1 -1
  31. package/lib/src/business/ap-copy/index.d.ts +48 -3
  32. package/lib/src/business/ap-copy/interface.d.ts +4 -1
  33. package/lib/src/locale/lang/en.js +1 -1
  34. package/lib/src/locale/lang/zh-cn.js +1 -1
  35. package/lib/src/version.d.ts +1 -1
  36. package/lib/src/version.js +1 -1
  37. package/package.json +1 -1
  38. package/theme/ap-appendix/ap-appendix.css +15 -0
  39. package/theme/ap-appendix/ap-appendix.less +15 -0
  40. package/theme/index.css +15 -0
@@ -1,46 +1,47 @@
1
- import { defineComponent as b, Text as c, isVNode as f, computed as p, createVNode as r, Fragment as C } from "vue";
1
+ import { defineComponent as C, Text as f, isVNode as y, computed as m, createVNode as r, Fragment as b } from "vue";
2
2
  import { ApCopyProps as T } from "./constans.mjs";
3
3
  import { IconApAdLineCopy as h } from "@aplus-frontend/icon";
4
4
  import "../../config-provider/index.mjs";
5
- import { message as y } from "@aplus-frontend/antdv";
6
- import { isNull as k, isUndefined as P } from "lodash-unified";
7
- import { useNamespace as j } from "../../config-provider/hooks/use-namespace.mjs";
8
- import { useLocale as A } from "../../config-provider/hooks/use-locale.mjs";
9
- const B = /* @__PURE__ */ b({
5
+ import { message as d } from "@aplus-frontend/antdv";
6
+ import { isNull as P, isUndefined as j, isString as A, isBoolean as N } from "lodash-unified";
7
+ import { useNamespace as V } from "../../config-provider/hooks/use-namespace.mjs";
8
+ import { useLocale as w } from "../../config-provider/hooks/use-locale.mjs";
9
+ const D = /* @__PURE__ */ C({
10
10
  name: "CopyBtn",
11
11
  props: T(),
12
- setup(n, {
13
- slots: m
12
+ setup(e, {
13
+ slots: p
14
14
  }) {
15
+ console.log("props.link", e.link);
15
16
  const {
16
- b: d,
17
+ b: x,
17
18
  e: l,
18
- m: x
19
- } = j("ap-copy"), {
20
- t: a
21
- } = A(), g = (t) => {
22
- t.stopPropagation(), t.preventDefault(), t.stopImmediatePropagation(), navigator.clipboard.writeText(n.text || s() || "").then(() => {
23
- y.success(a("ap.apCopy.copySuccess"));
19
+ m: a
20
+ } = V("ap-copy"), {
21
+ t: s
22
+ } = w(), g = (t, n, k) => {
23
+ t.stopPropagation(), t.preventDefault(), t.stopImmediatePropagation(), navigator.clipboard.writeText(e.text || c() || "").then(() => {
24
+ d.success(n || s("ap.apCopy.copySuccess"));
24
25
  }).catch(() => {
25
- y.error(a("ap.apCopy.copyError"));
26
+ d.error(k || s("ap.apCopy.copyError"));
26
27
  });
27
28
  }, v = (t) => {
28
29
  if (t.length === 1) {
29
- const e = t[0];
30
- if (e.type === c || e.type.toString() === "Symbol(Text)" || f(e) && typeof e.children == "string")
30
+ const n = t[0];
31
+ if (n.type === f || n.type.toString() === "Symbol(Text)" || y(n) && typeof n.children == "string")
31
32
  return !0;
32
33
  }
33
34
  return !1;
34
35
  }, S = (t) => {
35
36
  if (!t.length) return "";
36
- const e = t[0];
37
- return e.type === c || e.type.toString() === "Symbol(Text)" ? String(e.children) : f(e) && typeof e.children == "string" ? e.children : "";
38
- }, s = () => {
39
- const t = m.default?.();
37
+ const n = t[0];
38
+ return n.type === f || n.type.toString() === "Symbol(Text)" ? String(n.children) : y(n) && typeof n.children == "string" ? n.children : "";
39
+ }, c = () => {
40
+ const t = p.default?.();
40
41
  return t && v(t) ? S(t) : null;
41
- }, u = (t) => !(k(t) || P(t) || typeof t == "string" && t === ""), o = p(() => {
42
- if (typeof n.textStyle == "string")
43
- switch (n.textStyle) {
42
+ }, u = (t) => !(P(t) || j(t) || typeof t == "string" && t === ""), o = m(() => {
43
+ if (typeof e.textStyle == "string")
44
+ switch (e.textStyle) {
44
45
  case "link":
45
46
  return "text-link";
46
47
  case "minor":
@@ -50,31 +51,34 @@ const B = /* @__PURE__ */ b({
50
51
  default:
51
52
  return "text-major";
52
53
  }
53
- else if (typeof n.textStyle == "object")
54
+ else if (typeof e.textStyle == "object")
54
55
  return {
55
- ...n.textStyle
56
+ ...e.textStyle
56
57
  };
57
58
  return {};
58
- }), i = p(() => s() || n.text || "");
59
- return () => r(C, null, [r("div", {
60
- class: [d()]
59
+ }), i = m(() => c() || e.text || "");
60
+ return () => r(b, null, [r("div", {
61
+ class: [x()]
61
62
  }, [r("div", {
62
- class: [l("text"), typeof o.value == "string" && x(o.value)],
63
+ class: [l("text"), typeof o.value == "string" && a(o.value)],
63
64
  style: typeof o.value != "string" && o.value,
64
- title: typeof o.value == "string" ? i.value : ""
65
- }, [u(i.value) ? n.link ? r("a", {
66
- href: n.link,
65
+ title: typeof o.value == "string" ? i.value : "",
66
+ onClick: e.onClick ? () => e.onClick() : void 0
67
+ }, [u(i.value) ? e.link && A(e.link) ? r("a", {
68
+ href: e.link,
67
69
  target: "_blank"
68
- }, [i.value]) : i.value : "--"]), u(i.value) && !n.disableCopy ? r("div", {
70
+ }, [i.value]) : N(e.link) ? r("span", {
71
+ class: a("text-link")
72
+ }, [i.value]) : i.value : "--"]), u(i.value) && !e.disableCopy ? r("div", {
69
73
  class: [l("copy-btn"), "copy-btn"],
70
- onClick: n.disableCopy ? void 0 : g
74
+ onClick: e.disableCopy ? void 0 : (t) => g(t, e.tipMessageSuccess, e.tipMessageError)
71
75
  }, [r(h, {
72
- size: n.size
76
+ size: e.size
73
77
  }, null)]) : r("div", {
74
78
  class: [l("copy-btn"), "copy-btn"]
75
79
  }, null)])]);
76
80
  }
77
81
  });
78
82
  export {
79
- B as default
83
+ D as default
80
84
  };
@@ -21,4 +21,16 @@ export declare const ApCopyProps: () => {
21
21
  type: PropType<ApCopy["disableCopy"]>;
22
22
  default: boolean;
23
23
  };
24
+ onClick: {
25
+ type: PropType<ApCopy["onClick"]>;
26
+ default: () => void;
27
+ };
28
+ tipMessageSuccess: {
29
+ type: PropType<ApCopy["tipMessageSuccess"]>;
30
+ default: string;
31
+ };
32
+ tipMessageError: {
33
+ type: PropType<ApCopy["tipMessageError"]>;
34
+ default: string;
35
+ };
24
36
  };
@@ -18,6 +18,19 @@ const t = () => ({
18
18
  disableCopy: {
19
19
  type: Boolean,
20
20
  default: !1
21
+ },
22
+ onClick: {
23
+ type: Function,
24
+ default: () => {
25
+ }
26
+ },
27
+ tipMessageSuccess: {
28
+ type: String,
29
+ default: ""
30
+ },
31
+ tipMessageError: {
32
+ type: String,
33
+ default: ""
21
34
  }
22
35
  });
23
36
  export {
@@ -23,12 +23,27 @@ declare const ApCopy: {
23
23
  type: PropType< ApCopy["disableCopy"]>;
24
24
  default: boolean;
25
25
  };
26
+ onClick: {
27
+ type: PropType< ApCopy["onClick"]>;
28
+ default: () => void;
29
+ };
30
+ tipMessageSuccess: {
31
+ type: PropType< ApCopy["tipMessageSuccess"]>;
32
+ default: string;
33
+ };
34
+ tipMessageError: {
35
+ type: PropType< ApCopy["tipMessageError"]>;
36
+ default: string;
37
+ };
26
38
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
27
39
  size: number | undefined;
28
- link: string | undefined;
40
+ link: string | boolean | undefined;
41
+ onClick: (() => void) | undefined;
29
42
  text: string | undefined;
30
43
  textStyle: "link" | CSSProperties | "major" | "minor" | undefined;
31
44
  disableCopy: boolean | undefined;
45
+ tipMessageSuccess: string | undefined;
46
+ tipMessageError: string | undefined;
32
47
  }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
33
48
  P: {};
34
49
  B: {};
@@ -57,12 +72,27 @@ declare const ApCopy: {
57
72
  type: PropType< ApCopy["disableCopy"]>;
58
73
  default: boolean;
59
74
  };
75
+ onClick: {
76
+ type: PropType< ApCopy["onClick"]>;
77
+ default: () => void;
78
+ };
79
+ tipMessageSuccess: {
80
+ type: PropType< ApCopy["tipMessageSuccess"]>;
81
+ default: string;
82
+ };
83
+ tipMessageError: {
84
+ type: PropType< ApCopy["tipMessageError"]>;
85
+ default: string;
86
+ };
60
87
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
61
88
  size: number | undefined;
62
- link: string | undefined;
89
+ link: string | boolean | undefined;
90
+ onClick: (() => void) | undefined;
63
91
  text: string | undefined;
64
92
  textStyle: "link" | CSSProperties | "major" | "minor" | undefined;
65
93
  disableCopy: boolean | undefined;
94
+ tipMessageSuccess: string | undefined;
95
+ tipMessageError: string | undefined;
66
96
  }>;
67
97
  __isFragment?: never;
68
98
  __isTeleport?: never;
@@ -88,12 +118,27 @@ declare const ApCopy: {
88
118
  type: PropType< ApCopy["disableCopy"]>;
89
119
  default: boolean;
90
120
  };
121
+ onClick: {
122
+ type: PropType< ApCopy["onClick"]>;
123
+ default: () => void;
124
+ };
125
+ tipMessageSuccess: {
126
+ type: PropType< ApCopy["tipMessageSuccess"]>;
127
+ default: string;
128
+ };
129
+ tipMessageError: {
130
+ type: PropType< ApCopy["tipMessageError"]>;
131
+ default: string;
132
+ };
91
133
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
92
134
  size: number | undefined;
93
- link: string | undefined;
135
+ link: string | boolean | undefined;
136
+ onClick: (() => void) | undefined;
94
137
  text: string | undefined;
95
138
  textStyle: "link" | CSSProperties | "major" | "minor" | undefined;
96
139
  disableCopy: boolean | undefined;
140
+ tipMessageSuccess: string | undefined;
141
+ tipMessageError: string | undefined;
97
142
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & ( Plugin & (new (...args: any[]) => {
98
143
  $props: {
99
144
  onClick?: () => void;
@@ -3,6 +3,9 @@ export interface ApCopy {
3
3
  text?: string;
4
4
  size?: number;
5
5
  textStyle?: 'major' | 'minor' | 'link' | CSSProperties;
6
- link?: string;
6
+ link?: string | boolean;
7
7
  disableCopy?: boolean;
8
+ onClick?: () => void;
9
+ tipMessageSuccess?: string;
10
+ tipMessageError?: string;
8
11
  }
@@ -145,7 +145,8 @@ const a = {
145
145
  apAppendix: {
146
146
  downloadAll: "Download All",
147
147
  downloadFile: "Download file",
148
- appendix: "Appendix"
148
+ appendix: "Appendix",
149
+ empty: "No data"
149
150
  },
150
151
  batchInputGroup: {
151
152
  popoverInputPlaceholder: "A maximum of {maxNum} entries can be entered in batches, separated by newlines"
@@ -153,7 +153,8 @@ const a = {
153
153
  apAppendix: {
154
154
  downloadAll: "下载全部",
155
155
  downloadFile: "下载文件",
156
- appendix: "附件"
156
+ appendix: "附件",
157
+ empty: "暂无数据"
157
158
  },
158
159
  batchInputGroup: {
159
160
  popoverInputPlaceholder: "支持批量输入,可用换行符分隔,最多输入{maxNum}条"
@@ -1,2 +1,2 @@
1
- declare const _default: "6.30.1";
1
+ declare const _default: "6.31.1";
2
2
  export default _default;
@@ -1,4 +1,4 @@
1
- const e = "6.30.1";
1
+ const e = "6.31.1";
2
2
  export {
3
3
  e as default
4
4
  };
@@ -1,6 +1,7 @@
1
1
  import { DataIndex } from '@aplus-frontend/antdv/es/vc-table/interface';
2
2
  import { ApGridColumnType, ColConfigType } from '../interface';
3
3
  import { ValueTypeRenderConfig } from '../../config-provider';
4
+ export declare function getValueByDataIndex(row: any, dataIndex?: DataIndex): any;
4
5
  export declare function dataIndexToField(dataIndex: DataIndex): string | undefined;
5
6
  export declare function transformFixed(fixed: ApGridColumnType['fixed']): "left" | "right" | undefined;
6
7
  /**
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("vue"),s=require("lodash-unified"),o=require("../../ap-table/utils.js"),F=require("../../ap-table/constants.js");require("../../ap-table/components/paragraph-ellipsis/index.vue.js");const x=require("../../ap-table/components/paragraph-ellipsis/index.vue2.js");function T(e){if(!s.isUndefined(e))return s.isArray(e)?e.reduce((t,r)=>s.isString(r)?`${t}.${r}`:`${t}[${r}]`,""):String(e)}function y(e){if(e)return e===!0?"left":e}function q(e){return s.isBoolean(e)?{sortable:e}:e?{sortable:!0,sortType:e?.type,sortBy:e?.by}:{sortable:!1}}function N(e){let t;return s.isBoolean(e.filters)&&e.valueEnum?t=o.valueEnumToArray(e.valueEnum):t=e.filters,t?.map(r=>({label:s.isString(r.text)?r.text:"",value:r.value}))}function A(e){if(e)return t=>e(t.value,t.row)}function R(e,t){return e?s.isNumber(e)?{tooltip:t,rows:e}:e===!0||e==="tooltip"?{tooltip:t,rows:1}:{tooltip:null,rows:1,htmlTitle:e==="title"?t:""}:!1}function S(e,t,r){if(F.noRenderAsFormItemValueList.includes(e.valueType))return r;if(e.copyable||e.ellipsis){const n=R(e.ellipsis,t),i=o.objectToString(t);return f.createVNode(x.default,{rawValue:i,copyable:e.copyable,ellipsis:n,content:r},null)}return r}function h(e,t,r){const n=s.pick(e,["width","minWidth","align"]);return n.field=T(e.dataIndex),n.fixed=y(e.fixed),n.slots={header:()=>o.getTableTitle(e,r,void 0,t)},n.headerAlign=e.align,n.showOverflow=!1,n.showFooterOverflow=!1,n}const v=({value:e,...t},r,n,i=!0)=>{const d=o.getTableRenderType(r),a=o.getTableRenderProps({...r,valueType:d},{value:e,...t}),l=o.getTableCellRenderNode(d,a,t.record,n),u=r.renderText?.({value:e,...t})||e,b=r.renderText?f.createVNode(f.Fragment,null,[r.renderText?.({value:e,...t})]):l;let p=i?S(r,u,b):b;return r.customRender&&(p=r.customRender({value:e,...t,column:r,originalNode:p,originalText:u})),f.createVNode(f.Fragment,null,[p])};function c(e,t,r,n){const i=s.pick(e,["width","minWidth","align","resizable","className","headerClassName","footerClassName","treeNode"]);i.field=T(e.dataIndex),i.fixed=y(e.fixed),i.headerAlign=e.align,i.footerAlign=e.align,i.showOverflow=!1,i.showFooterOverflow=!1,Object.assign(i,q(e.sorter)),i.filters=N(e),i.filterMultiple=e.filterMultiple,i.filterMethod=A(e.onFilter);const d=({row:a,rowIndex:l})=>v({value:a[i.field],text:a[i.field],record:a,index:l,renderIndex:l,column:e},e,n);return i.slots={header:()=>o.getTableTitle(e,r,void 0,t),default:d,footer:d},e.html&&(delete i.slots.default,delete i.slots.footer,i.type="html"),e.seq&&(i.type="seq",i.slots={}),i}function _(e,t,r,n){if(!e.children?.length)return c(e,t,r,n);function i(a){return a.map(l=>{if(l.children?.length){const u=h(l,t,r);return u.children=i(l.children),u}return c(l,t,r,n)})}const d=h(e,t,r);return d.children=i(e.children),d}exports.contentCustom=v;exports.dataIndexToField=T;exports.transformCol=_;exports.transformFixed=y;exports.transformToColGroup=h;exports.transformToColumn=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("vue"),l=require("lodash-unified"),u=require("../../ap-table/utils.js"),x=require("../../ap-table/constants.js");require("../../ap-table/components/paragraph-ellipsis/index.vue.js");const q=require("../../ap-table/components/paragraph-ellipsis/index.vue2.js");function h(e,t){if(t)return l.isArray(t)?t.reduce((r,n)=>r?.[n],e):e?.[t]}function y(e){if(!l.isUndefined(e))return l.isArray(e)?e.reduce((t,r)=>l.isString(r)?`${t}${t?".":""}${r}`:`${t}[${r}]`,""):String(e)}function b(e){if(e)return e===!0?"left":e}function A(e){return l.isBoolean(e)?{sortable:e}:e?{sortable:!0,sortType:e?.type,sortBy:e?.by}:{sortable:!1}}function N(e){let t;return l.isBoolean(e.filters)&&e.valueEnum?t=u.valueEnumToArray(e.valueEnum):t=e.filters,t?.map(r=>({label:l.isString(r.text)?r.text:"",value:r.value}))}function R(e){if(e)return t=>e(t.value,t.row)}function S(e,t){return e?l.isNumber(e)?{tooltip:t,rows:e}:e===!0||e==="tooltip"?{tooltip:t,rows:1}:{tooltip:null,rows:1,htmlTitle:e==="title"?t:""}:!1}function V(e,t,r){if(x.noRenderAsFormItemValueList.includes(e.valueType))return r;if(e.copyable||e.ellipsis){const n=S(e.ellipsis,t),i=u.objectToString(t);return f.createVNode(q.default,{rawValue:i,copyable:e.copyable,ellipsis:n,content:r},null)}return r}function c(e,t,r){const n=l.pick(e,["width","minWidth","align"]);return n.field=y(e.dataIndex),n.fixed=b(e.fixed),n.slots={header:()=>u.getTableTitle(e,r,void 0,t)},n.headerAlign=e.align,n.showOverflow=!1,n.showFooterOverflow=!1,n}const v=({value:e,...t},r,n,i=!0)=>{const a=u.getTableRenderType(r),d=u.getTableRenderProps({...r,valueType:a},{value:e,...t}),s=u.getTableCellRenderNode(a,d,t.record,n),o=r.renderText?.({value:e,...t})||e,F=r.renderText?f.createVNode(f.Fragment,null,[r.renderText?.({value:e,...t})]):s;let p=i?V(r,o,F):F;return r.customRender&&(p=r.customRender({value:e,...t,column:r,originalNode:p,originalText:o})),f.createVNode(f.Fragment,null,[p])};function T(e,t,r,n){const i=l.pick(e,["width","minWidth","align","resizable","className","headerClassName","footerClassName","treeNode"]);i.field=y(e.dataIndex),i.fixed=b(e.fixed),i.headerAlign=e.align,i.footerAlign=e.align,i.showOverflow=!1,i.showFooterOverflow=!1,Object.assign(i,A(e.sorter)),i.filters=N(e),i.filterMultiple=e.filterMultiple,i.filterMethod=R(e.onFilter);const a=({row:d,rowIndex:s})=>v({value:h(d,e.dataIndex),text:h(d,e.dataIndex),record:d,index:s,renderIndex:s,column:e},e,n);return i.slots={header:()=>u.getTableTitle(e,r,void 0,t),default:a,footer:a},e.html&&(delete i.slots.default,delete i.slots.footer,i.type="html"),e.seq&&(i.type="seq",i.slots={}),i}function _(e,t,r,n){if(!e.children?.length)return T(e,t,r,n);function i(d){return d.map(s=>{if(s.children?.length){const o=c(s,t,r);return o.children=i(s.children),o}return T(s,t,r,n)})}const a=c(e,t,r);return a.children=i(e.children),a}exports.contentCustom=v;exports.dataIndexToField=y;exports.getValueByDataIndex=h;exports.transformCol=_;exports.transformFixed=b;exports.transformToColGroup=c;exports.transformToColumn=T;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),B=require("./icons/file-icon.vue.js"),m=require("@aplus-frontend/antdv"),L=require("@aplus-frontend/icon"),A=require("@ant-design/icons-vue");require("../ap-title/ApTitle.vue.js");require("../../ap-download/ap-download.vue2.js");require("../../config-provider/index.js");const q=require("./utils/index.js"),w=require("../../config-provider/hooks/use-namespace.js"),V=require("../../config-provider/hooks/use-locale.js"),v=require("../../config-provider/hooks/use-global-config.js"),h=require("../ap-title/ApTitle.vue2.js"),b=require("../../ap-download/ap-download.vue.js"),x=["onClick"],E=e.defineComponent({__name:"ap-appendix",props:{fileList:{},needName:{type:[Boolean,Object],default:!1},getOssAccess:{},title:{},tooltip:{},column:{default:2},isFileAreaBorder:{type:Boolean,default:!1}},setup(g){const{b:C,e:a,em:d}=w.useNamespace("ap-appendix"),{t:s}=V.useLocale(),l=g,k=v.useGlobalConfig("apUpload"),f=v.useGlobalConfig("downloadCenterTriggerConfig"),i=e.computed(()=>q.getFileInfo(l?.needName,l?.fileList??[])),_=e.computed(()=>l.getOssAccess||k.value?.getOssAccess),p=e.computed(()=>!(Array.isArray(i.value)&&i.value.length)),n=e.ref([]),y=e.computed(()=>l.title||s("ap.apAppendix.appendix"));async function N(o,r){if(!(n.value.findIndex(t=>t===r)>-1)){n.value=[...n.value,r];try{if(f.value?.trigger){let t=[o].map(u=>({objectName:u.path,fileName:u.fileName}));await f.value?.trigger(t)}}finally{n.value=n.value.filter(t=>t!==r)}}}return(o,r)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({class:[e.unref(C)()]},{...o.$attrs},{style:{"--ap-appendix-column":`repeat(${Number(l?.column||2)}, 1fr)`}}),[e.renderSlot(o.$slots,"title",{fileList:l.fileList},()=>[e.createVNode(h.default,{title:y.value,"help-message":l?.tooltip},{suffix:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass([e.unref(a)("suffix")])},[e.renderSlot(o.$slots,"titleSuffix",{fileList:l.fileList}),e.renderSlot(o.$slots,"titleDownloadAllBtn",{fileList:l.fileList},()=>[p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(b.default,{key:0,class:e.normalizeClass([e.unref(a)("download-all")]),text:e.unref(s)("ap.apAppendix.downloadAll"),"get-oss-access":_.value,"file-name":i.value},{icon:e.withCtx(()=>[e.createVNode(e.unref(L.IconVariantDownload))]),_:1},8,["class","text","get-oss-access","file-name"]))])],2)]),_:3},8,["title","help-message"])]),e.renderSlot(o.$slots,"fileArea",{fileList:l.fileList},()=>[p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass({[e.unref(a)("file-area")]:!0,[e.unref(d)("file-area","border")]:!!l.isFileAreaBorder})},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(a)("file-area-content")])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(c,t)=>(e.openBlock(),e.createElementBlock("div",{key:t,class:e.normalizeClass({[e.unref(a)("file-area-content-item")]:!0,[e.unref(d)("file-area-content-item","loading")]:n.value.includes(t)})},[e.createVNode(e.unref(m.Tooltip),null,e.createSlots({default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass({[e.unref(a)("file-area-content-item-content")]:!0,[e.unref(a)("file-area-content-item--loading-content")]:n.value.includes(t)}),onClick:u=>N(c,t)},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(a)("file-area-content-item-icon")])},[n.value.includes(t)?(e.openBlock(),e.createBlock(e.unref(A.LoadingOutlined),{key:0})):(e.openBlock(),e.createBlock(B.default,{key:1}))],2),e.createElementVNode("div",{class:e.normalizeClass([e.unref(a)("file-area-content-item-file-name")])},[e.createVNode(e.unref(m.TypographyText),{ellipsis:"",content:c.fileName},null,8,["content"])],2)],10,x)]),_:2},[n.value.includes(t)?void 0:{name:"title",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("ap.apAppendix.downloadFile")),1)]),key:"0"}]),1024)],2))),128))],2)],2))])],16))}});exports.default=E;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),A=require("./icons/empty-aplus-icon.vue.js"),V=require("./icons/empty-admin-icon.vue.js"),L=require("./icons/file-icon.vue.js"),v=require("@aplus-frontend/antdv"),q=require("@aplus-frontend/icon"),w=require("@ant-design/icons-vue");require("../ap-title/ApTitle.vue.js");require("../../ap-download/ap-download.vue2.js");require("../../config-provider/index.js");const E=require("./utils/index.js"),b=require("../../config-provider/hooks/use-namespace.js"),h=require("../../config-provider/hooks/use-locale.js"),f=require("../../config-provider/hooks/use-global-config.js"),x=require("../ap-title/ApTitle.vue2.js"),S=require("../../ap-download/ap-download.vue.js"),z=["onClick"],F=e.defineComponent({__name:"ap-appendix",props:{fileList:{},needName:{type:[Boolean,Object],default:!1},getOssAccess:{},title:{},tooltip:{},column:{default:2},isFileAreaBorder:{type:Boolean,default:!1}},setup(g){const{b:y,e:l,em:p}=b.useNamespace("ap-appendix"),{t:r}=h.useLocale(),C=f.useGlobalConfig("uiMode"),n=g,k=f.useGlobalConfig("apUpload"),m=f.useGlobalConfig("downloadCenterTriggerConfig"),s=e.computed(()=>E.getFileInfo(n?.needName,n?.fileList??[])),N=e.computed(()=>n.getOssAccess||k.value?.getOssAccess),c=e.computed(()=>!(Array.isArray(s.value)&&s.value.length)),a=e.ref([]),B=e.computed(()=>n.title||r("ap.apAppendix.appendix"));async function _(o,i){if(!(a.value.findIndex(t=>t===i)>-1)){a.value=[...a.value,i];try{if(m.value?.trigger){let t=[o].map(d=>({objectName:d.path,fileName:d.fileName}));await m.value?.trigger(t)}}finally{a.value=a.value.filter(t=>t!==i)}}}return(o,i)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({class:[e.unref(y)()]},{...o.$attrs},{style:{"--ap-appendix-column":`repeat(${Number(n?.column||2)}, 1fr)`}}),[e.renderSlot(o.$slots,"title",{fileList:n.fileList},()=>[e.createVNode(x.default,{title:B.value,"help-message":n?.tooltip},{suffix:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass([e.unref(l)("suffix")])},[e.renderSlot(o.$slots,"titleSuffix",{fileList:n.fileList}),e.renderSlot(o.$slots,"titleDownloadAllBtn",{fileList:n.fileList},()=>[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(S.default,{key:0,class:e.normalizeClass([e.unref(l)("download-all")]),text:e.unref(r)("ap.apAppendix.downloadAll"),"get-oss-access":N.value,"file-name":s.value},{icon:e.withCtx(()=>[e.createVNode(e.unref(q.IconVariantDownload))]),_:1},8,["class","text","get-oss-access","file-name"]))])],2)]),_:3},8,["title","help-message"])]),c.value?e.createCommentVNode("",!0):e.renderSlot(o.$slots,"fileArea",{key:0,fileList:n.fileList},()=>[e.createElementVNode("div",{class:e.normalizeClass({[e.unref(l)("file-area")]:!0,[e.unref(p)("file-area","border")]:!!n.isFileAreaBorder})},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(l)("file-area-content")])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(u,t)=>(e.openBlock(),e.createElementBlock("div",{key:t,class:e.normalizeClass({[e.unref(l)("file-area-content-item")]:!0,[e.unref(p)("file-area-content-item","loading")]:a.value.includes(t)})},[e.createVNode(e.unref(v.Tooltip),null,e.createSlots({default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass({[e.unref(l)("file-area-content-item-content")]:!0,[e.unref(l)("file-area-content-item--loading-content")]:a.value.includes(t)}),onClick:d=>_(u,t)},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(l)("file-area-content-item-icon")])},[a.value.includes(t)?(e.openBlock(),e.createBlock(e.unref(w.LoadingOutlined),{key:0})):(e.openBlock(),e.createBlock(L.default,{key:1}))],2),e.createElementVNode("div",{class:e.normalizeClass([e.unref(l)("file-area-content-item-file-name")])},[e.createVNode(e.unref(v.TypographyText),{ellipsis:"",content:u.fileName},null,8,["content"])],2)],10,z)]),_:2},[a.value.includes(t)?void 0:{name:"title",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("ap.apAppendix.downloadFile")),1)]),key:"0"}]),1024)],2))),128))],2)],2)]),c.value?e.renderSlot(o.$slots,"empty",{key:1},()=>[e.createElementVNode("div",{class:e.normalizeClass([e.unref(l)("empty")])},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(l)("empty-content")])},[e.unref(C)==="aplus"?(e.openBlock(),e.createBlock(A.default,{key:0})):(e.openBlock(),e.createBlock(V.default,{key:1})),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("ap.apAppendix.empty")),1)],2)],2)]):e.createCommentVNode("",!0)],16))}});exports.default=F;
@@ -0,0 +1,3 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, SVGSVGElement>;
3
+ export default _default;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("../../../../_virtual/_plugin-vue_export-helper.js"),i={},r={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:"none",version:"1.1",width:"88",height:"88.5078125",viewBox:"0 0 88 88.5078125"};function o(n,t){return e.openBlock(),e.createElementBlock("svg",r,t[0]||(t[0]=[e.createStaticVNode('<defs><clipPath id="master_svg0_373_19161"><rect x="0" y="33" width="88" height="55.507694244384766" rx="0"></rect></clipPath></defs><g><g clip-path="url(#master_svg0_373_19161)"><g><g><path d="M12.375,72.37709593772888C4.71416,74.08249593772888,0,76.40572593772887,0,78.96611593772889C0,84.20009593772889,19.6995,88.44299593772888,44,88.44299593772888C68.3005,88.44299593772888,88,84.20009593772889,88,78.96611593772889C88,76.40572593772887,83.2858,74.08249593772888,75.625,72.37709608666788C75.625,72.37709608666788,75.625,76.50840593772888,75.625,76.50840593772888C75.625,79.38261593772889,73.81,81.73831593772888,71.5687,81.73831593772888C71.5687,81.73831593772888,16.4312,81.73831593772888,16.4312,81.73831593772888C14.19,81.73831593772888,12.375,79.38126593772888,12.375,76.50840593772888C12.375,76.50840593772888,12.375,72.37709593772888,12.375,72.37709593772888Z" fill="#000000" fill-opacity="0.03999999910593033"></path></g><g><g><path d="M57.2179,55.92138781272888C57.2179,53.74846781272888,58.5846,51.95462166272888,60.28,51.95326781272888C60.28,51.95326781272888,75.625,51.95326781272888,75.625,51.95326781272888C75.625,51.95326781272888,75.625,76.50796781272888,75.625,76.50796781272888C75.625,79.38216781272888,73.81,81.73786781272888,71.5687,81.73786781272888C71.5687,81.73786781272888,16.43125,81.73786781272888,16.43125,81.73786781272888C14.19,81.73786781272888,12.375,79.38086781272888,12.375,76.50796781272888C12.375,76.50796781272888,12.375,51.95326781272888,12.375,51.95326781272888C12.375,51.95326781272888,27.72,51.95326781272888,27.72,51.95326781272888C29.4154,51.95326781272888,30.7821,53.74440781272888,30.7821,55.917327812728885C30.7821,55.917327812728885,30.7821,55.947117812728884,30.7821,55.947117812728884C30.7821,58.12003781272888,32.164,59.874617812728886,33.858000000000004,59.874617812728886C33.858000000000004,59.874617812728886,54.142,59.874617812728886,54.142,59.874617812728886C55.836,59.874617812728886,57.2179,58.10378781272888,57.2179,55.930867812728884C57.2179,55.930867812728884,57.2179,55.92138781272888,57.2179,55.92138781272888C57.2179,55.92138781272888,57.2179,55.92138781272888,57.2179,55.92138781272888Z" fill="#000000" fill-opacity="0.03999999910593033"></path><path d="M57.7179,55.930867812728884L57.7179,55.92138781272888Q57.7179,54.45772781272888,58.5096,53.42769781272888Q59.258,52.45408381272888,60.28,52.45326781272888L75.125,52.45326781272888L75.125,76.50796781272888Q75.125,78.49546781272889,74.0419,79.89476781272889Q73.00229999999999,81.23786781272888,71.5687,81.23786781272888L16.43125,81.23786781272888Q14.997869999999999,81.23786781272888,13.95808,79.89426781272888Q12.875,78.49466781272888,12.875,76.50796781272888L12.875,52.45326781272888L27.72,52.45326781272888Q28.7425,52.45326781272888,29.4906,53.42538781272888Q30.2821,54.45397781272888,30.2821,55.917327812728885L30.2821,55.947117812728884Q30.2821,57.74781781272888,31.2914,59.03433781272888Q32.3429,60.37462781272888,33.858000000000004,60.374617812728886L54.142,60.374617812728886Q55.6567,60.374617812728886,56.7094,59.02511781272888Q57.7179,57.73234781272888,57.7179,55.930867812728884ZM57.7168,52.81828281272888Q56.7179,54.11781781272888,56.7179,55.92138781272888L56.7179,55.930867812728884Q56.7179,57.38843781272888,55.921,58.41005781272888Q55.1685,59.374617812728886,54.142,59.374617812728886L33.858000000000004,59.374617812728886Q32.8294,59.374617812728886,32.078199999999995,58.41708781272888Q31.2821,57.40236781272888,31.2821,55.947117812728884L31.2821,55.917327812728885Q31.2821,54.11374781272888,30.2831,52.81551981272888Q29.2348,51.45326781272888,27.72,51.45326781272888L11.875,51.45326781272888L11.875,76.50796781272888Q11.875,78.83636781272888,13.167231,80.50626781272888Q14.50727,82.23786781272888,16.43125,82.23786781272888L71.5687,82.23786781272888Q73.49289999999999,82.23786781272888,74.8327,80.50676781272888Q76.125,78.83726781272888,76.125,76.50796781272888L76.125,51.45326781272888L60.28,51.45326781272888Q58.765,51.45447781272888,57.7168,52.81828281272888Z" fill-rule="evenodd" fill="#000000" fill-opacity="0.15000000596046448"></path></g><g><path d="M25.9259,36.227007812728885L12.002564,51.77106781272888L12.747436,52.43826781272888L26.726100000000002,36.83247781272888L26.7485,36.79707781272888Q27.676299999999998,35.32826781272888,29.0029,35.32826781272888L58.9971,35.32826781272888Q60.324,35.32826781272888,61.2514,36.798187812728884L61.2738,36.833737812728884L75.2526,52.43696781272888L75.9974,51.76966781272888L62.0741,36.228457812728884Q60.8579,34.32826781272888,58.9971,34.32826781272888L29.0029,34.32826781272888Q27.142699999999998,34.32826781272888,25.9259,36.227007812728885Z" fill-rule="evenodd" fill="#000000" fill-opacity="0.15000000596046448"></path></g></g></g></g></g>',2)]))}const Q=l.default(i,[["render",o]]);exports.default=Q;
@@ -0,0 +1,3 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, SVGSVGElement>;
3
+ export default _default;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("../../../../_virtual/_plugin-vue_export-helper.js"),i={},r={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:"none",version:"1.1",width:"88",height:"88.5078125",viewBox:"0 0 88 88.5078125"};function o(n,t){return e.openBlock(),e.createElementBlock("svg",r,t[0]||(t[0]=[e.createStaticVNode('<defs><clipPath id="master_svg0_373_19161"><rect x="0" y="33" width="88" height="55.507694244384766" rx="0"></rect></clipPath></defs><g><g clip-path="url(#master_svg0_373_19161)"><g><g><path d="M12.375,72.37709593772888C4.71416,74.08249593772888,0,76.40572593772887,0,78.96611593772889C0,84.20009593772889,19.6995,88.44299593772888,44,88.44299593772888C68.3005,88.44299593772888,88,84.20009593772889,88,78.96611593772889C88,76.40572593772887,83.2858,74.08249593772888,75.625,72.37709608666788C75.625,72.37709608666788,75.625,76.50840593772888,75.625,76.50840593772888C75.625,79.38261593772889,73.81,81.73831593772888,71.5687,81.73831593772888C71.5687,81.73831593772888,16.4312,81.73831593772888,16.4312,81.73831593772888C14.19,81.73831593772888,12.375,79.38126593772888,12.375,76.50840593772888C12.375,76.50840593772888,12.375,72.37709593772888,12.375,72.37709593772888Z" fill="#F6F6F8" fill-opacity="1"></path></g><g><g><path d="M57.2179,55.92138781272888C57.2179,53.74846781272888,58.5846,51.95462166272888,60.28,51.95326781272888C60.28,51.95326781272888,75.625,51.95326781272888,75.625,51.95326781272888C75.625,51.95326781272888,75.625,76.50796781272888,75.625,76.50796781272888C75.625,79.38216781272888,73.81,81.73786781272888,71.5687,81.73786781272888C71.5687,81.73786781272888,16.43125,81.73786781272888,16.43125,81.73786781272888C14.19,81.73786781272888,12.375,79.38086781272888,12.375,76.50796781272888C12.375,76.50796781272888,12.375,51.95326781272888,12.375,51.95326781272888C12.375,51.95326781272888,27.72,51.95326781272888,27.72,51.95326781272888C29.4154,51.95326781272888,30.7821,53.74440781272888,30.7821,55.917327812728885C30.7821,55.917327812728885,30.7821,55.947117812728884,30.7821,55.947117812728884C30.7821,58.12003781272888,32.164,59.874617812728886,33.858000000000004,59.874617812728886C33.858000000000004,59.874617812728886,54.142,59.874617812728886,54.142,59.874617812728886C55.836,59.874617812728886,57.2179,58.10378781272888,57.2179,55.930867812728884C57.2179,55.930867812728884,57.2179,55.92138781272888,57.2179,55.92138781272888C57.2179,55.92138781272888,57.2179,55.92138781272888,57.2179,55.92138781272888Z" fill="#FAFBFB" fill-opacity="1"></path><path d="M57.7179,55.930867812728884L57.7179,55.92138781272888Q57.7179,54.45772781272888,58.5096,53.42769781272888Q59.258,52.45408381272888,60.28,52.45326781272888L75.125,52.45326781272888L75.125,76.50796781272888Q75.125,78.49546781272889,74.0419,79.89476781272889Q73.00229999999999,81.23786781272888,71.5687,81.23786781272888L16.43125,81.23786781272888Q14.997869999999999,81.23786781272888,13.95808,79.89426781272888Q12.875,78.49466781272888,12.875,76.50796781272888L12.875,52.45326781272888L27.72,52.45326781272888Q28.7425,52.45326781272888,29.4906,53.42538781272888Q30.2821,54.45397781272888,30.2821,55.917327812728885L30.2821,55.947117812728884Q30.2821,57.74781781272888,31.2914,59.03433781272888Q32.3429,60.37462781272888,33.858000000000004,60.374617812728886L54.142,60.374617812728886Q55.6567,60.374617812728886,56.7094,59.02511781272888Q57.7179,57.73234781272888,57.7179,55.930867812728884ZM57.7168,52.81828281272888Q56.7179,54.11781781272888,56.7179,55.92138781272888L56.7179,55.930867812728884Q56.7179,57.38843781272888,55.921,58.41005781272888Q55.1685,59.374617812728886,54.142,59.374617812728886L33.858000000000004,59.374617812728886Q32.8294,59.374617812728886,32.078199999999995,58.41708781272888Q31.2821,57.40236781272888,31.2821,55.947117812728884L31.2821,55.917327812728885Q31.2821,54.11374781272888,30.2831,52.81551981272888Q29.2348,51.45326781272888,27.72,51.45326781272888L11.875,51.45326781272888L11.875,76.50796781272888Q11.875,78.83636781272888,13.167231,80.50626781272888Q14.50727,82.23786781272888,16.43125,82.23786781272888L71.5687,82.23786781272888Q73.49289999999999,82.23786781272888,74.8327,80.50676781272888Q76.125,78.83726781272888,76.125,76.50796781272888L76.125,51.45326781272888L60.28,51.45326781272888Q58.765,51.45447781272888,57.7168,52.81828281272888Z" fill-rule="evenodd" fill="#DBDFE4" fill-opacity="1"></path></g><g><path d="M25.9259,36.227007812728885L12.002564,51.77106781272888L12.747436,52.43826781272888L26.726100000000002,36.83247781272888L26.7485,36.79707781272888Q27.676299999999998,35.32826781272888,29.0029,35.32826781272888L58.9971,35.32826781272888Q60.324,35.32826781272888,61.2514,36.798187812728884L61.2738,36.833737812728884L75.2526,52.43696781272888L75.9974,51.76966781272888L62.0741,36.228457812728884Q60.8579,34.32826781272888,58.9971,34.32826781272888L29.0029,34.32826781272888Q27.142699999999998,34.32826781272888,25.9259,36.227007812728885Z" fill-rule="evenodd" fill="#DBDFE4" fill-opacity="1"></path></g></g></g></g></g>',2)]))}const Q=l.default(i,[["render",o]]);exports.default=Q;
@@ -54,4 +54,5 @@ export interface ApAppendixSlots<FileType = any> {
54
54
  title: (props: ApAppendixBaseSlotProps<FileType>) => any;
55
55
  titleSuffix: (props: ApAppendixBaseSlotProps<FileType>) => any;
56
56
  titleDownloadAllBtn: (props: ApAppendixBaseSlotProps<FileType>) => any;
57
+ empty: () => any;
57
58
  }
@@ -21,6 +21,18 @@ declare const _default: DefineComponent<ExtractPropTypes<{
21
21
  type: PropType< ApCopy["disableCopy"]>;
22
22
  default: boolean;
23
23
  };
24
+ onClick: {
25
+ type: PropType< ApCopy["onClick"]>;
26
+ default: () => void;
27
+ };
28
+ tipMessageSuccess: {
29
+ type: PropType< ApCopy["tipMessageSuccess"]>;
30
+ default: string;
31
+ };
32
+ tipMessageError: {
33
+ type: PropType< ApCopy["tipMessageError"]>;
34
+ default: string;
35
+ };
24
36
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
25
37
  text: {
26
38
  type: PropType< ApCopy["text"]>;
@@ -42,11 +54,26 @@ declare const _default: DefineComponent<ExtractPropTypes<{
42
54
  type: PropType< ApCopy["disableCopy"]>;
43
55
  default: boolean;
44
56
  };
57
+ onClick: {
58
+ type: PropType< ApCopy["onClick"]>;
59
+ default: () => void;
60
+ };
61
+ tipMessageSuccess: {
62
+ type: PropType< ApCopy["tipMessageSuccess"]>;
63
+ default: string;
64
+ };
65
+ tipMessageError: {
66
+ type: PropType< ApCopy["tipMessageError"]>;
67
+ default: string;
68
+ };
45
69
  }>> & Readonly<{}>, {
46
70
  size: number | undefined;
47
- link: string | undefined;
71
+ link: string | boolean | undefined;
72
+ onClick: (() => void) | undefined;
48
73
  text: string | undefined;
49
74
  textStyle: "link" | CSSProperties | "major" | "minor" | undefined;
50
75
  disableCopy: boolean | undefined;
76
+ tipMessageSuccess: string | undefined;
77
+ tipMessageError: string | undefined;
51
78
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
52
79
  export default _default;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),v=require("./constans.js"),S=require("@aplus-frontend/icon");require("../../config-provider/index.js");const u=require("@aplus-frontend/antdv"),d=require("lodash-unified"),b=require("../../config-provider/hooks/use-namespace.js"),T=require("../../config-provider/hooks/use-locale.js"),N=t.defineComponent({name:"CopyBtn",props:v.ApCopyProps(),setup(r,{slots:y}){const{b:f,e:a,m:p}=b.useNamespace("ap-copy"),{t:s}=T.useLocale(),x=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation(),navigator.clipboard.writeText(r.text||l()||"").then(()=>{u.message.success(s("ap.apCopy.copySuccess"))}).catch(()=>{u.message.error(s("ap.apCopy.copyError"))})},g=e=>{if(e.length===1){const n=e[0];if(n.type===t.Text||n.type.toString()==="Symbol(Text)"||t.isVNode(n)&&typeof n.children=="string")return!0}return!1},m=e=>{if(!e.length)return"";const n=e[0];return n.type===t.Text||n.type.toString()==="Symbol(Text)"?String(n.children):t.isVNode(n)&&typeof n.children=="string"?n.children:""},l=()=>{const e=y.default?.();return e&&g(e)?m(e):null},c=e=>!(d.isNull(e)||d.isUndefined(e)||typeof e=="string"&&e===""),o=t.computed(()=>{if(typeof r.textStyle=="string")switch(r.textStyle){case"link":return"text-link";case"minor":return"text-minor";case"major":return"text-major";default:return"text-major"}else if(typeof r.textStyle=="object")return{...r.textStyle};return{}}),i=t.computed(()=>l()||r.text||"");return()=>t.createVNode(t.Fragment,null,[t.createVNode("div",{class:[f()]},[t.createVNode("div",{class:[a("text"),typeof o.value=="string"&&p(o.value)],style:typeof o.value!="string"&&o.value,title:typeof o.value=="string"?i.value:""},[c(i.value)?r.link?t.createVNode("a",{href:r.link,target:"_blank"},[i.value]):i.value:"--"]),c(i.value)&&!r.disableCopy?t.createVNode("div",{class:[a("copy-btn"),"copy-btn"],onClick:r.disableCopy?void 0:x},[t.createVNode(S.IconApAdLineCopy,{size:r.size},null)]):t.createVNode("div",{class:[a("copy-btn"),"copy-btn"]},null)])])}});exports.default=N;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),S=require("./constans.js"),b=require("@aplus-frontend/icon");require("../../config-provider/index.js");const y=require("@aplus-frontend/antdv"),l=require("lodash-unified"),k=require("../../config-provider/hooks/use-namespace.js"),C=require("../../config-provider/hooks/use-locale.js"),N=n.defineComponent({name:"CopyBtn",props:S.ApCopyProps(),setup(t,{slots:f}){console.log("props.link",t.link);const{b:g,e:a,m:s}=k.useNamespace("ap-copy"),{t:c}=C.useLocale(),x=(e,r,v)=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation(),navigator.clipboard.writeText(t.text||u()||"").then(()=>{y.message.success(r||c("ap.apCopy.copySuccess"))}).catch(()=>{y.message.error(v||c("ap.apCopy.copyError"))})},p=e=>{if(e.length===1){const r=e[0];if(r.type===n.Text||r.type.toString()==="Symbol(Text)"||n.isVNode(r)&&typeof r.children=="string")return!0}return!1},m=e=>{if(!e.length)return"";const r=e[0];return r.type===n.Text||r.type.toString()==="Symbol(Text)"?String(r.children):n.isVNode(r)&&typeof r.children=="string"?r.children:""},u=()=>{const e=f.default?.();return e&&p(e)?m(e):null},d=e=>!(l.isNull(e)||l.isUndefined(e)||typeof e=="string"&&e===""),o=n.computed(()=>{if(typeof t.textStyle=="string")switch(t.textStyle){case"link":return"text-link";case"minor":return"text-minor";case"major":return"text-major";default:return"text-major"}else if(typeof t.textStyle=="object")return{...t.textStyle};return{}}),i=n.computed(()=>u()||t.text||"");return()=>n.createVNode(n.Fragment,null,[n.createVNode("div",{class:[g()]},[n.createVNode("div",{class:[a("text"),typeof o.value=="string"&&s(o.value)],style:typeof o.value!="string"&&o.value,title:typeof o.value=="string"?i.value:"",onClick:t.onClick?()=>t.onClick():void 0},[d(i.value)?t.link&&l.isString(t.link)?n.createVNode("a",{href:t.link,target:"_blank"},[i.value]):l.isBoolean(t.link)?n.createVNode("span",{class:s("text-link")},[i.value]):i.value:"--"]),d(i.value)&&!t.disableCopy?n.createVNode("div",{class:[a("copy-btn"),"copy-btn"],onClick:t.disableCopy?void 0:e=>x(e,t.tipMessageSuccess,t.tipMessageError)},[n.createVNode(b.IconApAdLineCopy,{size:t.size},null)]):n.createVNode("div",{class:[a("copy-btn"),"copy-btn"]},null)])])}});exports.default=N;
@@ -21,4 +21,16 @@ export declare const ApCopyProps: () => {
21
21
  type: PropType<ApCopy["disableCopy"]>;
22
22
  default: boolean;
23
23
  };
24
+ onClick: {
25
+ type: PropType<ApCopy["onClick"]>;
26
+ default: () => void;
27
+ };
28
+ tipMessageSuccess: {
29
+ type: PropType<ApCopy["tipMessageSuccess"]>;
30
+ default: string;
31
+ };
32
+ tipMessageError: {
33
+ type: PropType<ApCopy["tipMessageError"]>;
34
+ default: string;
35
+ };
24
36
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=()=>({text:{type:String,default:""},size:{type:Number,default:14},textStyle:{type:[String,Object],default:"major"},link:{type:String,default:""},disableCopy:{type:Boolean,default:!1}});exports.ApCopyProps=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=()=>({text:{type:String,default:""},size:{type:Number,default:14},textStyle:{type:[String,Object],default:"major"},link:{type:String,default:""},disableCopy:{type:Boolean,default:!1},onClick:{type:Function,default:()=>{}},tipMessageSuccess:{type:String,default:""},tipMessageError:{type:String,default:""}});exports.ApCopyProps=e;
@@ -23,12 +23,27 @@ declare const ApCopy: {
23
23
  type: PropType< ApCopy["disableCopy"]>;
24
24
  default: boolean;
25
25
  };
26
+ onClick: {
27
+ type: PropType< ApCopy["onClick"]>;
28
+ default: () => void;
29
+ };
30
+ tipMessageSuccess: {
31
+ type: PropType< ApCopy["tipMessageSuccess"]>;
32
+ default: string;
33
+ };
34
+ tipMessageError: {
35
+ type: PropType< ApCopy["tipMessageError"]>;
36
+ default: string;
37
+ };
26
38
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
27
39
  size: number | undefined;
28
- link: string | undefined;
40
+ link: string | boolean | undefined;
41
+ onClick: (() => void) | undefined;
29
42
  text: string | undefined;
30
43
  textStyle: "link" | CSSProperties | "major" | "minor" | undefined;
31
44
  disableCopy: boolean | undefined;
45
+ tipMessageSuccess: string | undefined;
46
+ tipMessageError: string | undefined;
32
47
  }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
33
48
  P: {};
34
49
  B: {};
@@ -57,12 +72,27 @@ declare const ApCopy: {
57
72
  type: PropType< ApCopy["disableCopy"]>;
58
73
  default: boolean;
59
74
  };
75
+ onClick: {
76
+ type: PropType< ApCopy["onClick"]>;
77
+ default: () => void;
78
+ };
79
+ tipMessageSuccess: {
80
+ type: PropType< ApCopy["tipMessageSuccess"]>;
81
+ default: string;
82
+ };
83
+ tipMessageError: {
84
+ type: PropType< ApCopy["tipMessageError"]>;
85
+ default: string;
86
+ };
60
87
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
61
88
  size: number | undefined;
62
- link: string | undefined;
89
+ link: string | boolean | undefined;
90
+ onClick: (() => void) | undefined;
63
91
  text: string | undefined;
64
92
  textStyle: "link" | CSSProperties | "major" | "minor" | undefined;
65
93
  disableCopy: boolean | undefined;
94
+ tipMessageSuccess: string | undefined;
95
+ tipMessageError: string | undefined;
66
96
  }>;
67
97
  __isFragment?: never;
68
98
  __isTeleport?: never;
@@ -88,12 +118,27 @@ declare const ApCopy: {
88
118
  type: PropType< ApCopy["disableCopy"]>;
89
119
  default: boolean;
90
120
  };
121
+ onClick: {
122
+ type: PropType< ApCopy["onClick"]>;
123
+ default: () => void;
124
+ };
125
+ tipMessageSuccess: {
126
+ type: PropType< ApCopy["tipMessageSuccess"]>;
127
+ default: string;
128
+ };
129
+ tipMessageError: {
130
+ type: PropType< ApCopy["tipMessageError"]>;
131
+ default: string;
132
+ };
91
133
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
92
134
  size: number | undefined;
93
- link: string | undefined;
135
+ link: string | boolean | undefined;
136
+ onClick: (() => void) | undefined;
94
137
  text: string | undefined;
95
138
  textStyle: "link" | CSSProperties | "major" | "minor" | undefined;
96
139
  disableCopy: boolean | undefined;
140
+ tipMessageSuccess: string | undefined;
141
+ tipMessageError: string | undefined;
97
142
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & ( Plugin & (new (...args: any[]) => {
98
143
  $props: {
99
144
  onClick?: () => void;
@@ -3,6 +3,9 @@ export interface ApCopy {
3
3
  text?: string;
4
4
  size?: number;
5
5
  textStyle?: 'major' | 'minor' | 'link' | CSSProperties;
6
- link?: string;
6
+ link?: string | boolean;
7
7
  disableCopy?: boolean;
8
+ onClick?: () => void;
9
+ tipMessageSuccess?: string;
10
+ tipMessageError?: string;
8
11
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vxe-table/es/locale/lang/en-US"),t={name:"en",ap:{common:{okText:"OK",cancelText:"Cancel",resetText:"Reset",queryText:"Search",expandText:"Unfold",closeText:"Put away",inputText:"Please enter",chooseText:"Please choose",redo:"Refresh",back:"Back",more:"More",all:"All"},field:{startDateText:"Start date",endDateText:"End date",today:"Today",yesterday:"Yesterday",thisWeek:"This week",lastWeek:"Last week",thisMonth:"This month",lastMonth:"Last month",thisYear:"This year",lastYear:"Last year",lastXDays:"Last {day} days"},apForm:{search:{search:"Search",reset:"Reset",moreFilter:"More Filters",sorterTitle:"Customize filter layout",sorterDesc:"Drag to sort. Top items appear first.",sorterReset:"Restore Defaults",sorterConfirmBtn:"Confirm"}},apTable:{pagination:{totalLeftPrefix:"Total",totalLeftSuffix:"items",totalRightPrefix:"Page",totalRightSuffix:" "},setting:{title:"Custom Table",selectAll:"Select All",unSelectAll:"Deselect All",selectAllTip:"Please select the columns to display in the table.",sizeSmall:"Small",sizeNormal:"Normal",selectCount:"Selected fields ({count})",reset:"Reset",fixToLeft:"Fixed on the left",fixToRight:"Fixed on the right",unFixed:"Not fixed",delete:"Delete"},paragraphEllipsis:{copy:"Copy",copySuccess:"Copied successfully"}},apUpload:{update:"Upload",pictureType:"Image type",videoType:"Video type",audioType:"Audio type",documentType:"Document type",allTypes:"All types",networkAnomaly:"Network abnormality",FailedToObtainOssTemporaryPermissions:"Failed to obtain temporary OSS permissions",pleasePass:"Please pass in",supportExtension:"Support extensions",uploadFile:"Upload files",fileInitializationException:"If the initial number of initialized files exceeds {maxCount}, subsequent uploaded files will be out of sync with the data",maxUploadFiles:"Upload a maximum of {maxCount} files",maxUploadPicture:"Upload a maximum of {maxCount} images",maxUploadFileSize:"The file size does not exceed {maxSize}MB",maxWarnUploadFileSize:"The file size is smaller than {maxSize}MB",maxUploadPictureSize:"The image size is smaller than {maxSize}MB",fileFormatNotSupported:"Files in this format are not supported",pictureFormatNotSupported:"Images in this format are not supported",imageParsingFailed:"Image parsing failed",clickOrDragUpload:"Click or drag the file",foldersNotSupported:"Do not support uploading folders"},apExportGroup:{exportError:"Export error",exportSelected:"Export selected",exportAll:"Export all",export:"Export",exportSuccess:"The task has been submitted,please go to the download center to check the progress"},apBatchAction:{selected:"Selected",piecesOfData:"Pieces of data",empty:"Empty"},apApBatchActionGroup:{batchOperation:"Batch operation"},workOrderModal:{createTickets:"Create ticket",submit:"Confirm",cancel:"Cancel",ticketsTitle:"Ticket Title",noEmpty:"No empty",pleaseEntry:"please enter (Within 300 words)",ticketsType:"Ticket Type",ticketsDetail:"Ticket Detail",ticketsLevel:"Priority",operationSuccess:"operate successfully",fileSizeMax:"Single file size limit",fileCountMax:"Limit the number to {x} at a time",fileLabel:"File Upload"},apTableModal:{titleSuffixOne:"You can add up to {maxCount},",titleSuffixTwo:"Added",titleSuffixThree:"",messageMaxCount:"You can select up to {maxCount} data entries",clear:"Clear",selected:"Selected"},apAttachment:{downloadall:"Download All",more:"More"},apSizeInput:{length:"Length",width:"Width",height:"Height"},apExpandAlert:{expand:"Expand",collapse:"Collapse"},apAppendix:{downloadAll:"Download All",downloadFile:"Download file",appendix:"Appendix"},batchInputGroup:{popoverInputPlaceholder:"A maximum of {maxNum} entries can be entered in batches, separated by newlines"},apSummary:{total:"Total"},apView:{systemView:"System view",saveView:"Save view",maxTip:"The maximum number of views that can be saved has been reached. Please delete them before saving a new view",saveNewView:"Save as new wiew",newView:"New view",setDefault:"Default",viewName:"View name",notEmpty:"Cannot be empty",cancel:"Cancel",save:"Save",default:"Default",rename:"Rename",deleteTip:"Are you sure you want to delete this view?",ok:"Ok"},apCopy:{copySuccess:"Copy success",copyError:"Copy failed"},...e}};exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vxe-table/es/locale/lang/en-US"),t={name:"en",ap:{common:{okText:"OK",cancelText:"Cancel",resetText:"Reset",queryText:"Search",expandText:"Unfold",closeText:"Put away",inputText:"Please enter",chooseText:"Please choose",redo:"Refresh",back:"Back",more:"More",all:"All"},field:{startDateText:"Start date",endDateText:"End date",today:"Today",yesterday:"Yesterday",thisWeek:"This week",lastWeek:"Last week",thisMonth:"This month",lastMonth:"Last month",thisYear:"This year",lastYear:"Last year",lastXDays:"Last {day} days"},apForm:{search:{search:"Search",reset:"Reset",moreFilter:"More Filters",sorterTitle:"Customize filter layout",sorterDesc:"Drag to sort. Top items appear first.",sorterReset:"Restore Defaults",sorterConfirmBtn:"Confirm"}},apTable:{pagination:{totalLeftPrefix:"Total",totalLeftSuffix:"items",totalRightPrefix:"Page",totalRightSuffix:" "},setting:{title:"Custom Table",selectAll:"Select All",unSelectAll:"Deselect All",selectAllTip:"Please select the columns to display in the table.",sizeSmall:"Small",sizeNormal:"Normal",selectCount:"Selected fields ({count})",reset:"Reset",fixToLeft:"Fixed on the left",fixToRight:"Fixed on the right",unFixed:"Not fixed",delete:"Delete"},paragraphEllipsis:{copy:"Copy",copySuccess:"Copied successfully"}},apUpload:{update:"Upload",pictureType:"Image type",videoType:"Video type",audioType:"Audio type",documentType:"Document type",allTypes:"All types",networkAnomaly:"Network abnormality",FailedToObtainOssTemporaryPermissions:"Failed to obtain temporary OSS permissions",pleasePass:"Please pass in",supportExtension:"Support extensions",uploadFile:"Upload files",fileInitializationException:"If the initial number of initialized files exceeds {maxCount}, subsequent uploaded files will be out of sync with the data",maxUploadFiles:"Upload a maximum of {maxCount} files",maxUploadPicture:"Upload a maximum of {maxCount} images",maxUploadFileSize:"The file size does not exceed {maxSize}MB",maxWarnUploadFileSize:"The file size is smaller than {maxSize}MB",maxUploadPictureSize:"The image size is smaller than {maxSize}MB",fileFormatNotSupported:"Files in this format are not supported",pictureFormatNotSupported:"Images in this format are not supported",imageParsingFailed:"Image parsing failed",clickOrDragUpload:"Click or drag the file",foldersNotSupported:"Do not support uploading folders"},apExportGroup:{exportError:"Export error",exportSelected:"Export selected",exportAll:"Export all",export:"Export",exportSuccess:"The task has been submitted,please go to the download center to check the progress"},apBatchAction:{selected:"Selected",piecesOfData:"Pieces of data",empty:"Empty"},apApBatchActionGroup:{batchOperation:"Batch operation"},workOrderModal:{createTickets:"Create ticket",submit:"Confirm",cancel:"Cancel",ticketsTitle:"Ticket Title",noEmpty:"No empty",pleaseEntry:"please enter (Within 300 words)",ticketsType:"Ticket Type",ticketsDetail:"Ticket Detail",ticketsLevel:"Priority",operationSuccess:"operate successfully",fileSizeMax:"Single file size limit",fileCountMax:"Limit the number to {x} at a time",fileLabel:"File Upload"},apTableModal:{titleSuffixOne:"You can add up to {maxCount},",titleSuffixTwo:"Added",titleSuffixThree:"",messageMaxCount:"You can select up to {maxCount} data entries",clear:"Clear",selected:"Selected"},apAttachment:{downloadall:"Download All",more:"More"},apSizeInput:{length:"Length",width:"Width",height:"Height"},apExpandAlert:{expand:"Expand",collapse:"Collapse"},apAppendix:{downloadAll:"Download All",downloadFile:"Download file",appendix:"Appendix",empty:"No data"},batchInputGroup:{popoverInputPlaceholder:"A maximum of {maxNum} entries can be entered in batches, separated by newlines"},apSummary:{total:"Total"},apView:{systemView:"System view",saveView:"Save view",maxTip:"The maximum number of views that can be saved has been reached. Please delete them before saving a new view",saveNewView:"Save as new wiew",newView:"New view",setDefault:"Default",viewName:"View name",notEmpty:"Cannot be empty",cancel:"Cancel",save:"Save",default:"Default",rename:"Rename",deleteTip:"Are you sure you want to delete this view?",ok:"Ok"},apCopy:{copySuccess:"Copy success",copyError:"Copy failed"},...e}};exports.default=t;