@aplus-frontend/ui 0.0.36 → 0.0.38
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 +16 -14
- package/es/src/ap-descriptions/ap-descriptions.vue.d.ts +27 -0
- package/es/src/ap-descriptions/ap-descriptions.vue.mjs +97 -0
- package/es/src/ap-descriptions/ap-descriptions.vue2.mjs +5 -0
- package/es/src/ap-descriptions/formatter/index.d.ts +78 -0
- package/es/src/ap-descriptions/formatter/index.mjs +127 -0
- package/es/src/ap-descriptions/formatter/utils.d.ts +7 -0
- package/es/src/ap-descriptions/formatter/utils.mjs +6 -0
- package/es/src/ap-descriptions/help-message/index.vue.d.ts +23 -0
- package/es/src/ap-descriptions/help-message/index.vue.mjs +4 -0
- package/es/src/ap-descriptions/help-message/index.vue2.mjs +27 -0
- package/es/src/ap-descriptions/helper.d.ts +10 -0
- package/es/src/ap-descriptions/helper.mjs +24 -0
- package/es/src/ap-descriptions/index.d.ts +4 -0
- package/es/src/ap-descriptions/index.mjs +2 -0
- package/es/src/ap-descriptions/interface.d.ts +50 -0
- package/es/src/ap-descriptions/interface.mjs +1 -0
- package/es/src/ap-descriptions/style/ap-descriptions.css +57 -0
- package/es/src/ap-download/ap-download.vue.mjs +27 -30
- package/es/src/ap-download/hooks/index.d.ts +1 -6
- package/es/src/ap-download/hooks/index.mjs +12 -12
- package/es/src/ap-download/interface.d.ts +3 -13
- package/es/src/ap-download/style/ap-download.css +12 -12
- package/es/src/ap-field/interface.d.ts +3 -3
- package/es/src/business/ap-label/ApLabel.vue.d.ts +13 -2
- package/es/src/business/ap-label/ApLabel.vue2.mjs +43 -25
- package/es/src/business/ap-label/interface.d.ts +6 -3
- package/es/src/business/ap-label/style.css +2 -1
- package/es/src/business/index.d.ts +53 -9
- 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 +14 -1
- package/es/src/config-provider/config-provider.mjs +17 -16
- package/es/src/config-provider/constants.d.ts +3 -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/index.d.ts +1 -0
- package/es/src/index.mjs +241 -238
- package/es/src/theme/ap-descriptions/ap-descriptions.css +57 -0
- package/es/src/theme/ap-download/ap-download.css +12 -12
- package/es/src/theme/ap-label/ap-label.css +2 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-descriptions/ap-descriptions.vue.d.ts +27 -0
- package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -0
- package/lib/src/ap-descriptions/ap-descriptions.vue2.js +1 -0
- package/lib/src/ap-descriptions/formatter/index.d.ts +78 -0
- package/lib/src/ap-descriptions/formatter/index.js +1 -0
- package/lib/src/ap-descriptions/formatter/utils.d.ts +7 -0
- package/lib/src/ap-descriptions/formatter/utils.js +1 -0
- package/lib/src/ap-descriptions/help-message/index.vue.d.ts +23 -0
- package/lib/src/ap-descriptions/help-message/index.vue.js +1 -0
- package/lib/src/ap-descriptions/help-message/index.vue2.js +1 -0
- package/lib/src/ap-descriptions/helper.d.ts +10 -0
- package/lib/src/ap-descriptions/helper.js +1 -0
- package/lib/src/ap-descriptions/index.d.ts +4 -0
- package/lib/src/ap-descriptions/index.js +1 -0
- package/lib/src/ap-descriptions/interface.d.ts +50 -0
- package/lib/src/ap-descriptions/interface.js +1 -0
- package/lib/src/ap-descriptions/style/ap-descriptions.css +57 -0
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-download/hooks/index.d.ts +1 -6
- package/lib/src/ap-download/hooks/index.js +1 -1
- package/lib/src/ap-download/interface.d.ts +3 -13
- package/lib/src/ap-download/style/ap-download.css +12 -12
- package/lib/src/ap-field/interface.d.ts +3 -3
- package/lib/src/business/ap-label/ApLabel.vue.d.ts +13 -2
- package/lib/src/business/ap-label/ApLabel.vue2.js +1 -1
- package/lib/src/business/ap-label/interface.d.ts +6 -3
- package/lib/src/business/ap-label/style.css +2 -1
- package/lib/src/business/index.d.ts +53 -9
- 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 +14 -1
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/constants.d.ts +3 -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/index.d.ts +1 -0
- package/lib/src/index.js +1 -1
- package/lib/src/theme/ap-descriptions/ap-descriptions.css +57 -0
- package/lib/src/theme/ap-download/ap-download.css +12 -12
- package/lib/src/theme/ap-label/ap-label.css +2 -1
- package/package.json +5 -5
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
TODO:
|
|
3
|
+
1.admin和aplus样式提成变量?
|
|
4
|
+
*/
|
|
5
|
+
.aplus-ap-descriptions {
|
|
6
|
+
--ap-descriptions-item-padding-bottom: 24px;
|
|
7
|
+
--ap-descriptions-item-label-width: auto;
|
|
8
|
+
}
|
|
9
|
+
.aplus-ap-descriptions .ant-descriptions .ant-descriptions-view table {
|
|
10
|
+
table-layout: fixed;
|
|
11
|
+
}
|
|
12
|
+
.aplus-ap-descriptions .ant-descriptions td.ant-descriptions-item {
|
|
13
|
+
padding-bottom: var(--ap-descriptions-item-padding-bottom);
|
|
14
|
+
}
|
|
15
|
+
.aplus-ap-descriptions .ant-descriptions th.ant-descriptions-item {
|
|
16
|
+
padding-bottom: 8px;
|
|
17
|
+
}
|
|
18
|
+
.aplus-ap-descriptions .ant-descriptions .ant-descriptions-row:last-child .ant-descriptions-item {
|
|
19
|
+
padding-bottom: 0;
|
|
20
|
+
}
|
|
21
|
+
.aplus-ap-descriptions .ant-descriptions .ant-descriptions-item-label::after {
|
|
22
|
+
margin-inline: 4px 20px;
|
|
23
|
+
}
|
|
24
|
+
.aplus-ap-descriptions--admin .ant-descriptions-row .ant-descriptions-item-label {
|
|
25
|
+
justify-content: flex-end;
|
|
26
|
+
width: var(--ap-descriptions-item-label-width);
|
|
27
|
+
color: #999999;
|
|
28
|
+
}
|
|
29
|
+
.aplus-ap-descriptions--admin .ant-descriptions-row .ant-descriptions-item-label .ap-descriptions-item-content__help {
|
|
30
|
+
margin-left: 4px;
|
|
31
|
+
color: #34b77c;
|
|
32
|
+
font-size: 16px;
|
|
33
|
+
}
|
|
34
|
+
.aplus-ap-descriptions--admin .ant-descriptions-row .ant-descriptions-item-content {
|
|
35
|
+
color: #333333;
|
|
36
|
+
}
|
|
37
|
+
.aplus-ap-descriptions--admin .ant-descriptions-row .ant-descriptions-item-content .ap-descriptions-item-content__link {
|
|
38
|
+
color: #1890ff;
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
}
|
|
41
|
+
.aplus-ap-descriptions--aplus .ant-descriptions-row .ant-descriptions-item-label {
|
|
42
|
+
justify-content: flex-end;
|
|
43
|
+
width: var(--ap-descriptions-item-label-width);
|
|
44
|
+
color: #8896B0;
|
|
45
|
+
}
|
|
46
|
+
.aplus-ap-descriptions--aplus .ant-descriptions-row .ant-descriptions-item-label .ap-descriptions-item-content__help {
|
|
47
|
+
margin-left: 4px;
|
|
48
|
+
color: #0070FF;
|
|
49
|
+
font-size: 16px;
|
|
50
|
+
}
|
|
51
|
+
.aplus-ap-descriptions--aplus .ant-descriptions-row .ant-descriptions-item-content {
|
|
52
|
+
color: #182948;
|
|
53
|
+
}
|
|
54
|
+
.aplus-ap-descriptions--aplus .ant-descriptions-row .ant-descriptions-item-content .ap-descriptions-item-content__link {
|
|
55
|
+
color: #0070FF;
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as y, computed as n, unref as z, openBlock as v, createElementBlock as I, normalizeStyle as N, normalizeClass as i, createElementVNode as s, renderSlot as B, toDisplayString as O } from "vue";
|
|
2
2
|
import "../config-provider/index.mjs";
|
|
3
|
-
import { useOssInit as
|
|
3
|
+
import { useOssInit as k } from "./hooks/index.mjs";
|
|
4
4
|
import "./style/ap-download.css";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
5
|
+
import { useLocale as A } from "../config-provider/hooks/use-locale.mjs";
|
|
6
|
+
import { useGlobalConfig as F } from "../config-provider/hooks/use-global-config.mjs";
|
|
7
|
+
import { useNamespace as M } from "../config-provider/hooks/use-namespace.mjs";
|
|
8
|
+
const W = { class: "icon" }, D = { class: "text" }, j = /* @__PURE__ */ y({
|
|
8
9
|
name: "ApDownload",
|
|
9
10
|
__name: "ap-download",
|
|
10
11
|
props: {
|
|
@@ -16,41 +17,37 @@ const F = { class: "icon" }, W = { class: "text" }, q = /* @__PURE__ */ _({
|
|
|
16
17
|
getOssAccess: {}
|
|
17
18
|
},
|
|
18
19
|
setup(l) {
|
|
19
|
-
const t = l,
|
|
20
|
-
function
|
|
20
|
+
const { lang: p } = A(), c = n(() => p.value === "zh-cn" ? "zh_CN" : "en_US"), t = l, d = F("uiMode"), { b: r, bm: a } = M("ap-download");
|
|
21
|
+
function u(e, o) {
|
|
21
22
|
e.length === 4 && (e = `#${e[1]}${e[1]}${e[2]}${e[2]}${e[3]}${e[3]}`);
|
|
22
|
-
const
|
|
23
|
-
return `#${
|
|
23
|
+
const S = parseInt(e.slice(1, 3), 16), $ = parseInt(e.slice(3, 5), 16), _ = parseInt(e.slice(5, 7), 16), b = Math.round(o * 255).toString(16).padStart(2, "0");
|
|
24
|
+
return `#${S.toString(16).padStart(2, "0")}${$.toString(16).padStart(2, "0")}${_.toString(16).padStart(2, "0")}${b}`;
|
|
24
25
|
}
|
|
25
|
-
const
|
|
26
|
+
const m = n(() => ({
|
|
26
27
|
"--download-main-color": t.color,
|
|
27
|
-
"--download-main-color-opacity":
|
|
28
|
-
})),
|
|
29
|
-
const e = [
|
|
30
|
-
return t.disabled && (
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
t.disabled || M(t.getOssAccess);
|
|
34
|
-
});
|
|
35
|
-
const { client: f } = N(), g = () => {
|
|
36
|
-
t.disabled || f.downloadFile(t.fileName);
|
|
28
|
+
"--download-main-color-opacity": u(t.color, 0.6)
|
|
29
|
+
})), f = n(() => [r("wrapper"), a("wrapper", t.size)].filter(Boolean)), g = n(() => {
|
|
30
|
+
const e = [r("inner-wrapper"), a("inner-wrapper", t.size)];
|
|
31
|
+
return t.disabled && (d.value === "aplus" ? e.push(a("inner-wrapper", "disabled")) : e.push(a("inner-wrapper", "disabled-admin"))), e;
|
|
32
|
+
}), w = async () => {
|
|
33
|
+
t.disabled || await (await k(t.getOssAccess, z(c))).downloadFile(t.fileName);
|
|
37
34
|
};
|
|
38
|
-
return (e,
|
|
39
|
-
style:
|
|
40
|
-
class: i(
|
|
41
|
-
onClick:
|
|
35
|
+
return (e, o) => (v(), I("span", {
|
|
36
|
+
style: N(m.value),
|
|
37
|
+
class: i(f.value),
|
|
38
|
+
onClick: w
|
|
42
39
|
}, [
|
|
43
|
-
|
|
44
|
-
class: i(
|
|
40
|
+
s("span", {
|
|
41
|
+
class: i(g.value)
|
|
45
42
|
}, [
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
s("span", W, [
|
|
44
|
+
B(e.$slots, "icon")
|
|
48
45
|
]),
|
|
49
|
-
|
|
46
|
+
s("span", D, O(e.text), 1)
|
|
50
47
|
], 2)
|
|
51
48
|
], 6));
|
|
52
49
|
}
|
|
53
50
|
});
|
|
54
51
|
export {
|
|
55
|
-
|
|
52
|
+
j as default
|
|
56
53
|
};
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { Oss } from '@aplus-frontend/oss';
|
|
2
2
|
|
|
3
3
|
export type { Oss } from '@aplus-frontend/oss';
|
|
4
|
-
export declare function
|
|
5
|
-
client: Oss;
|
|
6
|
-
};
|
|
7
|
-
export declare function useOssInit(getOssAccess: any): Promise<{
|
|
8
|
-
client: Oss;
|
|
9
|
-
}>;
|
|
4
|
+
export declare function useOssInit(getOssAccess: any, Locale: 'zh_CN' | 'en_US'): Promise<Oss | null>;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { client as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
async function e(n) {
|
|
6
|
-
if (!n)
|
|
1
|
+
import { client as i } from "@aplus-frontend/oss";
|
|
2
|
+
const n = /* @__PURE__ */ new Map(), t = Symbol("ossInstance");
|
|
3
|
+
async function r(o, a) {
|
|
4
|
+
if (!o)
|
|
7
5
|
throw new Error("请传入getOssAccess");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
if (n.has(t))
|
|
7
|
+
return n.get(t);
|
|
8
|
+
const e = await i.initOssClient({
|
|
9
|
+
locale: a,
|
|
10
|
+
getOssAccess: o,
|
|
11
11
|
onFailure: (s) => {
|
|
12
12
|
throw new Error(
|
|
13
13
|
typeof (s == null ? void 0 : s.message) == "string" ? s.message : "获取oss临时权限失败"
|
|
14
14
|
);
|
|
15
15
|
}
|
|
16
|
-
})
|
|
16
|
+
});
|
|
17
|
+
return n.set(t, e), e;
|
|
17
18
|
}
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
-
e as useOssInit
|
|
20
|
+
r as useOssInit
|
|
21
21
|
};
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
regionId: string;
|
|
4
|
-
endpoint: string;
|
|
5
|
-
accessKeyId: string;
|
|
6
|
-
accessKeySecret: string;
|
|
7
|
-
expiration: number;
|
|
8
|
-
extInformation: string;
|
|
9
|
-
fileProvideType: string;
|
|
10
|
-
callbackUrl: string;
|
|
11
|
-
}
|
|
1
|
+
import { accessCreate } from '@aplus-frontend/oss';
|
|
2
|
+
|
|
12
3
|
export interface ApDownLoadProps {
|
|
13
4
|
/**
|
|
14
5
|
* 标签内容
|
|
@@ -28,6 +19,5 @@ export interface ApDownLoadProps {
|
|
|
28
19
|
*/
|
|
29
20
|
disabled?: boolean;
|
|
30
21
|
fileName: string;
|
|
31
|
-
getOssAccess: () => Promise<
|
|
22
|
+
getOssAccess: () => Promise<accessCreate>;
|
|
32
23
|
}
|
|
33
|
-
export {};
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
.aplus-download-wrapper {
|
|
1
|
+
.aplus-ap-download-wrapper {
|
|
2
2
|
text-wrap: nowrap;
|
|
3
3
|
display: inline-block;
|
|
4
4
|
display: flex;
|
|
5
5
|
}
|
|
6
|
-
.aplus-download-inner-wrapper {
|
|
6
|
+
.aplus-ap-download-inner-wrapper {
|
|
7
7
|
display: inline-block;
|
|
8
8
|
color: var(--download-main-color);
|
|
9
9
|
cursor: pointer;
|
|
10
10
|
display: flex;
|
|
11
11
|
align-items: center;
|
|
12
12
|
}
|
|
13
|
-
.aplus-download-inner-wrapper .icon {
|
|
13
|
+
.aplus-ap-download-inner-wrapper .icon {
|
|
14
14
|
position: relative;
|
|
15
15
|
font-size: 18px;
|
|
16
16
|
}
|
|
17
|
-
.aplus-download-inner-wrapper .text {
|
|
17
|
+
.aplus-ap-download-inner-wrapper .text {
|
|
18
18
|
margin-left: 5px;
|
|
19
19
|
}
|
|
20
|
-
.aplus-download-inner-wrapper:hover {
|
|
20
|
+
.aplus-ap-download-inner-wrapper:hover {
|
|
21
21
|
color: var(--download-main-color-opacity);
|
|
22
22
|
}
|
|
23
|
-
.aplus-download-inner-wrapper--large {
|
|
23
|
+
.aplus-ap-download-inner-wrapper--large {
|
|
24
24
|
line-height: 26px;
|
|
25
25
|
height: 28px;
|
|
26
26
|
font-size: 16px;
|
|
27
27
|
}
|
|
28
|
-
.aplus-download-inner-wrapper--middle {
|
|
28
|
+
.aplus-ap-download-inner-wrapper--middle {
|
|
29
29
|
line-height: 22px;
|
|
30
30
|
height: 24px;
|
|
31
31
|
font-size: 14px;
|
|
32
32
|
}
|
|
33
|
-
.aplus-download-inner-wrapper--small {
|
|
33
|
+
.aplus-ap-download-inner-wrapper--small {
|
|
34
34
|
line-height: 19px;
|
|
35
35
|
height: 20px;
|
|
36
36
|
font-size: 12px;
|
|
37
37
|
}
|
|
38
|
-
.aplus-download-inner-wrapper--disabled {
|
|
38
|
+
.aplus-ap-download-inner-wrapper--disabled {
|
|
39
39
|
color: #8896b0;
|
|
40
40
|
cursor: not-allowed;
|
|
41
41
|
}
|
|
42
|
-
.aplus-download-inner-wrapper--disabled:hover {
|
|
42
|
+
.aplus-ap-download-inner-wrapper--disabled:hover {
|
|
43
43
|
color: #8896b0;
|
|
44
44
|
}
|
|
45
|
-
.aplus-download-inner-wrapper--disabled-admin {
|
|
45
|
+
.aplus-ap-download-inner-wrapper--disabled-admin {
|
|
46
46
|
cursor: not-allowed;
|
|
47
47
|
color: #999;
|
|
48
48
|
}
|
|
49
|
-
.aplus-download-inner-wrapper--disabled-admin:hover {
|
|
49
|
+
.aplus-ap-download-inner-wrapper--disabled-admin:hover {
|
|
50
50
|
color: #999;
|
|
51
51
|
}
|
|
@@ -105,7 +105,7 @@ export type ApFieldSelectProps = BasicApFieldProps<Omit<SelectProps, 'mode' | 'v
|
|
|
105
105
|
*/
|
|
106
106
|
searchMode?: 'filter' | 'request';
|
|
107
107
|
};
|
|
108
|
-
export type
|
|
108
|
+
export type ApFieldSelectExpose = {
|
|
109
109
|
focus: () => void;
|
|
110
110
|
blur: () => void;
|
|
111
111
|
request: (clear?: boolean) => Promise<void>;
|
|
@@ -114,7 +114,7 @@ export type ApFieldSliderProps = BasicApFieldProps<SliderProps> & {
|
|
|
114
114
|
emptyText?: string;
|
|
115
115
|
defaultValue?: number | [number, number];
|
|
116
116
|
};
|
|
117
|
-
export type
|
|
117
|
+
export type ApFieldSliderExpose = {
|
|
118
118
|
focus: () => void;
|
|
119
119
|
blur: () => void;
|
|
120
120
|
};
|
|
@@ -126,7 +126,7 @@ export type ApFieldSegmentedProps = BasicApFieldProps<SegmentedProps> & {
|
|
|
126
126
|
export type ApFieldRateProps = BasicApFieldProps<RateProps> & {
|
|
127
127
|
defaultValue?: number;
|
|
128
128
|
};
|
|
129
|
-
export type
|
|
129
|
+
export type ApFieldRateExpose = {
|
|
130
130
|
focus: () => void;
|
|
131
131
|
blur: () => void;
|
|
132
132
|
};
|
|
@@ -2,22 +2,28 @@ import { ApLabelProps } from './interface';
|
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
3
|
import { TooltipPlacement } from 'ant-design-vue/es/tooltip';
|
|
4
4
|
|
|
5
|
-
declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApLabelProps>, {
|
|
5
|
+
declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApLabelProps>, {
|
|
6
6
|
status: string;
|
|
7
7
|
placement: string;
|
|
8
8
|
iconColor: string;
|
|
9
|
+
iconType: string;
|
|
10
|
+
iconSize: number;
|
|
9
11
|
text: string;
|
|
10
12
|
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApLabelProps>, {
|
|
11
13
|
status: string;
|
|
12
14
|
placement: string;
|
|
13
15
|
iconColor: string;
|
|
16
|
+
iconType: string;
|
|
17
|
+
iconSize: number;
|
|
14
18
|
text: string;
|
|
15
19
|
}>>>, {
|
|
16
20
|
text: any;
|
|
17
21
|
placement: TooltipPlacement;
|
|
22
|
+
iconType: "ellipsis" | "warning" | "question";
|
|
18
23
|
status: "success" | "error" | "default" | "warning" | "processing";
|
|
24
|
+
iconSize: number;
|
|
19
25
|
iconColor: string;
|
|
20
|
-
}, {}
|
|
26
|
+
}, {}>, Partial<Record<string, (_: {}) => any>>>;
|
|
21
27
|
export default _default;
|
|
22
28
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
23
29
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -36,3 +42,8 @@ type __VLS_WithDefaults<P, D> = {
|
|
|
36
42
|
type __VLS_Prettify<T> = {
|
|
37
43
|
[K in keyof T]: T[K];
|
|
38
44
|
} & {};
|
|
45
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
46
|
+
new (): {
|
|
47
|
+
$slots: S;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Badge as
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent as m, computed as u, openBlock as o, createElementBlock as s, normalizeClass as f, unref as t, createVNode as d, normalizeProps as y, guardReactiveProps as A, renderSlot as C, Fragment as g, createBlock as l, withCtx as k, normalizeStyle as r, createCommentVNode as n } from "vue";
|
|
2
|
+
import { Badge as x, Tooltip as b } from "ant-design-vue";
|
|
3
|
+
import { IconApAdLineAnnotation as h, IconApAdFillWarn as z, IconApAdFillExecution as N } from "@aplus-frontend/icon";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
|
-
import { omit as
|
|
5
|
+
import { omit as v } from "lodash-unified";
|
|
6
6
|
import "./style.css";
|
|
7
|
-
import { useNamespace as
|
|
8
|
-
const
|
|
7
|
+
import { useNamespace as B } from "../../config-provider/hooks/use-namespace.mjs";
|
|
8
|
+
const P = /* @__PURE__ */ m({
|
|
9
9
|
name: "ApLabel",
|
|
10
10
|
__name: "ApLabel",
|
|
11
11
|
props: {
|
|
@@ -24,29 +24,47 @@ const F = /* @__PURE__ */ n({
|
|
|
24
24
|
title: {},
|
|
25
25
|
helpMessage: {},
|
|
26
26
|
placement: { default: "top" },
|
|
27
|
-
iconColor: { default: "#FF4D4F" }
|
|
27
|
+
iconColor: { default: "#FF4D4F" },
|
|
28
|
+
iconType: { default: "question" },
|
|
29
|
+
iconSize: { default: 16 },
|
|
30
|
+
slotName: {}
|
|
28
31
|
},
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
setup(p) {
|
|
33
|
+
const a = u(() => ({
|
|
34
|
+
color: e.iconColor,
|
|
35
|
+
"font-size": e.iconSize + "px",
|
|
36
|
+
"margin-left": "6px"
|
|
37
|
+
})), e = p, { b: i } = B("ap-label");
|
|
38
|
+
return (c, F) => (o(), s("div", {
|
|
39
|
+
class: f([t(i)()])
|
|
33
40
|
}, [
|
|
34
|
-
|
|
35
|
-
e.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
d(t(x), y(A(t(v)(e, ["helpMessage", "placement", "iconColor"]))), null, 16),
|
|
42
|
+
e.slotName ? C(c.$slots, e.slotName, { key: 0 }) : (o(), s(g, { key: 1 }, [
|
|
43
|
+
e.helpMessage ? (o(), l(t(b), {
|
|
44
|
+
key: 0,
|
|
45
|
+
placement: e.placement,
|
|
46
|
+
title: e.helpMessage
|
|
47
|
+
}, {
|
|
48
|
+
default: k(() => [
|
|
49
|
+
e.iconType === "question" ? (o(), l(t(h), {
|
|
50
|
+
key: 0,
|
|
51
|
+
style: r(a.value)
|
|
52
|
+
}, null, 8, ["style"])) : n("", !0),
|
|
53
|
+
e.iconType === "warning" ? (o(), l(t(z), {
|
|
54
|
+
key: 1,
|
|
55
|
+
style: r(a.value)
|
|
56
|
+
}, null, 8, ["style"])) : n("", !0),
|
|
57
|
+
e.iconType === "ellipsis" ? (o(), l(t(N), {
|
|
58
|
+
key: 2,
|
|
59
|
+
style: r(a.value)
|
|
60
|
+
}, null, 8, ["style"])) : n("", !0)
|
|
61
|
+
]),
|
|
62
|
+
_: 1
|
|
63
|
+
}, 8, ["placement", "title"])) : n("", !0)
|
|
64
|
+
], 64))
|
|
47
65
|
], 2));
|
|
48
66
|
}
|
|
49
67
|
});
|
|
50
68
|
export {
|
|
51
|
-
|
|
69
|
+
P as default
|
|
52
70
|
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { BadgeProps } from 'ant-design-vue';
|
|
2
2
|
import { TooltipPlacement } from 'ant-design-vue/es/Tooltip';
|
|
3
3
|
|
|
4
|
-
export type ApLabelProps = BadgeProps & {
|
|
5
|
-
helpMessage
|
|
4
|
+
export type ApLabelProps = BadgeProps & Partial<{
|
|
5
|
+
helpMessage: string;
|
|
6
6
|
placement: TooltipPlacement;
|
|
7
7
|
iconColor: string;
|
|
8
|
-
|
|
8
|
+
iconType: 'question' | 'warning' | 'ellipsis';
|
|
9
|
+
iconSize: number;
|
|
10
|
+
slotName: string;
|
|
11
|
+
}>;
|
|
@@ -356,12 +356,15 @@ export declare const ApLabel: {
|
|
|
356
356
|
};
|
|
357
357
|
placement: {
|
|
358
358
|
type: PropType<TooltipPlacement>;
|
|
359
|
-
required: true;
|
|
360
359
|
default: string;
|
|
361
360
|
};
|
|
362
361
|
title: {
|
|
363
362
|
type: PropType<string>;
|
|
364
363
|
};
|
|
364
|
+
iconType: {
|
|
365
|
+
type: PropType<"ellipsis" | "warning" | "question">;
|
|
366
|
+
default: string;
|
|
367
|
+
};
|
|
365
368
|
size: {
|
|
366
369
|
type: PropType<"default" | "small">;
|
|
367
370
|
};
|
|
@@ -390,14 +393,20 @@ export declare const ApLabel: {
|
|
|
390
393
|
numberStyle: {
|
|
391
394
|
type: PropType<CSSProperties>;
|
|
392
395
|
};
|
|
396
|
+
iconSize: {
|
|
397
|
+
type: PropType<number>;
|
|
398
|
+
default: number;
|
|
399
|
+
};
|
|
393
400
|
helpMessage: {
|
|
394
401
|
type: PropType<string>;
|
|
395
402
|
};
|
|
396
403
|
iconColor: {
|
|
397
404
|
type: PropType<string>;
|
|
398
|
-
required: true;
|
|
399
405
|
default: string;
|
|
400
406
|
};
|
|
407
|
+
slotName: {
|
|
408
|
+
type: PropType<string>;
|
|
409
|
+
};
|
|
401
410
|
}>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{
|
|
402
411
|
text: {
|
|
403
412
|
type: PropType<any>;
|
|
@@ -411,12 +420,15 @@ export declare const ApLabel: {
|
|
|
411
420
|
};
|
|
412
421
|
placement: {
|
|
413
422
|
type: PropType<TooltipPlacement>;
|
|
414
|
-
required: true;
|
|
415
423
|
default: string;
|
|
416
424
|
};
|
|
417
425
|
title: {
|
|
418
426
|
type: PropType<string>;
|
|
419
427
|
};
|
|
428
|
+
iconType: {
|
|
429
|
+
type: PropType<"ellipsis" | "warning" | "question">;
|
|
430
|
+
default: string;
|
|
431
|
+
};
|
|
420
432
|
size: {
|
|
421
433
|
type: PropType<"default" | "small">;
|
|
422
434
|
};
|
|
@@ -445,18 +457,26 @@ export declare const ApLabel: {
|
|
|
445
457
|
numberStyle: {
|
|
446
458
|
type: PropType<CSSProperties>;
|
|
447
459
|
};
|
|
460
|
+
iconSize: {
|
|
461
|
+
type: PropType<number>;
|
|
462
|
+
default: number;
|
|
463
|
+
};
|
|
448
464
|
helpMessage: {
|
|
449
465
|
type: PropType<string>;
|
|
450
466
|
};
|
|
451
467
|
iconColor: {
|
|
452
468
|
type: PropType<string>;
|
|
453
|
-
required: true;
|
|
454
469
|
default: string;
|
|
455
470
|
};
|
|
471
|
+
slotName: {
|
|
472
|
+
type: PropType<string>;
|
|
473
|
+
};
|
|
456
474
|
}>>, {
|
|
457
475
|
text: any;
|
|
458
476
|
placement: TooltipPlacement;
|
|
477
|
+
iconType: "ellipsis" | "warning" | "question";
|
|
459
478
|
status: "success" | "error" | "default" | "warning" | "processing";
|
|
479
|
+
iconSize: number;
|
|
460
480
|
iconColor: string;
|
|
461
481
|
}, true, {}, {}, {
|
|
462
482
|
P: {};
|
|
@@ -478,12 +498,15 @@ export declare const ApLabel: {
|
|
|
478
498
|
};
|
|
479
499
|
placement: {
|
|
480
500
|
type: PropType<TooltipPlacement>;
|
|
481
|
-
required: true;
|
|
482
501
|
default: string;
|
|
483
502
|
};
|
|
484
503
|
title: {
|
|
485
504
|
type: PropType<string>;
|
|
486
505
|
};
|
|
506
|
+
iconType: {
|
|
507
|
+
type: PropType<"ellipsis" | "warning" | "question">;
|
|
508
|
+
default: string;
|
|
509
|
+
};
|
|
487
510
|
size: {
|
|
488
511
|
type: PropType<"default" | "small">;
|
|
489
512
|
};
|
|
@@ -512,18 +535,26 @@ export declare const ApLabel: {
|
|
|
512
535
|
numberStyle: {
|
|
513
536
|
type: PropType<CSSProperties>;
|
|
514
537
|
};
|
|
538
|
+
iconSize: {
|
|
539
|
+
type: PropType<number>;
|
|
540
|
+
default: number;
|
|
541
|
+
};
|
|
515
542
|
helpMessage: {
|
|
516
543
|
type: PropType<string>;
|
|
517
544
|
};
|
|
518
545
|
iconColor: {
|
|
519
546
|
type: PropType<string>;
|
|
520
|
-
required: true;
|
|
521
547
|
default: string;
|
|
522
548
|
};
|
|
549
|
+
slotName: {
|
|
550
|
+
type: PropType<string>;
|
|
551
|
+
};
|
|
523
552
|
}>>, {}, {}, {}, {}, {
|
|
524
553
|
text: any;
|
|
525
554
|
placement: TooltipPlacement;
|
|
555
|
+
iconType: "ellipsis" | "warning" | "question";
|
|
526
556
|
status: "success" | "error" | "default" | "warning" | "processing";
|
|
557
|
+
iconSize: number;
|
|
527
558
|
iconColor: string;
|
|
528
559
|
}>;
|
|
529
560
|
__isFragment?: undefined;
|
|
@@ -542,12 +573,15 @@ export declare const ApLabel: {
|
|
|
542
573
|
};
|
|
543
574
|
placement: {
|
|
544
575
|
type: PropType<TooltipPlacement>;
|
|
545
|
-
required: true;
|
|
546
576
|
default: string;
|
|
547
577
|
};
|
|
548
578
|
title: {
|
|
549
579
|
type: PropType<string>;
|
|
550
580
|
};
|
|
581
|
+
iconType: {
|
|
582
|
+
type: PropType<"ellipsis" | "warning" | "question">;
|
|
583
|
+
default: string;
|
|
584
|
+
};
|
|
551
585
|
size: {
|
|
552
586
|
type: PropType<"default" | "small">;
|
|
553
587
|
};
|
|
@@ -576,20 +610,30 @@ export declare const ApLabel: {
|
|
|
576
610
|
numberStyle: {
|
|
577
611
|
type: PropType<CSSProperties>;
|
|
578
612
|
};
|
|
613
|
+
iconSize: {
|
|
614
|
+
type: PropType<number>;
|
|
615
|
+
default: number;
|
|
616
|
+
};
|
|
579
617
|
helpMessage: {
|
|
580
618
|
type: PropType<string>;
|
|
581
619
|
};
|
|
582
620
|
iconColor: {
|
|
583
621
|
type: PropType<string>;
|
|
584
|
-
required: true;
|
|
585
622
|
default: string;
|
|
586
623
|
};
|
|
624
|
+
slotName: {
|
|
625
|
+
type: PropType<string>;
|
|
626
|
+
};
|
|
587
627
|
}>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
588
628
|
text: any;
|
|
589
629
|
placement: TooltipPlacement;
|
|
630
|
+
iconType: "ellipsis" | "warning" | "question";
|
|
590
631
|
status: "success" | "error" | "default" | "warning" | "processing";
|
|
632
|
+
iconSize: number;
|
|
591
633
|
iconColor: string;
|
|
592
|
-
}, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps &
|
|
634
|
+
}, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
635
|
+
$slots: Partial<Record<string, (_: {}) => any>>;
|
|
636
|
+
}) & Plugin & (new (...args: any[]) => {
|
|
593
637
|
$props: {
|
|
594
638
|
onClick?: (() => void) | undefined;
|
|
595
639
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
2
|
import { LocaleType } from '../locale/interface';
|
|
3
|
-
import { ApiType, ScrollbarGlobalConfig, TableDefaultConfig, ApUploadConfig } from './constants';
|
|
3
|
+
import { ApiType, ScrollbarGlobalConfig, TableDefaultConfig, ApUploadConfig, ApDescriptionsConfig } from './constants';
|
|
4
4
|
import { default as __DTS_DEFAULT_0__ } from 'ant-design-vue/es/config-provider/renderEmpty';
|
|
5
5
|
import { TransformCellTextProps } from 'ant-design-vue/es/table/interface';
|
|
6
6
|
import { CSPConfig, SizeType, ThemeConfig } from 'ant-design-vue/es/config-provider/context';
|
|
@@ -152,5 +152,9 @@ export declare const configProviderProps: () => {
|
|
|
152
152
|
type: PropType<ApUploadConfig>;
|
|
153
153
|
default: () => {};
|
|
154
154
|
};
|
|
155
|
+
apDescriptions: {
|
|
156
|
+
type: PropType<ApDescriptionsConfig>;
|
|
157
|
+
default: () => {};
|
|
158
|
+
};
|
|
155
159
|
};
|
|
156
160
|
export type ConfigProviderProps = Partial<ExtractPropTypes<ReturnType<typeof configProviderProps>>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { configProviderProps as e } from "ant-design-vue/es/config-provider/context";
|
|
2
|
-
const
|
|
2
|
+
const p = () => ({
|
|
3
3
|
/**
|
|
4
4
|
* @description aplus-ui的locale
|
|
5
5
|
*/
|
|
@@ -29,8 +29,12 @@ const a = () => ({
|
|
|
29
29
|
type: Object,
|
|
30
30
|
default: () => ({})
|
|
31
31
|
},
|
|
32
|
+
apDescriptions: {
|
|
33
|
+
type: Object,
|
|
34
|
+
default: () => ({})
|
|
35
|
+
},
|
|
32
36
|
...e()
|
|
33
37
|
});
|
|
34
38
|
export {
|
|
35
|
-
|
|
39
|
+
p as configProviderProps
|
|
36
40
|
};
|