@aplus-frontend/ui 0.1.31 → 0.1.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.mjs +77 -72
- package/es/src/ap-button/ap-action-button.vue.d.ts +43 -0
- package/es/src/ap-button/ap-action-button.vue.mjs +43 -0
- package/es/src/ap-button/ap-action-button.vue2.mjs +4 -0
- package/es/src/ap-button/ap-button.vue.mjs +52 -50
- package/es/src/ap-button/index.d.ts +2 -1
- package/es/src/ap-button/index.mjs +1 -0
- package/es/src/ap-button/interface.d.ts +1 -0
- package/es/src/ap-descriptions/ap-descriptions.vue.mjs +43 -45
- package/es/src/ap-descriptions/formatter/index.d.ts +2 -2
- package/es/src/ap-descriptions/helper.d.ts +19 -1
- package/es/src/ap-descriptions/helper.mjs +22 -12
- package/es/src/ap-descriptions/style/ap-descriptions.css +1 -5
- package/es/src/ap-download/ap-download.vue.mjs +51 -40
- package/es/src/ap-download/utils/getFileInfo.d.ts +4 -1
- package/es/src/ap-download/utils/getFileInfo.mjs +51 -26
- package/es/src/ap-form/ap-form-item.vue.d.ts +1 -1
- package/es/src/ap-form/ap-form-item.vue.mjs +68 -62
- package/es/src/ap-form/ap-form-list.vue.mjs +23 -21
- package/es/src/ap-form/ap-form.vue.d.ts +3 -1
- package/es/src/ap-form/ap-form.vue2.mjs +130 -80
- package/es/src/ap-form/interface.d.ts +51 -1
- package/es/src/ap-form/items/checkbox/index.vue.mjs +6 -5
- package/es/src/ap-form/items/date/index.vue.mjs +10 -9
- package/es/src/ap-form/items/date-range/index.vue.mjs +8 -7
- package/es/src/ap-form/items/number/index.vue.mjs +12 -11
- package/es/src/ap-form/items/radio/index.vue.mjs +5 -4
- package/es/src/ap-form/items/select/index.vue.mjs +1 -0
- package/es/src/ap-form/items/switch/index.vue.mjs +10 -9
- package/es/src/ap-form/items/text/index.vue2.mjs +1 -0
- package/es/src/ap-form/items/text/password.vue.mjs +1 -0
- package/es/src/ap-form/items/text-area/index.vue.mjs +7 -6
- package/es/src/ap-form/modal-form/index.vue.d.ts +7 -3
- package/es/src/ap-form/search-form/index.vue.d.ts +7 -3
- package/es/src/ap-form/utils/get.d.ts +1 -0
- package/es/src/ap-form/utils/get.mjs +12 -0
- package/es/src/ap-form/utils/set.d.ts +6 -0
- package/es/src/ap-form/utils/set.mjs +41 -0
- package/es/src/ap-list/index.vue.d.ts +3 -0
- package/es/src/ap-list/index.vue.mjs +51 -49
- package/es/src/ap-table/ap-table.vue.d.ts +4 -1
- package/es/src/ap-table/ap-table.vue.mjs +65 -59
- package/es/src/ap-table/constants.d.ts +121 -1
- package/es/src/ap-table/interface.d.ts +6 -1
- package/es/src/ap-table/utils.d.ts +121 -1
- package/es/src/business/ap-attachment/ApAttachment.mjs +76 -68
- package/es/src/business/ap-card/ApCard.vue.d.ts +27 -0
- package/es/src/business/ap-card/ApCard.vue.mjs +4 -0
- package/es/src/business/ap-card/ApCard.vue2.mjs +65 -0
- package/es/src/business/ap-card/index.css +10 -0
- package/es/src/business/ap-card/interface.d.ts +9 -0
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +30 -100
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +104 -64
- package/es/src/business/ap-expand-alert/interface.d.ts +24 -6
- package/es/src/business/ap-expand-alert/style.css +9 -0
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +59 -70
- package/es/src/business/ap-export-group/handleExportDownload.d.ts +1 -0
- package/es/src/business/ap-export-group/handleExportDownload.mjs +14 -0
- package/es/src/business/{title → ap-title}/style.css +4 -4
- package/es/src/business/hooks/usePageListApTable.d.ts +2 -0
- package/es/src/business/index.d.ts +105 -188
- package/es/src/business/index.mjs +28 -23
- package/es/src/check-card/group.vue.d.ts +7 -1
- package/es/src/check-card/group.vue.mjs +26 -22
- package/es/src/check-card/index.vue.d.ts +5 -2
- package/es/src/check-card/index.vue2.mjs +69 -60
- package/es/src/check-card/interface.d.ts +12 -0
- package/es/src/check-card/style/index.css +8 -5
- package/es/src/config-provider/config-provider-props.d.ts +5 -1
- package/es/src/config-provider/config-provider-props.mjs +6 -2
- package/es/src/config-provider/config-provider.d.ts +10 -1
- package/es/src/config-provider/config-provider.mjs +20 -19
- package/es/src/config-provider/constants.d.ts +9 -0
- package/es/src/config-provider/hooks/use-global-config.d.ts +5 -1
- package/es/src/config-provider/index.d.ts +20 -1
- package/es/src/editable-table/interface.d.ts +3 -2
- package/es/src/index.mjs +215 -210
- package/es/src/locale/lang/en.mjs +4 -0
- package/es/src/locale/lang/zh-cn.mjs +4 -0
- package/es/src/theme/ap-card/ap-card.css +10 -0
- package/es/src/theme/ap-descriptions/ap-descriptions.css +1 -5
- package/es/src/theme/ap-expand-alert/ap-expand-alert.css +9 -0
- package/es/src/theme/ap-title/ap-title.css +4 -4
- package/es/src/theme/check-card/index.css +8 -5
- package/es/src/theme/css-var/index.mjs +33 -15
- package/lib/index.js +1 -1
- package/lib/src/ap-button/ap-action-button.vue.d.ts +43 -0
- package/lib/src/ap-button/ap-action-button.vue.js +1 -0
- package/lib/src/ap-button/ap-action-button.vue2.js +1 -0
- package/lib/src/ap-button/ap-button.vue.js +1 -1
- package/lib/src/ap-button/index.d.ts +2 -1
- package/lib/src/ap-button/index.js +1 -1
- package/lib/src/ap-button/interface.d.ts +1 -0
- package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
- package/lib/src/ap-descriptions/formatter/index.d.ts +2 -2
- package/lib/src/ap-descriptions/helper.d.ts +19 -1
- package/lib/src/ap-descriptions/helper.js +1 -1
- package/lib/src/ap-descriptions/style/ap-descriptions.css +1 -5
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-download/utils/getFileInfo.d.ts +4 -1
- package/lib/src/ap-download/utils/getFileInfo.js +1 -1
- package/lib/src/ap-form/ap-form-item.vue.d.ts +1 -1
- package/lib/src/ap-form/ap-form-item.vue.js +1 -1
- package/lib/src/ap-form/ap-form-list.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue.d.ts +3 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/interface.d.ts +51 -1
- package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
- package/lib/src/ap-form/items/date/index.vue.js +1 -1
- package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.js +1 -1
- package/lib/src/ap-form/items/radio/index.vue.js +1 -1
- package/lib/src/ap-form/items/select/index.vue.js +1 -1
- package/lib/src/ap-form/items/switch/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/index.vue2.js +1 -1
- package/lib/src/ap-form/items/text/password.vue.js +1 -1
- package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.d.ts +7 -3
- package/lib/src/ap-form/search-form/index.vue.d.ts +7 -3
- package/lib/src/ap-form/utils/get.d.ts +1 -0
- package/lib/src/ap-form/utils/get.js +1 -0
- package/lib/src/ap-form/utils/set.d.ts +6 -0
- package/lib/src/ap-form/utils/set.js +1 -0
- package/lib/src/ap-list/index.vue.d.ts +3 -0
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +4 -1
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +121 -1
- package/lib/src/ap-table/interface.d.ts +6 -1
- package/lib/src/ap-table/utils.d.ts +121 -1
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-card/ApCard.vue.d.ts +27 -0
- package/lib/src/business/ap-card/ApCard.vue.js +1 -0
- package/lib/src/business/ap-card/ApCard.vue2.js +1 -0
- package/lib/src/business/ap-card/index.css +10 -0
- package/lib/src/business/ap-card/interface.d.ts +9 -0
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +30 -100
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
- package/lib/src/business/ap-expand-alert/interface.d.ts +24 -6
- package/lib/src/business/ap-expand-alert/style.css +9 -0
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/business/ap-export-group/handleExportDownload.d.ts +1 -0
- package/lib/src/business/ap-export-group/handleExportDownload.js +1 -0
- package/lib/src/business/{title → ap-title}/style.css +4 -4
- package/lib/src/business/hooks/usePageListApTable.d.ts +2 -0
- package/lib/src/business/index.d.ts +105 -188
- package/lib/src/business/index.js +1 -1
- package/lib/src/check-card/group.vue.d.ts +7 -1
- package/lib/src/check-card/group.vue.js +1 -1
- package/lib/src/check-card/index.vue.d.ts +5 -2
- package/lib/src/check-card/index.vue2.js +1 -1
- package/lib/src/check-card/interface.d.ts +12 -0
- package/lib/src/check-card/style/index.css +8 -5
- package/lib/src/config-provider/config-provider-props.d.ts +5 -1
- package/lib/src/config-provider/config-provider-props.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +10 -1
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/constants.d.ts +9 -0
- package/lib/src/config-provider/hooks/use-global-config.d.ts +5 -1
- package/lib/src/config-provider/index.d.ts +20 -1
- package/lib/src/editable-table/interface.d.ts +3 -2
- package/lib/src/index.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/theme/ap-card/ap-card.css +10 -0
- package/lib/src/theme/ap-descriptions/ap-descriptions.css +1 -5
- package/lib/src/theme/ap-expand-alert/ap-expand-alert.css +9 -0
- package/lib/src/theme/ap-title/ap-title.css +4 -4
- package/lib/src/theme/check-card/index.css +8 -5
- package/lib/src/theme/css-var/index.js +1 -1
- package/package.json +1 -1
- /package/es/src/business/{title → ap-title}/ApTitle.vue.d.ts +0 -0
- /package/es/src/business/{title → ap-title}/ApTitle.vue.mjs +0 -0
- /package/es/src/business/{title → ap-title}/ApTitle.vue2.mjs +0 -0
- /package/es/src/business/{title → ap-title}/interface.d.ts +0 -0
- /package/lib/src/business/{title → ap-title}/ApTitle.vue.d.ts +0 -0
- /package/lib/src/business/{title → ap-title}/ApTitle.vue.js +0 -0
- /package/lib/src/business/{title → ap-title}/ApTitle.vue2.js +0 -0
- /package/lib/src/business/{title → ap-title}/interface.d.ts +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Descriptions as V, DescriptionsItem as
|
|
3
|
-
import { transformValue as
|
|
1
|
+
import { defineComponent as N, openBlock as l, createElementBlock as a, normalizeClass as h, unref as r, normalizeStyle as T, createVNode as B, mergeProps as _, withCtx as f, Fragment as s, renderList as w, createBlock as i, h as c, renderSlot as E, resolveDynamicComponent as M } from "vue";
|
|
2
|
+
import { Descriptions as V, DescriptionsItem as m } from "ant-design-vue";
|
|
3
|
+
import { mixinsAttachmentExtraProps as j, transformValue as x, isEmptyWithType as z } from "./helper.mjs";
|
|
4
4
|
import { get as S } from "lodash-unified";
|
|
5
5
|
import "./help-message/index.vue.mjs";
|
|
6
6
|
import "../config-provider/index.mjs";
|
|
7
7
|
import "./style/ap-descriptions.css";
|
|
8
|
-
import { useGlobalConfig as
|
|
9
|
-
import { useNamespace as
|
|
10
|
-
import
|
|
11
|
-
const
|
|
8
|
+
import { useGlobalConfig as u } from "../config-provider/hooks/use-global-config.mjs";
|
|
9
|
+
import { useNamespace as A } from "../config-provider/hooks/use-namespace.mjs";
|
|
10
|
+
import F from "./help-message/index.vue2.mjs";
|
|
11
|
+
const G = { key: 0 }, Q = /* @__PURE__ */ N({
|
|
12
12
|
__name: "ap-descriptions",
|
|
13
13
|
props: {
|
|
14
14
|
descriptionsProps: {},
|
|
@@ -18,46 +18,44 @@ const E = { key: 0 }, J = /* @__PURE__ */ D({
|
|
|
18
18
|
className: {}
|
|
19
19
|
},
|
|
20
20
|
setup(b) {
|
|
21
|
-
const
|
|
22
|
-
var
|
|
23
|
-
let
|
|
24
|
-
return ((
|
|
25
|
-
justifyContent:
|
|
21
|
+
const p = b, g = u("uiMode", "admin"), C = u("apDescriptions"), k = u("downloadCenterTriggerConfig"), { m: v, b: P } = A("ap-descriptions"), D = (t = {}) => {
|
|
22
|
+
var o;
|
|
23
|
+
let n = "";
|
|
24
|
+
return ((o = p.descriptionsProps) == null ? void 0 : o.layout) === "vertical" && (n = "start"), {
|
|
25
|
+
justifyContent: n,
|
|
26
26
|
...t
|
|
27
27
|
};
|
|
28
|
-
},
|
|
29
|
-
var
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
downloadFile: l
|
|
36
|
-
}), h({ value: a, record: i.dataSource }, t);
|
|
28
|
+
}, y = (t) => {
|
|
29
|
+
var o, e;
|
|
30
|
+
const n = S(p.dataSource, t.field);
|
|
31
|
+
return t.customRender ? t.customRender(p.dataSource) : (t.valueType === "attachment" && (t.extraProps = j(t.extraProps, {
|
|
32
|
+
fromConfig: (o = C.value) == null ? void 0 : o.downloadFile,
|
|
33
|
+
fromGlobal: (e = k.value) == null ? void 0 : e.trigger
|
|
34
|
+
})), x({ value: n, record: p.dataSource }, t));
|
|
37
35
|
};
|
|
38
|
-
return (t,
|
|
39
|
-
var
|
|
40
|
-
return
|
|
41
|
-
class:
|
|
42
|
-
style:
|
|
36
|
+
return (t, n) => {
|
|
37
|
+
var o;
|
|
38
|
+
return l(), a("div", {
|
|
39
|
+
class: h([t.className, r(P)(), r(v)(r(g))]),
|
|
40
|
+
style: T(t.style)
|
|
43
41
|
}, [
|
|
44
|
-
|
|
45
|
-
labelStyle:
|
|
42
|
+
B(r(V), _(t.descriptionsProps, {
|
|
43
|
+
labelStyle: D({ ...((o = t.descriptionsProps) == null ? void 0 : o.labelStyle) || {} })
|
|
46
44
|
}), {
|
|
47
|
-
default:
|
|
48
|
-
(
|
|
49
|
-
key: e.field || "empty" +
|
|
45
|
+
default: f(() => [
|
|
46
|
+
(l(!0), a(s, null, w(t.schemas, (e, d) => (l(), a(s, {
|
|
47
|
+
key: e.field || "empty" + d
|
|
50
48
|
}, [
|
|
51
|
-
e.valueType === "empty" ? (
|
|
49
|
+
e.valueType === "empty" ? (l(), i(r(m), {
|
|
52
50
|
key: 0,
|
|
53
51
|
contentStyle: e.contentStyle,
|
|
54
52
|
labelStyle: e.labelStyle,
|
|
55
53
|
span: e.span
|
|
56
|
-
}, null, 8, ["contentStyle", "labelStyle", "span"])) : (
|
|
54
|
+
}, null, 8, ["contentStyle", "labelStyle", "span"])) : (l(), i(r(m), {
|
|
57
55
|
key: 1,
|
|
58
|
-
label: e.label ?
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
label: e.label ? c(s, [
|
|
57
|
+
c(
|
|
58
|
+
F,
|
|
61
59
|
{ helpMessage: e.helpMessage },
|
|
62
60
|
{ default: () => e.label }
|
|
63
61
|
)
|
|
@@ -66,17 +64,17 @@ const E = { key: 0 }, J = /* @__PURE__ */ D({
|
|
|
66
64
|
contentStyle: e.contentStyle,
|
|
67
65
|
labelStyle: e.labelStyle
|
|
68
66
|
}, {
|
|
69
|
-
default:
|
|
70
|
-
r(
|
|
71
|
-
e.contentSlotName ?
|
|
67
|
+
default: f(() => [
|
|
68
|
+
r(z)(r(S)(t.dataSource, e.field), e.valueType) ? (l(), a("span", G, "--")) : (l(), a(s, { key: 1 }, [
|
|
69
|
+
e.contentSlotName ? E(t.$slots, e.contentSlotName, {
|
|
72
70
|
key: 0,
|
|
73
|
-
index:
|
|
74
|
-
item:
|
|
71
|
+
index: d,
|
|
72
|
+
item: y(e),
|
|
75
73
|
record: t.dataSource
|
|
76
|
-
}) : (
|
|
77
|
-
|
|
74
|
+
}) : (l(), i(M(
|
|
75
|
+
c(s, [
|
|
78
76
|
e.prefix,
|
|
79
|
-
|
|
77
|
+
y(e),
|
|
80
78
|
e.suffix
|
|
81
79
|
])
|
|
82
80
|
), { key: 1 }))
|
|
@@ -93,5 +91,5 @@ const E = { key: 0 }, J = /* @__PURE__ */ D({
|
|
|
93
91
|
}
|
|
94
92
|
});
|
|
95
93
|
export {
|
|
96
|
-
|
|
94
|
+
Q as default
|
|
97
95
|
};
|
|
@@ -44,7 +44,7 @@ interface DateRangeExtraProps {
|
|
|
44
44
|
}
|
|
45
45
|
/** 处理日期范围 */
|
|
46
46
|
export declare function dateRange({ value, record }: FormatOptions, extraProps: DateRangeExtraProps): string;
|
|
47
|
-
interface AttachmentExtraProps {
|
|
47
|
+
export interface AttachmentExtraProps {
|
|
48
48
|
/** url字段路径 */
|
|
49
49
|
urlPath?: string | string[];
|
|
50
50
|
/** 资源名称字段路径 */
|
|
@@ -53,7 +53,7 @@ interface AttachmentExtraProps {
|
|
|
53
53
|
style?: StyleValue;
|
|
54
54
|
/** 类名称 */
|
|
55
55
|
className?: string;
|
|
56
|
-
/**
|
|
56
|
+
/** 配置downloadCenterTriggerConfig优先级最高,次配置失效 */
|
|
57
57
|
downloadFile?: (url: string, name: string) => void;
|
|
58
58
|
}
|
|
59
59
|
/** 处理附件类型 */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FormatOptions, FormatterValueType, TransformOptionType } from './interface';
|
|
2
|
-
import { VNode, VNodeChild } from 'vue';
|
|
2
|
+
import { VNode, VNodeChild, StyleValue } from 'vue';
|
|
3
|
+
import { AttachmentExtraProps } from './formatter';
|
|
3
4
|
export declare function transformValue(data: FormatOptions, opt: TransformOptionType): VNodeChild | VNode;
|
|
4
5
|
/**
|
|
5
6
|
* 根据type判断是否为空
|
|
@@ -7,3 +8,20 @@ export declare function transformValue(data: FormatOptions, opt: TransformOption
|
|
|
7
8
|
* @param type 类型
|
|
8
9
|
*/
|
|
9
10
|
export declare function isEmptyWithType(value: unknown, type: FormatterValueType): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* 混入附件类型额外属性
|
|
13
|
+
* @param target 原配置
|
|
14
|
+
* @param options.fromGlobal 来自全局配置的下载文件方法
|
|
15
|
+
* @param options.fromConfig 来自全局配置里的ApDescriptions的下载文件方法
|
|
16
|
+
* @returns 混入后的配置
|
|
17
|
+
*/
|
|
18
|
+
export declare function mixinsAttachmentExtraProps(target: AttachmentExtraProps | undefined, options: {
|
|
19
|
+
fromGlobal?: (...args: any[]) => any;
|
|
20
|
+
fromConfig?: (...args: any[]) => any;
|
|
21
|
+
}): AttachmentExtraProps | {
|
|
22
|
+
downloadFile: (...args: any[]) => any;
|
|
23
|
+
urlPath?: string | string[];
|
|
24
|
+
namePath?: string | string[];
|
|
25
|
+
style?: StyleValue;
|
|
26
|
+
className?: string;
|
|
27
|
+
};
|
|
@@ -1,24 +1,34 @@
|
|
|
1
|
-
import { isEmpty as
|
|
2
|
-
import { formatterMap as
|
|
3
|
-
function
|
|
4
|
-
const e = n
|
|
5
|
-
return e ? e(
|
|
1
|
+
import { isEmpty as o } from "lodash-unified";
|
|
2
|
+
import { formatterMap as f } from "./formatter/index.mjs";
|
|
3
|
+
function m(r, n) {
|
|
4
|
+
const e = f[n.valueType];
|
|
5
|
+
return e ? e(r, n.extraProps || {}) : r.value;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
8
|
-
switch (
|
|
7
|
+
function a(r, n) {
|
|
8
|
+
switch (n) {
|
|
9
9
|
case "text":
|
|
10
10
|
case "number":
|
|
11
11
|
case "dateRange":
|
|
12
12
|
case "date":
|
|
13
|
-
return
|
|
13
|
+
return r == null || r === "";
|
|
14
14
|
case "array":
|
|
15
15
|
case "attachment":
|
|
16
|
-
return
|
|
16
|
+
return o(r);
|
|
17
17
|
default:
|
|
18
|
-
return !
|
|
18
|
+
return !r;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
+
function c(r = {}, n) {
|
|
22
|
+
return n.fromGlobal ? {
|
|
23
|
+
...r,
|
|
24
|
+
downloadFile: n.fromGlobal
|
|
25
|
+
} : !(r != null && r.downloadFile) && n.fromConfig ? {
|
|
26
|
+
...r,
|
|
27
|
+
downloadFile: n.fromConfig
|
|
28
|
+
} : r;
|
|
29
|
+
}
|
|
21
30
|
export {
|
|
22
|
-
|
|
23
|
-
c as
|
|
31
|
+
a as isEmptyWithType,
|
|
32
|
+
c as mixinsAttachmentExtraProps,
|
|
33
|
+
m as transformValue
|
|
24
34
|
};
|
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
TODO:
|
|
3
3
|
1.admin和aplus样式提成变量?
|
|
4
4
|
*/
|
|
5
|
-
.aplus-ap-descriptions {
|
|
6
|
-
--ap-descriptions-item-padding-bottom: 24px;
|
|
7
|
-
--ap-descriptions-item-label-width: auto;
|
|
8
|
-
}
|
|
9
5
|
.aplus-ap-descriptions .ant-descriptions .ant-descriptions-view table {
|
|
10
6
|
table-layout: fixed;
|
|
11
7
|
}
|
|
@@ -16,7 +12,7 @@
|
|
|
16
12
|
padding-bottom: 8px;
|
|
17
13
|
}
|
|
18
14
|
.aplus-ap-descriptions .ant-descriptions .ant-descriptions-row:last-child .ant-descriptions-item {
|
|
19
|
-
padding-bottom:
|
|
15
|
+
padding-bottom: var(--ap-descriptions-last-row-item-padding-bottom);
|
|
20
16
|
}
|
|
21
17
|
.aplus-ap-descriptions .ant-descriptions .ant-descriptions-item-label::after {
|
|
22
18
|
margin-inline: 4px 20px;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Button as
|
|
3
|
-
import { LoadingOutlined as
|
|
1
|
+
import { defineComponent as x, ref as A, useSlots as S, computed as t, unref as s, openBlock as r, createBlock as j, mergeProps as I, withCtx as M, createElementVNode as u, normalizeClass as T, createElementBlock as f, createVNode as U, createCommentVNode as g, renderSlot as V, toDisplayString as D } from "vue";
|
|
2
|
+
import { Button as E } from "ant-design-vue";
|
|
3
|
+
import { LoadingOutlined as G } from "@ant-design/icons-vue";
|
|
4
4
|
import "../config-provider/index.mjs";
|
|
5
|
-
import { useOssInit as
|
|
5
|
+
import { useOssInit as P } from "./hooks/index.mjs";
|
|
6
6
|
import "./style/ap-download.css";
|
|
7
|
-
import { getFileInfo as
|
|
8
|
-
import { useStyle as
|
|
9
|
-
import { useLocale as
|
|
10
|
-
import { useGlobalConfig as
|
|
11
|
-
const
|
|
7
|
+
import { getFileInfo as y } from "./utils/getFileInfo.mjs";
|
|
8
|
+
import { useStyle as R } from "./hooks/useStyle.mjs";
|
|
9
|
+
import { useLocale as W } from "../config-provider/hooks/use-locale.mjs";
|
|
10
|
+
import { useGlobalConfig as c } from "../config-provider/hooks/use-global-config.mjs";
|
|
11
|
+
const $ = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "spin"
|
|
14
|
-
},
|
|
14
|
+
}, q = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "icon"
|
|
17
|
-
},
|
|
17
|
+
}, H = { class: "text" }, le = /* @__PURE__ */ x({
|
|
18
18
|
name: "ApDownload",
|
|
19
19
|
__name: "ap-download",
|
|
20
20
|
props: {
|
|
@@ -41,45 +41,56 @@ const P = {
|
|
|
41
41
|
getOssAccess: {}
|
|
42
42
|
},
|
|
43
43
|
emits: ["downloadCallback"],
|
|
44
|
-
setup(
|
|
45
|
-
const
|
|
44
|
+
setup(C, { emit: b }) {
|
|
45
|
+
const h = b, l = A(!1), { lang: N } = W(), _ = S(), w = t(() => N.value === "zh-cn" ? "zh_CN" : "en_US"), k = c("uiMode"), e = C, v = c("apUpload"), d = c(
|
|
46
|
+
"downloadCenterTriggerConfig"
|
|
47
|
+
), p = t(() => e.disabled), B = t(() => e.color ? e.color : k.value === "aplus" ? "#0070FF" : "#1890FF"), z = t(() => e.size), { getInnerWrapperClass: O } = R(B, z, p), F = t(() => {
|
|
46
48
|
var o;
|
|
47
|
-
return e.getOssAccess || ((o =
|
|
48
|
-
}),
|
|
49
|
+
return e.getOssAccess || ((o = v.value) == null ? void 0 : o.getOssAccess);
|
|
50
|
+
}), L = async () => {
|
|
51
|
+
var o, a;
|
|
49
52
|
if (!e.disabled) {
|
|
50
|
-
|
|
53
|
+
l.value = !0;
|
|
51
54
|
try {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
if ((o = d.value) != null && o.trigger) {
|
|
56
|
+
let i = y(e.needName, e.fileName).map((m) => ({
|
|
57
|
+
objectName: m.path,
|
|
58
|
+
fileName: m.fileName
|
|
59
|
+
}));
|
|
60
|
+
(a = d.value) == null || a.trigger(i);
|
|
61
|
+
} else {
|
|
62
|
+
const i = await (await P(
|
|
63
|
+
F.value,
|
|
64
|
+
s(w)
|
|
65
|
+
)).downloadFile(
|
|
66
|
+
y(e.needName, e.fileName)
|
|
67
|
+
);
|
|
68
|
+
h("downloadCallback", i);
|
|
69
|
+
}
|
|
70
|
+
} catch (n) {
|
|
71
|
+
console.error(n);
|
|
61
72
|
} finally {
|
|
62
|
-
|
|
73
|
+
l.value = !1;
|
|
63
74
|
}
|
|
64
75
|
}
|
|
65
76
|
};
|
|
66
|
-
return (o,
|
|
77
|
+
return (o, a) => (r(), j(s(E), I(e, {
|
|
67
78
|
type: e.type,
|
|
68
79
|
size: e.size,
|
|
69
|
-
disabled:
|
|
70
|
-
onClick:
|
|
80
|
+
disabled: p.value,
|
|
81
|
+
onClick: L
|
|
71
82
|
}), {
|
|
72
|
-
default:
|
|
73
|
-
|
|
74
|
-
class:
|
|
83
|
+
default: M(() => [
|
|
84
|
+
u("div", {
|
|
85
|
+
class: T(s(O))
|
|
75
86
|
}, [
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
])) :
|
|
79
|
-
s(
|
|
80
|
-
|
|
81
|
-
])) :
|
|
82
|
-
|
|
87
|
+
l.value ? (r(), f("span", $, [
|
|
88
|
+
U(s(G), { spin: !0 })
|
|
89
|
+
])) : g("", !0),
|
|
90
|
+
s(_).icon ? (r(), f("span", q, [
|
|
91
|
+
V(o.$slots, "icon")
|
|
92
|
+
])) : g("", !0),
|
|
93
|
+
u("span", H, D(o.text), 1)
|
|
83
94
|
], 2)
|
|
84
95
|
]),
|
|
85
96
|
_: 3
|
|
@@ -87,5 +98,5 @@ const P = {
|
|
|
87
98
|
}
|
|
88
99
|
});
|
|
89
100
|
export {
|
|
90
|
-
|
|
101
|
+
le as default
|
|
91
102
|
};
|
|
@@ -2,7 +2,10 @@ import { ApDownLoadNeedNameModel } from '../interface';
|
|
|
2
2
|
/**
|
|
3
3
|
* 根据needName将fileName转换为OSS下载格式
|
|
4
4
|
*/
|
|
5
|
-
export declare function getFileInfo(needName?: ApDownLoadNeedNameModel, fileName?: any):
|
|
5
|
+
export declare function getFileInfo(needName?: ApDownLoadNeedNameModel, fileName?: any): {
|
|
6
|
+
path: string;
|
|
7
|
+
fileName: string;
|
|
8
|
+
}[];
|
|
6
9
|
/**
|
|
7
10
|
* 根据hexColor颜色和opacity透明度计算rgba颜色数值,返回
|
|
8
11
|
*/
|
|
@@ -1,41 +1,66 @@
|
|
|
1
1
|
import { ApDownLoadNeedNameKeyDefault as y } from "../interface.mjs";
|
|
2
|
-
function K(
|
|
3
|
-
if (
|
|
4
|
-
if (typeof
|
|
5
|
-
return
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
function K(r, t) {
|
|
3
|
+
if (r === !0) {
|
|
4
|
+
if (typeof t == "string")
|
|
5
|
+
return [
|
|
6
|
+
{
|
|
7
|
+
path: t,
|
|
8
|
+
fileName: t
|
|
9
|
+
}
|
|
10
|
+
];
|
|
11
|
+
if (Array.isArray(t))
|
|
12
|
+
return t.map((p) => ({
|
|
13
|
+
path: (p == null ? void 0 : p[y.pathKey]) ?? p,
|
|
14
|
+
fileName: (p == null ? void 0 : p[y.nameKey]) ?? p
|
|
10
15
|
}));
|
|
11
|
-
if (typeof
|
|
16
|
+
if (typeof t == "object")
|
|
17
|
+
return [
|
|
18
|
+
{
|
|
19
|
+
path: t == null ? void 0 : t[y.pathKey],
|
|
20
|
+
fileName: t == null ? void 0 : t[y.nameKey]
|
|
21
|
+
}
|
|
22
|
+
];
|
|
23
|
+
} else if (typeof r == "object") {
|
|
24
|
+
if (typeof t == "string")
|
|
12
25
|
return [
|
|
13
26
|
{
|
|
14
|
-
path:
|
|
15
|
-
fileName:
|
|
27
|
+
path: t,
|
|
28
|
+
fileName: t
|
|
16
29
|
}
|
|
17
30
|
];
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return r.map((p) => ({
|
|
23
|
-
path: p == null ? void 0 : p[(t == null ? void 0 : t.pathKey) || y.pathKey],
|
|
24
|
-
fileName: p == null ? void 0 : p[(t == null ? void 0 : t.nameKey) || y.nameKey]
|
|
31
|
+
if (Array.isArray(t))
|
|
32
|
+
return t.map((p) => ({
|
|
33
|
+
path: (p == null ? void 0 : p[(r == null ? void 0 : r.pathKey) || y.pathKey]) ?? p,
|
|
34
|
+
fileName: (p == null ? void 0 : p[(r == null ? void 0 : r.nameKey) || y.nameKey]) ?? p
|
|
25
35
|
}));
|
|
26
|
-
if (typeof
|
|
36
|
+
if (typeof t == "object")
|
|
37
|
+
return [
|
|
38
|
+
{
|
|
39
|
+
path: t == null ? void 0 : t[(r == null ? void 0 : r.pathKey) || y.pathKey],
|
|
40
|
+
fileName: t == null ? void 0 : t[(r == null ? void 0 : r.nameKey) || y.nameKey]
|
|
41
|
+
}
|
|
42
|
+
];
|
|
43
|
+
} else {
|
|
44
|
+
if (typeof t == "string")
|
|
27
45
|
return [
|
|
28
46
|
{
|
|
29
|
-
path:
|
|
30
|
-
fileName:
|
|
47
|
+
path: t,
|
|
48
|
+
fileName: t
|
|
31
49
|
}
|
|
32
50
|
];
|
|
33
|
-
|
|
34
|
-
|
|
51
|
+
if (Array.isArray(t))
|
|
52
|
+
return t.map((p) => typeof p == "string" ? {
|
|
53
|
+
path: p,
|
|
54
|
+
fileName: p
|
|
55
|
+
} : p);
|
|
56
|
+
if (typeof t == "object")
|
|
57
|
+
return [t];
|
|
58
|
+
}
|
|
59
|
+
return [];
|
|
35
60
|
}
|
|
36
|
-
function g(
|
|
37
|
-
|
|
38
|
-
const p = parseInt(
|
|
61
|
+
function g(r, t) {
|
|
62
|
+
r.length === 4 && (r = `#${r[1]}${r[1]}${r[2]}${r[2]}${r[3]}${r[3]}`);
|
|
63
|
+
const p = parseInt(r.slice(1, 3), 16), s = parseInt(r.slice(3, 5), 16), n = parseInt(r.slice(5, 7), 16), u = Math.round(t * 255).toString(16).padStart(2, "0");
|
|
39
64
|
return `#${p.toString(16).padStart(2, "0")}${s.toString(16).padStart(2, "0")}${n.toString(16).padStart(2, "0")}${u}`;
|
|
40
65
|
}
|
|
41
66
|
export {
|
|
@@ -9,7 +9,7 @@ declare function onFieldBlur(): void;
|
|
|
9
9
|
declare function onFieldChange(): void;
|
|
10
10
|
declare function clearValidate(): void;
|
|
11
11
|
declare function resetField(): void;
|
|
12
|
-
declare function getFieldValue(): any;
|
|
12
|
+
declare function getFieldValue(shouldFormat?: boolean): any;
|
|
13
13
|
declare function __VLS_template(): {
|
|
14
14
|
slots: Readonly<ApFormItemSlots> & ApFormItemSlots;
|
|
15
15
|
refs: {
|