@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,107 +1,37 @@
|
|
|
1
1
|
import { ApExpandAlertProps } from './interface';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement } from 'vue';
|
|
3
|
+
declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
|
+
onExpand?: ((...args: any[]) => any) | undefined;
|
|
6
|
+
onChoose?: ((...args: any[]) => any) | undefined;
|
|
7
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{}>> & {
|
|
8
|
+
onExpand?: ((...args: any[]) => any) | undefined;
|
|
9
|
+
onChoose?: ((...args: any[]) => any) | undefined;
|
|
10
|
+
}, never>, "onExpand" | "onChoose"> & ApExpandAlertProps<T>> & PublicProps;
|
|
11
|
+
expose(exposed: ShallowUnwrapRef<{
|
|
12
|
+
setExpand: (state?: boolean) => void;
|
|
13
|
+
}>): void;
|
|
14
|
+
attrs: any;
|
|
15
|
+
slots: Readonly<{
|
|
16
|
+
default(props: any): any;
|
|
17
|
+
item(props: {
|
|
18
|
+
record: T;
|
|
19
|
+
index: number;
|
|
20
|
+
}): any;
|
|
21
|
+
}> & {
|
|
22
|
+
default(props: any): any;
|
|
23
|
+
item(props: {
|
|
24
|
+
record: T;
|
|
25
|
+
index: number;
|
|
26
|
+
}): any;
|
|
11
27
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
28
|
+
emit: (event: "expand" | "choose", ...args: any[]) => void;
|
|
29
|
+
}>) => VNode<RendererNode, RendererElement, {
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
}> & {
|
|
32
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
16
33
|
};
|
|
17
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
18
|
-
declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApExpandAlertProps>, {
|
|
19
|
-
/**
|
|
20
|
-
* Alert类型
|
|
21
|
-
*/
|
|
22
|
-
type: string;
|
|
23
|
-
/**
|
|
24
|
-
* 数据
|
|
25
|
-
*/
|
|
26
|
-
data: () => never[];
|
|
27
|
-
/**
|
|
28
|
-
* 前缀
|
|
29
|
-
*/
|
|
30
|
-
prefix: string;
|
|
31
|
-
/**
|
|
32
|
-
* Tooltip 提示标题
|
|
33
|
-
*/
|
|
34
|
-
tipTitle: string;
|
|
35
|
-
/**
|
|
36
|
-
* 分隔符
|
|
37
|
-
*/
|
|
38
|
-
separator: string;
|
|
39
|
-
/**
|
|
40
|
-
* 内容达到几行显示展开收起
|
|
41
|
-
*/
|
|
42
|
-
rows: number;
|
|
43
|
-
}>, {
|
|
44
|
-
setExpand: typeof setExpand;
|
|
45
|
-
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
46
|
-
expand: (...args: any[]) => void;
|
|
47
|
-
choose: (...args: any[]) => void;
|
|
48
|
-
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApExpandAlertProps>, {
|
|
49
|
-
/**
|
|
50
|
-
* Alert类型
|
|
51
|
-
*/
|
|
52
|
-
type: string;
|
|
53
|
-
/**
|
|
54
|
-
* 数据
|
|
55
|
-
*/
|
|
56
|
-
data: () => never[];
|
|
57
|
-
/**
|
|
58
|
-
* 前缀
|
|
59
|
-
*/
|
|
60
|
-
prefix: string;
|
|
61
|
-
/**
|
|
62
|
-
* Tooltip 提示标题
|
|
63
|
-
*/
|
|
64
|
-
tipTitle: string;
|
|
65
|
-
/**
|
|
66
|
-
* 分隔符
|
|
67
|
-
*/
|
|
68
|
-
separator: string;
|
|
69
|
-
/**
|
|
70
|
-
* 内容达到几行显示展开收起
|
|
71
|
-
*/
|
|
72
|
-
rows: number;
|
|
73
|
-
}>>> & {
|
|
74
|
-
onExpand?: ((...args: any[]) => any) | undefined;
|
|
75
|
-
onChoose?: ((...args: any[]) => any) | undefined;
|
|
76
|
-
}, {
|
|
77
|
-
type: "warning" | "error" | "success" | "info" | undefined;
|
|
78
|
-
data: Array<any> | string;
|
|
79
|
-
separator: string;
|
|
80
|
-
prefix: string;
|
|
81
|
-
rows: string | number;
|
|
82
|
-
tipTitle: string;
|
|
83
|
-
}, {}>;
|
|
84
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
85
34
|
export default _default;
|
|
86
|
-
type __VLS_WithDefaults<P, D> = {
|
|
87
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
88
|
-
default: D[K];
|
|
89
|
-
}> : P[K];
|
|
90
|
-
};
|
|
91
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
92
|
-
type __VLS_TypePropsToOption<T> = {
|
|
93
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
94
|
-
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
95
|
-
} : {
|
|
96
|
-
type: PropType<T[K]>;
|
|
97
|
-
required: true;
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
101
|
-
new (): {
|
|
102
|
-
$slots: S;
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
35
|
type __VLS_PrettifyLocal<T> = {
|
|
106
36
|
[K in keyof T]: T[K];
|
|
107
37
|
} & {};
|
|
@@ -1,119 +1,159 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { DownOutlined as
|
|
3
|
-
import { Alert as
|
|
4
|
-
import { ApActionItem as
|
|
1
|
+
import { defineComponent as W, computed as f, ref as h, watch as T, nextTick as w, openBlock as a, createElementBlock as n, normalizeClass as s, unref as t, createVNode as x, withCtx as m, createBlock as g, createElementVNode as b, toDisplayString as p, createCommentVNode as A, normalizeStyle as c, renderSlot as N, resolveDynamicComponent as I, Fragment as C, renderList as j, createTextVNode as q } from "vue";
|
|
2
|
+
import { DownOutlined as J } from "@ant-design/icons-vue";
|
|
3
|
+
import { Alert as K, Tooltip as P } from "ant-design-vue";
|
|
4
|
+
import { ApActionItem as Q } from "../../ap-action/index.mjs";
|
|
5
5
|
import "../../config-provider/index.mjs";
|
|
6
6
|
import "./style.css";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
7
|
+
import { isString as E } from "lodash-unified";
|
|
8
|
+
import { useLocale as U } from "../../config-provider/hooks/use-locale.mjs";
|
|
9
|
+
import { useNamespace as X } from "../../config-provider/hooks/use-namespace.mjs";
|
|
10
|
+
import { useGlobalConfig as Y } from "../../config-provider/hooks/use-global-config.mjs";
|
|
11
|
+
const Z = ["onClick"], ue = /* @__PURE__ */ W({
|
|
10
12
|
__name: "ApExpandAlert",
|
|
11
13
|
props: {
|
|
12
14
|
type: { default: "warning" },
|
|
13
15
|
data: { default: () => [] },
|
|
14
16
|
prefix: { default: "" },
|
|
15
|
-
tipTitle: { default: "
|
|
17
|
+
tipTitle: { default: "" },
|
|
16
18
|
mapLabel: {},
|
|
17
19
|
separator: { default: "|" },
|
|
18
|
-
|
|
20
|
+
separatorStyle: { default: () => ({}) },
|
|
21
|
+
contentStyle: { default: () => ({}) },
|
|
22
|
+
prefixStyle: { default: () => ({}) },
|
|
23
|
+
rows: { default: 2 },
|
|
24
|
+
defaultExpand: { type: Boolean, default: !0 },
|
|
25
|
+
showIcon: { type: Boolean, default: !0 }
|
|
19
26
|
},
|
|
20
27
|
emits: ["choose", "expand"],
|
|
21
|
-
setup(
|
|
22
|
-
const
|
|
28
|
+
setup(L, { expose: $, emit: H }) {
|
|
29
|
+
const z = H, r = L, { t: S } = U(), V = f(() => {
|
|
30
|
+
if (r.type != "card")
|
|
31
|
+
return r.type;
|
|
32
|
+
}), l = h(""), u = h(null), D = f(() => ({
|
|
23
33
|
fontWeight: "400",
|
|
24
34
|
wordBreak: "break-all",
|
|
25
35
|
overflow: "hidden",
|
|
26
36
|
display: "-webkit-box",
|
|
27
|
-
webkitLineClamp:
|
|
37
|
+
webkitLineClamp: l.value,
|
|
28
38
|
webkitBoxOrient: "vertical",
|
|
29
39
|
lineHeight: "22px"
|
|
30
40
|
}));
|
|
31
|
-
function
|
|
32
|
-
|
|
41
|
+
function R() {
|
|
42
|
+
l.value === "1" ? l.value = "" : l.value = "1", z("expand");
|
|
33
43
|
}
|
|
34
|
-
const
|
|
35
|
-
function
|
|
36
|
-
e ?
|
|
44
|
+
const M = f(() => l.value === "1" ? S("ap.apExpandAlert.expand") : S("ap.apExpandAlert.collapse")), y = h(!0), B = f(() => l.value !== "1");
|
|
45
|
+
function v(e) {
|
|
46
|
+
e ? l.value = "" : l.value = "1";
|
|
37
47
|
}
|
|
38
|
-
|
|
39
|
-
() =>
|
|
48
|
+
T(
|
|
49
|
+
() => r.data,
|
|
40
50
|
() => {
|
|
41
|
-
|
|
42
|
-
if (
|
|
43
|
-
const e = Number(
|
|
44
|
-
parseInt(
|
|
51
|
+
l.value = "", w(() => {
|
|
52
|
+
if (u.value) {
|
|
53
|
+
const e = Number(u.value.clientHeight), d = Number(
|
|
54
|
+
parseInt(u.value.style.lineHeight)
|
|
45
55
|
);
|
|
46
|
-
e <
|
|
56
|
+
e < d * Number(r.rows) && B.value ? y.value = !1 : y.value = !0;
|
|
47
57
|
}
|
|
48
58
|
});
|
|
49
59
|
},
|
|
50
60
|
{
|
|
51
61
|
immediate: !0
|
|
52
62
|
}
|
|
63
|
+
), T(
|
|
64
|
+
() => r.defaultExpand,
|
|
65
|
+
(e) => {
|
|
66
|
+
e ? w(() => {
|
|
67
|
+
v(e);
|
|
68
|
+
}) : w(() => {
|
|
69
|
+
v(e);
|
|
70
|
+
});
|
|
71
|
+
},
|
|
72
|
+
{ immediate: !0 }
|
|
53
73
|
);
|
|
54
|
-
const { b:
|
|
55
|
-
return
|
|
56
|
-
setExpand:
|
|
57
|
-
}), (e,
|
|
58
|
-
class: s([t(
|
|
74
|
+
const { b: O, e: o, m: F } = X("ap-expand-alert"), G = Y("uiMode", "aplus");
|
|
75
|
+
return $({
|
|
76
|
+
setExpand: v
|
|
77
|
+
}), (e, d) => (a(), n("div", {
|
|
78
|
+
class: s([t(O)(), `${t(F)(t(G))}`])
|
|
59
79
|
}, [
|
|
60
|
-
|
|
61
|
-
type:
|
|
62
|
-
"show-icon":
|
|
63
|
-
class: s(t(
|
|
80
|
+
x(t(K), {
|
|
81
|
+
type: V.value,
|
|
82
|
+
"show-icon": e.showIcon,
|
|
83
|
+
class: s([t(o)("antAlert"), e.type == "card" ? "card-alert" : ""])
|
|
64
84
|
}, {
|
|
65
|
-
action:
|
|
66
|
-
|
|
85
|
+
action: m(() => [
|
|
86
|
+
y.value ? (a(), g(t(Q), {
|
|
67
87
|
key: 0,
|
|
68
88
|
size: "small",
|
|
69
|
-
onClick:
|
|
89
|
+
onClick: d[0] || (d[0] = (i) => R()),
|
|
70
90
|
style: { "font-size": "12px", "padding-left": "16px" }
|
|
71
91
|
}, {
|
|
72
|
-
default:
|
|
73
|
-
|
|
74
|
-
class: s(t(
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
class: s(
|
|
92
|
+
default: m(() => [
|
|
93
|
+
b("span", {
|
|
94
|
+
class: s(t(o)("expandText"))
|
|
95
|
+
}, p(M.value), 3),
|
|
96
|
+
x(t(J), {
|
|
97
|
+
class: s(B.value ? t(o)("expandIcon") : t(o)("collapseIcon"))
|
|
78
98
|
}, null, 8, ["class"])
|
|
79
99
|
]),
|
|
80
100
|
_: 1
|
|
81
|
-
})) :
|
|
101
|
+
})) : A("", !0)
|
|
82
102
|
]),
|
|
83
|
-
message:
|
|
84
|
-
|
|
85
|
-
style: D
|
|
86
|
-
class: s(t(
|
|
103
|
+
message: m(() => [
|
|
104
|
+
b("div", {
|
|
105
|
+
style: c({ ...D.value, ...e.contentStyle }),
|
|
106
|
+
class: s(t(o)("alertContent")),
|
|
87
107
|
ref_key: "ellipsisBoxRef",
|
|
88
|
-
ref:
|
|
108
|
+
ref: u
|
|
89
109
|
}, [
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
110
|
+
N(e.$slots, "default", {}, () => [
|
|
111
|
+
t(E)(e.prefix) ? (a(), n("span", {
|
|
112
|
+
key: 0,
|
|
113
|
+
class: s(t(o)("prefix")),
|
|
114
|
+
style: c(e.prefixStyle)
|
|
115
|
+
}, p(e.prefix), 7)) : (a(), g(I(e.prefix), {
|
|
116
|
+
key: 1,
|
|
117
|
+
style: c(e.prefixStyle)
|
|
118
|
+
}, null, 8, ["style"])),
|
|
119
|
+
t(E)(e.data) ? (a(), n("span", {
|
|
120
|
+
key: 2,
|
|
121
|
+
class: s(t(o)("text"))
|
|
122
|
+
}, p(e.data), 3)) : (a(!0), n(C, { key: 3 }, j(e.data, (i, k) => (a(), n(C, { key: k }, [
|
|
123
|
+
x(t(P), {
|
|
124
|
+
title: e.tipTitle ? e.tipTitle : null
|
|
125
|
+
}, {
|
|
126
|
+
default: m(() => [
|
|
127
|
+
N(e.$slots, "item", {
|
|
128
|
+
record: i,
|
|
129
|
+
index: k
|
|
130
|
+
}, () => [
|
|
131
|
+
b("span", {
|
|
132
|
+
class: s(t(o)("showItem")),
|
|
133
|
+
onClick: (_) => e.$emit("choose", i)
|
|
134
|
+
}, p(e.mapLabel ? i[e.mapLabel] : i), 11, Z)
|
|
135
|
+
])
|
|
101
136
|
]),
|
|
102
137
|
_: 2
|
|
103
138
|
}, 1032, ["title"]),
|
|
104
|
-
|
|
139
|
+
k !== e.data.length - 1 ? (a(), n("span", {
|
|
105
140
|
key: 0,
|
|
106
|
-
class: s(t(
|
|
107
|
-
|
|
141
|
+
class: s(t(o)("spliter")),
|
|
142
|
+
style: c(e.separatorStyle)
|
|
143
|
+
}, [
|
|
144
|
+
t(E)(e.separator) ? (a(), n(C, { key: 0 }, [
|
|
145
|
+
q(p(e.separator), 1)
|
|
146
|
+
], 64)) : (a(), g(I(e.separator), { key: 1 }))
|
|
147
|
+
], 6)) : A("", !0)
|
|
108
148
|
], 64))), 128))
|
|
109
149
|
])
|
|
110
150
|
], 6)
|
|
111
151
|
]),
|
|
112
152
|
_: 3
|
|
113
|
-
}, 8, ["type", "class"])
|
|
153
|
+
}, 8, ["type", "show-icon", "class"])
|
|
114
154
|
], 2));
|
|
115
155
|
}
|
|
116
156
|
});
|
|
117
157
|
export {
|
|
118
|
-
|
|
158
|
+
ue as default
|
|
119
159
|
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import { AlertProps } from 'ant-design-vue/es/alert';
|
|
2
|
+
import { Component, CSSProperties, VNode } from 'vue';
|
|
3
|
+
export type ApExpandAlertProps<T> = {
|
|
2
4
|
/**
|
|
3
5
|
* Alert类型
|
|
4
6
|
*/
|
|
5
|
-
type
|
|
7
|
+
type?: 'warning' | 'error' | 'success' | 'info' | 'card' | undefined;
|
|
6
8
|
/**
|
|
7
9
|
* 展开数据
|
|
8
10
|
*/
|
|
9
|
-
data
|
|
11
|
+
data?: Array<T> | string;
|
|
10
12
|
/**
|
|
11
13
|
* 标题前缀
|
|
12
14
|
*/
|
|
@@ -22,9 +24,25 @@ export interface ApExpandAlertProps {
|
|
|
22
24
|
/**
|
|
23
25
|
* 分隔符
|
|
24
26
|
*/
|
|
25
|
-
separator
|
|
27
|
+
separator?: Component | VNode | string;
|
|
28
|
+
/**
|
|
29
|
+
* 分隔符样式
|
|
30
|
+
*/
|
|
31
|
+
separatorStyle?: CSSProperties;
|
|
32
|
+
/**
|
|
33
|
+
* 内容样式
|
|
34
|
+
*/
|
|
35
|
+
contentStyle?: Omit<CSSProperties, 'wordBreak' | 'overflow' | 'display' | 'webkitLineClamp' | 'webkitBoxOrient'>;
|
|
36
|
+
/**
|
|
37
|
+
* 前缀样式
|
|
38
|
+
*/
|
|
39
|
+
prefixStyle?: CSSProperties;
|
|
26
40
|
/**
|
|
27
41
|
* 内容达到几行显示展开收起,默认是两行
|
|
28
42
|
*/
|
|
29
|
-
rows
|
|
30
|
-
|
|
43
|
+
rows?: string | number;
|
|
44
|
+
/**
|
|
45
|
+
* 默认是否展开
|
|
46
|
+
*/
|
|
47
|
+
defaultExpand?: boolean;
|
|
48
|
+
} & Pick<AlertProps, 'showIcon'>;
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
}
|
|
20
20
|
.aplus-ap-expand-alert__prefix {
|
|
21
21
|
color: #182948;
|
|
22
|
+
display: inline-block;
|
|
22
23
|
}
|
|
23
24
|
.aplus-ap-expand-alert__showItem {
|
|
24
25
|
color: #0070ff;
|
|
@@ -40,3 +41,11 @@
|
|
|
40
41
|
font-size: 16px;
|
|
41
42
|
transform: translateY(2px);
|
|
42
43
|
}
|
|
44
|
+
.aplus-ap-expand-alert--aplus .card-alert {
|
|
45
|
+
background-color: transparent !important;
|
|
46
|
+
border: none ;
|
|
47
|
+
}
|
|
48
|
+
.aplus-ap-expand-alert--admin .card-alert {
|
|
49
|
+
background-color: transparent !important;
|
|
50
|
+
border: none;
|
|
51
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { Modal as j, Dropdown as J, Menu as H, MenuItem as F, Button as Q } from "ant-design-vue";
|
|
1
|
+
import { defineComponent as M, computed as r, ref as P, openBlock as m, createBlock as f, unref as t, normalizeClass as D, withCtx as n, createVNode as y, createTextVNode as x, toDisplayString as p, normalizeStyle as K, createCommentVNode as R } from "vue";
|
|
2
|
+
import { DownOutlined as B } from "@ant-design/icons-vue";
|
|
3
|
+
import { Dropdown as N, Menu as T, MenuItem as _, Button as I } from "ant-design-vue";
|
|
5
4
|
import "../../config-provider/index.mjs";
|
|
6
|
-
import { ApExportGroupActionType as
|
|
7
|
-
import { usePermission as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
5
|
+
import { ApExportGroupActionType as u } from "./interface.mjs";
|
|
6
|
+
import { usePermission as V } from "@aplus-frontend/hooks";
|
|
7
|
+
import { handleExportDownload as q } from "./handleExportDownload.mjs";
|
|
8
|
+
import { useNamespace as z } from "../../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
import { useLocale as O } from "../../config-provider/hooks/use-locale.mjs";
|
|
10
|
+
import { useGlobalConfig as j } from "../../config-provider/hooks/use-global-config.mjs";
|
|
11
|
+
const te = /* @__PURE__ */ M({
|
|
12
12
|
__name: "ApExportGroup",
|
|
13
13
|
props: {
|
|
14
14
|
selectedRowKeys: {},
|
|
@@ -22,74 +22,63 @@ const ue = /* @__PURE__ */ R({
|
|
|
22
22
|
getInitialParams: { type: Function },
|
|
23
23
|
beforeRequest: { type: Function }
|
|
24
24
|
},
|
|
25
|
-
setup(
|
|
26
|
-
const { hasPermission:
|
|
27
|
-
const
|
|
25
|
+
setup(g) {
|
|
26
|
+
const { hasPermission: C } = V(), e = g, { b: E } = z("ap-export-group"), { t: c } = O(), S = j("uiMode"), L = r(() => {
|
|
27
|
+
const o = {
|
|
28
28
|
aplus: "#0070FF",
|
|
29
29
|
admin: "#34b77c"
|
|
30
30
|
};
|
|
31
|
-
return
|
|
32
|
-
}),
|
|
31
|
+
return b.value ? "" : o[S.value] || o.aplus;
|
|
32
|
+
}), b = r(() => !!(e != null && e.disabled)), A = {
|
|
33
33
|
textAlign: "center"
|
|
34
|
-
},
|
|
35
|
-
let
|
|
36
|
-
return !(e != null && e.ifShow) && (e != null && e.auth) && (
|
|
34
|
+
}, d = P(!1), w = r(() => (e == null ? void 0 : e.selectedRowKeys) || []), F = r(() => {
|
|
35
|
+
let o = e == null ? void 0 : e.ifShow;
|
|
36
|
+
return !(e != null && e.ifShow) && (e != null && e.auth) && (o = () => C(e.auth)), (o == null ? void 0 : o()) ?? !0;
|
|
37
37
|
});
|
|
38
|
-
async function
|
|
39
|
-
var
|
|
40
|
-
const { getRequestParams:
|
|
41
|
-
let
|
|
42
|
-
|
|
43
|
-
[(e == null ? void 0 : e.idKey) || "ids"]:
|
|
44
|
-
} :
|
|
45
|
-
const
|
|
38
|
+
async function k({ key: o }) {
|
|
39
|
+
var h, v;
|
|
40
|
+
const { getRequestParams: l, request: a } = e || {};
|
|
41
|
+
let s = {};
|
|
42
|
+
o === u.SELECT ? s = {
|
|
43
|
+
[(e == null ? void 0 : e.idKey) || "ids"]: w.value
|
|
44
|
+
} : o === u.ALL && (s = (l == null ? void 0 : l()) || {});
|
|
45
|
+
const G = ((h = e == null ? void 0 : e.getInitialParams) == null ? void 0 : h.call(e)) || {};
|
|
46
46
|
try {
|
|
47
|
-
|
|
48
|
-
let
|
|
49
|
-
...
|
|
50
|
-
...
|
|
47
|
+
d.value = !0;
|
|
48
|
+
let i = {
|
|
49
|
+
...s,
|
|
50
|
+
...G
|
|
51
51
|
};
|
|
52
|
-
|
|
53
|
-
const t = await (n == null ? void 0 : n(u));
|
|
54
|
-
if (toString.call(t == null ? void 0 : t.data) !== "[object Blob]")
|
|
55
|
-
return;
|
|
56
|
-
t != null && t.headers && !((S = t == null ? void 0 : t.headers) != null && S["content-disposition"]) ? (C = (_ = t == null ? void 0 : t.data) == null ? void 0 : _.text()) == null || C.then((K) => {
|
|
57
|
-
const f = JSON.parse(K || "{}");
|
|
58
|
-
f.code && f.code !== "200" && j.error({
|
|
59
|
-
title: i("ap.apExportGroup.exportError"),
|
|
60
|
-
content: f.message,
|
|
61
|
-
centered: !0
|
|
62
|
-
});
|
|
63
|
-
}) : z(t);
|
|
52
|
+
i = ((v = e == null ? void 0 : e.beforeRequest) == null ? void 0 : v.call(e, i)) || i, await q(async () => await (a == null ? void 0 : a(i)));
|
|
64
53
|
} finally {
|
|
65
|
-
|
|
54
|
+
d.value = !1;
|
|
66
55
|
}
|
|
67
56
|
}
|
|
68
|
-
return (
|
|
57
|
+
return (o, l) => F.value ? (m(), f(t(N), {
|
|
69
58
|
key: 0,
|
|
70
|
-
class:
|
|
71
|
-
overlayStyle:
|
|
72
|
-
disabled:
|
|
59
|
+
class: D([t(E)()]),
|
|
60
|
+
overlayStyle: A,
|
|
61
|
+
disabled: b.value
|
|
73
62
|
}, {
|
|
74
|
-
overlay:
|
|
75
|
-
|
|
76
|
-
default:
|
|
77
|
-
var
|
|
63
|
+
overlay: n(() => [
|
|
64
|
+
y(t(T), { onClick: k }, {
|
|
65
|
+
default: n(() => {
|
|
66
|
+
var a;
|
|
78
67
|
return [
|
|
79
|
-
(
|
|
80
|
-
key:
|
|
81
|
-
disabled: ((
|
|
68
|
+
(m(), f(t(_), {
|
|
69
|
+
key: t(u).SELECT,
|
|
70
|
+
disabled: ((a = w.value) == null ? void 0 : a.length) === 0
|
|
82
71
|
}, {
|
|
83
|
-
default:
|
|
84
|
-
|
|
72
|
+
default: n(() => [
|
|
73
|
+
x(p(t(c)("ap.apExportGroup.exportSelected")), 1)
|
|
85
74
|
]),
|
|
86
75
|
_: 1
|
|
87
76
|
}, 8, ["disabled"])),
|
|
88
|
-
(
|
|
89
|
-
key:
|
|
77
|
+
(m(), f(t(_), {
|
|
78
|
+
key: t(u).ALL
|
|
90
79
|
}, {
|
|
91
|
-
default:
|
|
92
|
-
|
|
80
|
+
default: n(() => [
|
|
81
|
+
x(p(t(c)("ap.apExportGroup.exportAll")), 1)
|
|
93
82
|
]),
|
|
94
83
|
_: 1
|
|
95
84
|
}))
|
|
@@ -98,24 +87,24 @@ const ue = /* @__PURE__ */ R({
|
|
|
98
87
|
_: 1
|
|
99
88
|
})
|
|
100
89
|
]),
|
|
101
|
-
default:
|
|
102
|
-
|
|
103
|
-
style:
|
|
104
|
-
color:
|
|
90
|
+
default: n(() => [
|
|
91
|
+
y(t(I), {
|
|
92
|
+
style: K({
|
|
93
|
+
color: L.value
|
|
105
94
|
}),
|
|
106
|
-
loading:
|
|
95
|
+
loading: d.value
|
|
107
96
|
}, {
|
|
108
|
-
default:
|
|
109
|
-
|
|
110
|
-
|
|
97
|
+
default: n(() => [
|
|
98
|
+
x(p((e == null ? void 0 : e.text) ?? t(c)("ap.apExportGroup.export")) + " ", 1),
|
|
99
|
+
y(t(B))
|
|
111
100
|
]),
|
|
112
101
|
_: 1
|
|
113
102
|
}, 8, ["style", "loading"])
|
|
114
103
|
]),
|
|
115
104
|
_: 1
|
|
116
|
-
}, 8, ["class", "disabled"])) :
|
|
105
|
+
}, 8, ["class", "disabled"])) : R("", !0);
|
|
117
106
|
}
|
|
118
107
|
});
|
|
119
108
|
export {
|
|
120
|
-
|
|
109
|
+
te as default
|
|
121
110
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function handleExportDownload(request?: () => Promise<any> | undefined): Promise<void>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { formatFileNameAndDownloadFile as n } from "@aplus-frontend/utils";
|
|
2
|
+
import { Modal as r } from "ant-design-vue";
|
|
3
|
+
async function i(t) {
|
|
4
|
+
const o = await (t == null ? void 0 : t());
|
|
5
|
+
Object.prototype.toString.call(o == null ? void 0 : o.data) === "[object Blob]" && n(o).catch((a) => {
|
|
6
|
+
r.error({
|
|
7
|
+
title: a,
|
|
8
|
+
centered: !0
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
i as handleExportDownload
|
|
14
|
+
};
|