@aplus-frontend/ui 0.1.26 → 0.1.27
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/src/ap-download/ap-download.vue.d.ts +7 -3
- package/es/src/ap-download/ap-download.vue.mjs +50 -35
- package/es/src/ap-download/interface.d.ts +3 -11
- package/es/src/ap-download/style/ap-download.css +3 -0
- package/es/src/ap-table/ap-table.vue.mjs +231 -183
- package/es/src/ap-table/components/interface.d.ts +33 -1
- package/es/src/ap-table/components/setting/images/icon_carst_down.svg.mjs +4 -0
- package/es/src/ap-table/components/setting/images/icon_fill_right.svg.mjs +4 -0
- package/es/src/ap-table/components/setting/modal/index.vue.d.ts +28 -0
- package/es/src/ap-table/components/setting/modal/index.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +152 -0
- package/es/src/ap-table/components/setting/select-group/index.vue.d.ts +13 -0
- package/es/src/ap-table/components/setting/select-group/index.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +96 -0
- package/es/src/ap-table/components/setting/sortable/index.vue.d.ts +13 -0
- package/es/src/ap-table/components/setting/sortable/index.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +51 -0
- package/es/src/ap-table/components/setting/sortable/item.vue.d.ts +20 -0
- package/es/src/ap-table/components/setting/sortable/item.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +140 -0
- package/es/src/ap-table/components/setting/sorter/context.d.ts +11 -0
- package/es/src/ap-table/components/setting/sorter/context.mjs +20 -0
- package/es/src/ap-table/components/setting/sorter/index.vue.d.ts +18 -0
- package/es/src/ap-table/components/setting/sorter/index.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +199 -0
- package/es/src/ap-table/components/setting/tree-select/index.vue.d.ts +13 -0
- package/es/src/ap-table/components/setting/tree-select/index.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +75 -0
- package/es/src/ap-table/components/setting/utils.d.ts +17 -0
- package/es/src/ap-table/components/setting/utils.mjs +48 -0
- package/es/src/ap-table/components/style/setting/modal.css +39 -0
- package/es/src/ap-table/components/style/setting/select-group.css +7 -0
- package/es/src/ap-table/components/style/setting/sortable-item-meta.css +50 -0
- package/es/src/ap-table/components/style/setting/sortable-item.css +3 -0
- package/es/src/ap-table/components/style/setting/sorter.css +26 -0
- package/es/src/ap-table/constants.d.ts +31 -8
- package/es/src/ap-table/constants.mjs +41 -53
- package/es/src/ap-table/context.d.ts +31 -0
- package/es/src/ap-table/context.mjs +20 -0
- package/es/src/ap-table/hooks/use-table-column-state.d.ts +18 -0
- package/es/src/ap-table/hooks/use-table-column-state.mjs +46 -0
- package/es/src/ap-table/hooks/use-table-content-height.mjs +19 -19
- package/es/src/ap-table/hooks/use-table-paging.d.ts +1 -0
- package/es/src/ap-table/hooks/use-table-paging.mjs +87 -82
- package/es/src/ap-table/interface.d.ts +51 -1
- package/es/src/ap-table/style/ap-table.css +29 -1
- package/es/src/ap-table/utils.d.ts +1 -1
- package/es/src/ap-table/utils.mjs +82 -82
- package/es/src/business/ap-attachment/ApAttachment.d.ts +1 -1
- package/es/src/business/ap-attachment/ApAttachment.mjs +45 -42
- package/es/src/business/ap-attachment/style.css +2 -0
- package/es/src/business/hooks/usePageListApTable.d.ts +2 -2
- package/es/src/business/index.d.ts +1 -1
- package/es/src/editable-table/interface.d.ts +1 -1
- package/es/src/locale/lang/en.mjs +14 -0
- package/es/src/locale/lang/zh-cn.mjs +14 -0
- package/es/src/theme/ap-attachment/ap-attachment.css +2 -0
- package/es/src/theme/ap-download/ap-download.css +3 -0
- package/es/src/theme/ap-table/ap-table.css +29 -1
- package/es/src/theme/ap-table/setting/modal.css +39 -0
- package/es/src/theme/ap-table/setting/select-group.css +7 -0
- package/es/src/theme/ap-table/setting/sortable-item-meta.css +50 -0
- package/es/src/theme/ap-table/setting/sortable-item.css +3 -0
- package/es/src/theme/ap-table/setting/sorter.css +26 -0
- package/es/src/theme/css-var/index.mjs +22 -12
- package/lib/src/ap-download/ap-download.vue.d.ts +7 -3
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-download/interface.d.ts +3 -11
- package/lib/src/ap-download/style/ap-download.css +3 -0
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/components/interface.d.ts +33 -1
- package/lib/src/ap-table/components/setting/images/icon_carst_down.svg.js +1 -0
- package/lib/src/ap-table/components/setting/images/icon_fill_right.svg.js +1 -0
- package/lib/src/ap-table/components/setting/modal/index.vue.d.ts +28 -0
- package/lib/src/ap-table/components/setting/modal/index.vue.js +1 -0
- package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/select-group/index.vue.d.ts +13 -0
- package/lib/src/ap-table/components/setting/select-group/index.vue.js +1 -0
- package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/sortable/index.vue.d.ts +13 -0
- package/lib/src/ap-table/components/setting/sortable/index.vue.js +1 -0
- package/lib/src/ap-table/components/setting/sortable/index.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/sortable/item.vue.d.ts +20 -0
- package/lib/src/ap-table/components/setting/sortable/item.vue.js +1 -0
- package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/sorter/context.d.ts +11 -0
- package/lib/src/ap-table/components/setting/sorter/context.js +1 -0
- package/lib/src/ap-table/components/setting/sorter/index.vue.d.ts +18 -0
- package/lib/src/ap-table/components/setting/sorter/index.vue.js +1 -0
- package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/tree-select/index.vue.d.ts +13 -0
- package/lib/src/ap-table/components/setting/tree-select/index.vue.js +1 -0
- package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/utils.d.ts +17 -0
- package/lib/src/ap-table/components/setting/utils.js +1 -0
- package/lib/src/ap-table/components/style/setting/modal.css +39 -0
- package/lib/src/ap-table/components/style/setting/select-group.css +7 -0
- package/lib/src/ap-table/components/style/setting/sortable-item-meta.css +50 -0
- package/lib/src/ap-table/components/style/setting/sortable-item.css +3 -0
- package/lib/src/ap-table/components/style/setting/sorter.css +26 -0
- package/lib/src/ap-table/constants.d.ts +31 -8
- package/lib/src/ap-table/constants.js +1 -1
- package/lib/src/ap-table/context.d.ts +31 -0
- package/lib/src/ap-table/context.js +1 -0
- package/lib/src/ap-table/hooks/use-table-column-state.d.ts +18 -0
- package/lib/src/ap-table/hooks/use-table-column-state.js +1 -0
- package/lib/src/ap-table/hooks/use-table-content-height.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging.d.ts +1 -0
- package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
- package/lib/src/ap-table/interface.d.ts +51 -1
- package/lib/src/ap-table/style/ap-table.css +29 -1
- package/lib/src/ap-table/utils.d.ts +1 -1
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.d.ts +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-attachment/style.css +2 -0
- package/lib/src/business/hooks/usePageListApTable.d.ts +2 -2
- package/lib/src/business/index.d.ts +1 -1
- package/lib/src/editable-table/interface.d.ts +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-attachment/ap-attachment.css +2 -0
- package/lib/src/theme/ap-download/ap-download.css +3 -0
- package/lib/src/theme/ap-table/ap-table.css +29 -1
- package/lib/src/theme/ap-table/setting/modal.css +39 -0
- package/lib/src/theme/ap-table/setting/select-group.css +7 -0
- package/lib/src/theme/ap-table/setting/sortable-item-meta.css +50 -0
- package/lib/src/theme/ap-table/setting/sortable-item.css +3 -0
- package/lib/src/theme/ap-table/setting/sorter.css +26 -0
- package/lib/src/theme/css-var/index.js +1 -1
- package/package.json +3 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ApDownLoadProps } from './interface';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
import { ButtonType } from 'ant-design-vue/es/button';
|
|
3
4
|
declare function __VLS_template(): {
|
|
4
5
|
slots: {
|
|
5
6
|
icon?(_: {}): any;
|
|
@@ -8,14 +9,17 @@ declare function __VLS_template(): {
|
|
|
8
9
|
attrs: Partial<{}>;
|
|
9
10
|
};
|
|
10
11
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
-
declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApDownLoadProps
|
|
12
|
+
declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApDownLoadProps>, {
|
|
13
|
+
type: string;
|
|
12
14
|
size: string;
|
|
13
15
|
disabled: boolean;
|
|
14
|
-
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApDownLoadProps
|
|
16
|
+
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApDownLoadProps>, {
|
|
17
|
+
type: string;
|
|
15
18
|
size: string;
|
|
16
19
|
disabled: boolean;
|
|
17
20
|
}>>>, {
|
|
18
|
-
size: "small" | "
|
|
21
|
+
size: "small" | "large" | "middle";
|
|
22
|
+
type: ButtonType;
|
|
19
23
|
disabled: boolean;
|
|
20
24
|
}, {}>;
|
|
21
25
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -1,54 +1,69 @@
|
|
|
1
|
-
import { defineComponent as b, useSlots as
|
|
1
|
+
import { defineComponent as b, useSlots as h, computed as t, unref as s, openBlock as l, createBlock as B, mergeProps as z, withCtx as k, createElementVNode as a, normalizeClass as w, createElementBlock as N, renderSlot as O, createCommentVNode as v, toDisplayString as F } from "vue";
|
|
2
|
+
import { Button as x } from "ant-design-vue";
|
|
2
3
|
import "../config-provider/index.mjs";
|
|
3
|
-
import { useOssInit as
|
|
4
|
+
import { useOssInit as A } from "./hooks/index.mjs";
|
|
4
5
|
import "./style/ap-download.css";
|
|
5
|
-
import { getFileInfo as
|
|
6
|
-
import { useStyle as
|
|
7
|
-
import { useLocale as
|
|
8
|
-
import { useGlobalConfig as
|
|
6
|
+
import { getFileInfo as S } from "./utils/getFileInfo.mjs";
|
|
7
|
+
import { useStyle as I } from "./hooks/useStyle.mjs";
|
|
8
|
+
import { useLocale as M } from "../config-provider/hooks/use-locale.mjs";
|
|
9
|
+
import { useGlobalConfig as i } from "../config-provider/hooks/use-global-config.mjs";
|
|
9
10
|
const U = {
|
|
10
11
|
key: 0,
|
|
11
12
|
class: "icon"
|
|
12
|
-
},
|
|
13
|
+
}, j = { class: "text" }, H = /* @__PURE__ */ b({
|
|
13
14
|
name: "ApDownload",
|
|
14
15
|
__name: "ap-download",
|
|
15
16
|
props: {
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
prefixCls: {},
|
|
18
|
+
type: { default: "link" },
|
|
19
|
+
htmlType: {},
|
|
20
|
+
shape: {},
|
|
18
21
|
size: { default: "middle" },
|
|
22
|
+
loading: { type: [Boolean, Object] },
|
|
19
23
|
disabled: { type: Boolean, default: !1 },
|
|
24
|
+
ghost: { type: Boolean },
|
|
25
|
+
block: { type: Boolean },
|
|
26
|
+
danger: { type: Boolean },
|
|
27
|
+
icon: {},
|
|
28
|
+
href: {},
|
|
29
|
+
target: {},
|
|
30
|
+
title: {},
|
|
31
|
+
onClick: {},
|
|
32
|
+
onMousedown: {},
|
|
33
|
+
text: {},
|
|
34
|
+
color: {},
|
|
20
35
|
fileName: {},
|
|
21
36
|
needName: { type: [Boolean, Object] },
|
|
22
37
|
getOssAccess: {}
|
|
23
38
|
},
|
|
24
|
-
setup(
|
|
25
|
-
const { lang:
|
|
26
|
-
C,
|
|
27
|
-
_,
|
|
28
|
-
g
|
|
29
|
-
), N = s(() => {
|
|
39
|
+
setup(c) {
|
|
40
|
+
const { lang: r } = M(), p = h(), d = t(() => r.value === "zh-cn" ? "zh_CN" : "en_US"), m = i("uiMode"), e = c, u = i("apUpload"), n = t(() => e.disabled), f = t(() => e.color ? e.color : m.value === "aplus" ? "#0070FF" : "#1890FF"), g = t(() => e.size), { getInnerWrapperClass: y } = I(f, g, n), C = t(() => {
|
|
30
41
|
var o;
|
|
31
|
-
return e.getOssAccess || ((o =
|
|
32
|
-
}),
|
|
33
|
-
e.disabled || await (await
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
)).downloadFile(
|
|
42
|
+
return e.getOssAccess || ((o = u.value) == null ? void 0 : o.getOssAccess);
|
|
43
|
+
}), _ = async () => {
|
|
44
|
+
e.disabled || await (await A(
|
|
45
|
+
C.value,
|
|
46
|
+
s(d)
|
|
47
|
+
)).downloadFile(S(e.needName, e.fileName));
|
|
37
48
|
};
|
|
38
|
-
return (o,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
return (o, D) => (l(), B(s(x), z(e, {
|
|
50
|
+
type: e.type,
|
|
51
|
+
size: e.size,
|
|
52
|
+
disabled: n.value,
|
|
53
|
+
onClick: _
|
|
54
|
+
}), {
|
|
55
|
+
default: k(() => [
|
|
56
|
+
a("div", {
|
|
57
|
+
class: w(s(y))
|
|
58
|
+
}, [
|
|
59
|
+
s(p).icon ? (l(), N("span", U, [
|
|
60
|
+
O(o.$slots, "icon")
|
|
61
|
+
])) : v("", !0),
|
|
62
|
+
a("span", j, F(o.text), 1)
|
|
63
|
+
], 2)
|
|
64
|
+
]),
|
|
65
|
+
_: 3
|
|
66
|
+
}, 16, ["type", "size", "disabled"]));
|
|
52
67
|
}
|
|
53
68
|
});
|
|
54
69
|
export {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { accessCreate } from '@aplus-frontend/oss';
|
|
2
|
+
import { ButtonProps } from 'ant-design-vue/es/Button';
|
|
2
3
|
/**
|
|
3
4
|
* 类型转换为单例和数组
|
|
4
5
|
*/
|
|
5
6
|
type TypeToSingleAndArray<Type = any> = Type extends any ? Type | Type[] : never;
|
|
6
|
-
export
|
|
7
|
+
export type ApDownLoadProps<FileNameType extends Record<string, string> = Record<string, string>> = ButtonProps & {
|
|
7
8
|
/**
|
|
8
9
|
* 标签内容
|
|
9
10
|
*/
|
|
@@ -12,15 +13,6 @@ export interface ApDownLoadProps<FileNameType extends Record<string, string> = R
|
|
|
12
13
|
* 标签颜色
|
|
13
14
|
*/
|
|
14
15
|
color?: string;
|
|
15
|
-
/**
|
|
16
|
-
* 标签大小
|
|
17
|
-
*/
|
|
18
|
-
size?: 'small' | 'middle' | 'large';
|
|
19
|
-
/**
|
|
20
|
-
* 是否禁用
|
|
21
|
-
* @default false
|
|
22
|
-
*/
|
|
23
|
-
disabled?: boolean;
|
|
24
16
|
fileName: TypeToSingleAndArray<string | FileNameType>;
|
|
25
17
|
/**
|
|
26
18
|
* 是否需要fileName别名
|
|
@@ -30,7 +22,7 @@ export interface ApDownLoadProps<FileNameType extends Record<string, string> = R
|
|
|
30
22
|
*/
|
|
31
23
|
needName?: ApDownLoadNeedNameModel;
|
|
32
24
|
getOssAccess?: () => Promise<accessCreate>;
|
|
33
|
-
}
|
|
25
|
+
};
|
|
34
26
|
/**
|
|
35
27
|
* 别名配置项
|
|
36
28
|
*/
|