@aplus-frontend/ui 0.1.23 → 0.1.25
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 +86 -80
- package/es/src/ap-download/ap-download.vue.d.ts +0 -3
- package/es/src/ap-download/ap-download.vue.mjs +10 -10
- package/es/src/ap-field/number/index.vue.mjs +20 -19
- package/es/src/ap-form/ap-form-item.vue.mjs +27 -25
- package/es/src/ap-form/ap-form.vue.d.ts +1 -1
- package/es/src/ap-form/ap-form.vue2.mjs +18 -18
- package/es/src/ap-form/interface.d.ts +2 -2
- package/es/src/ap-form/modal-form/index.vue.d.ts +2 -2
- package/es/src/ap-form/search-form/index.vue.d.ts +2 -2
- package/es/src/ap-form/search-form/index.vue.mjs +1 -0
- package/es/src/ap-layout/ApInfoLayout.vue.d.ts +81 -0
- package/es/src/ap-layout/ApInfoLayout.vue.mjs +41 -0
- package/es/src/ap-layout/ApInfoLayout.vue2.mjs +4 -0
- package/es/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +48 -0
- package/es/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.mjs +4 -0
- package/es/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.mjs +42 -0
- package/es/src/ap-layout/{ap-info-layout → ap-info-layout-aplus}/ap-info-layout.vue.d.ts +3 -3
- package/es/src/ap-layout/ap-info-layout-aplus/ap-info-layout.vue.mjs +4 -0
- package/es/src/ap-layout/index.d.ts +2 -1
- package/es/src/ap-layout/index.mjs +2 -1
- package/es/src/ap-layout/interface.d.ts +8 -2
- package/es/src/ap-layout/interface.mjs +1 -0
- package/es/src/ap-layout/style/ap-info-layout.css +17 -0
- package/es/src/ap-table/utils.mjs +1 -1
- package/es/src/business/ap-attachment/ApAttachment.d.ts +97 -0
- package/es/src/business/ap-attachment/ApAttachment.mjs +82 -0
- package/es/src/business/ap-attachment/constans.d.ts +44 -0
- package/es/src/business/ap-attachment/constans.mjs +42 -0
- package/es/src/business/ap-attachment/index.d.ts +3 -0
- package/es/src/business/ap-attachment/interface.d.ts +13 -0
- package/es/src/business/ap-attachment/style.css +62 -0
- package/es/src/business/ap-input-radio/ApInputRadio.vue.d.ts +2 -0
- package/es/src/business/ap-input-radio/ApInputRadio.vue2.mjs +37 -24
- package/es/src/business/ap-input-radio/interface.d.ts +9 -2
- package/es/src/business/ap-ladder/ApLadder.vue.d.ts +159 -0
- package/es/src/business/ap-ladder/ApLadder.vue.mjs +4 -0
- package/es/src/business/ap-ladder/ApLadder.vue2.mjs +146 -0
- package/es/src/business/ap-ladder/interface.d.ts +92 -0
- package/es/src/business/ap-ladder/style.css +56 -0
- package/es/src/business/hooks/index.d.ts +2 -0
- package/es/src/business/hooks/index.mjs +6 -0
- package/es/src/business/hooks/usePageListApTable.d.ts +46 -0
- package/es/src/business/hooks/usePageListApTable.mjs +68 -0
- package/es/src/business/hooks/useTableRefresh.d.ts +18 -0
- package/es/src/business/hooks/useTableRefresh.mjs +16 -0
- package/es/src/business/index.d.ts +835 -5
- package/es/src/business/index.mjs +34 -28
- package/es/src/components.d.ts +1 -0
- package/es/src/editable-table/form-item.vue.mjs +80 -77
- package/es/src/editable-table/hooks/use-get-columns.mjs +30 -30
- package/es/src/editable-table/interface.d.ts +2 -2
- package/es/src/index.mjs +219 -213
- package/es/src/locale/lang/en.mjs +4 -0
- package/es/src/locale/lang/zh-cn.mjs +4 -0
- package/es/src/theme/antd-global-overwrite/aplus/index.css +8 -0
- package/es/src/theme/antd-global-overwrite/aplus/table.css +8 -0
- package/es/src/theme/ap-attachment/ap-attachment.css +62 -0
- package/es/src/theme/ap-ladder/ap-ladder.css +56 -0
- package/es/src/theme/ap-layout/ap-info-layout.css +17 -0
- package/lib/index.js +1 -1
- package/lib/src/ap-download/ap-download.vue.d.ts +0 -3
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form-item.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue.d.ts +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/interface.d.ts +2 -2
- package/lib/src/ap-form/modal-form/index.vue.d.ts +2 -2
- package/lib/src/ap-form/search-form/index.vue.d.ts +2 -2
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-layout/ApInfoLayout.vue.d.ts +81 -0
- package/lib/src/ap-layout/ApInfoLayout.vue.js +1 -0
- package/lib/src/ap-layout/ApInfoLayout.vue2.js +1 -0
- package/lib/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +48 -0
- package/lib/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.js +1 -0
- package/lib/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.js +1 -0
- package/lib/src/ap-layout/{ap-info-layout → ap-info-layout-aplus}/ap-info-layout.vue.d.ts +3 -3
- package/lib/src/ap-layout/{ap-info-layout/ap-info-layout.vue2.js → ap-info-layout-aplus/ap-info-layout.vue.js} +1 -1
- package/lib/src/ap-layout/index.d.ts +2 -1
- package/lib/src/ap-layout/index.js +1 -1
- package/lib/src/ap-layout/interface.d.ts +8 -2
- package/lib/src/ap-layout/interface.js +1 -0
- package/lib/src/ap-layout/style/ap-info-layout.css +17 -0
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.d.ts +97 -0
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -0
- package/lib/src/business/ap-attachment/constans.d.ts +44 -0
- package/lib/src/business/ap-attachment/constans.js +1 -0
- package/lib/src/business/ap-attachment/index.d.ts +3 -0
- package/lib/src/business/ap-attachment/interface.d.ts +13 -0
- package/lib/src/business/ap-attachment/style.css +62 -0
- package/lib/src/business/ap-input-radio/ApInputRadio.vue.d.ts +2 -0
- package/lib/src/business/ap-input-radio/ApInputRadio.vue2.js +1 -1
- package/lib/src/business/ap-input-radio/interface.d.ts +9 -2
- package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +159 -0
- package/lib/src/business/ap-ladder/ApLadder.vue.js +1 -0
- package/lib/src/business/ap-ladder/ApLadder.vue2.js +1 -0
- package/lib/src/business/ap-ladder/interface.d.ts +92 -0
- package/lib/src/business/ap-ladder/style.css +56 -0
- package/lib/src/business/hooks/index.d.ts +2 -0
- package/lib/src/business/hooks/index.js +1 -0
- package/lib/src/business/hooks/usePageListApTable.d.ts +46 -0
- package/lib/src/business/hooks/usePageListApTable.js +1 -0
- package/lib/src/business/hooks/useTableRefresh.d.ts +18 -0
- package/lib/src/business/hooks/useTableRefresh.js +1 -0
- package/lib/src/business/index.d.ts +835 -5
- package/lib/src/business/index.js +1 -1
- package/lib/src/components.d.ts +1 -0
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
- package/lib/src/editable-table/interface.d.ts +2 -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/antd-global-overwrite/aplus/index.css +8 -0
- package/lib/src/theme/antd-global-overwrite/aplus/table.css +8 -0
- package/lib/src/theme/ap-attachment/ap-attachment.css +62 -0
- package/lib/src/theme/ap-ladder/ap-ladder.css +56 -0
- package/lib/src/theme/ap-layout/ap-info-layout.css +17 -0
- package/package.json +2 -2
- package/es/src/ap-layout/ap-info-layout/ap-info-layout.vue2.mjs +0 -4
- /package/es/src/ap-layout/{ap-info-layout/ap-info-layout.vue.mjs → ap-info-layout-aplus/ap-info-layout.vue2.mjs} +0 -0
- /package/es/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.d.ts +0 -0
- /package/es/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.mjs +0 -0
- /package/es/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue2.mjs +0 -0
- /package/es/src/business/{expandAlert → ap-expand-alert}/interface.d.ts +0 -0
- /package/es/src/business/{expandAlert → ap-expand-alert}/style.css +0 -0
- /package/lib/src/ap-layout/{ap-info-layout/ap-info-layout.vue.js → ap-info-layout-aplus/ap-info-layout.vue2.js} +0 -0
- /package/lib/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.d.ts +0 -0
- /package/lib/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.js +0 -0
- /package/lib/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue2.js +0 -0
- /package/lib/src/business/{expandAlert → ap-expand-alert}/interface.d.ts +0 -0
- /package/lib/src/business/{expandAlert → ap-expand-alert}/style.css +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { ApAttachmentProps as _ApAttachmentProps, AttachmentItemProps } from './interface';
|
|
3
|
+
export declare const ApAttachmentProps: () => {
|
|
4
|
+
attachmentList: {
|
|
5
|
+
type: PropType<Array<AttachmentItemProps>>;
|
|
6
|
+
default: never[];
|
|
7
|
+
required: boolean;
|
|
8
|
+
};
|
|
9
|
+
textToolTipPlacement: {
|
|
10
|
+
type: PropType<_ApAttachmentProps["textToolTipPlacement"]>;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
fileMorePopoverPlacement: {
|
|
14
|
+
type: PropType<_ApAttachmentProps["fileMorePopoverPlacement"]>;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
color: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
};
|
|
20
|
+
size: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
needName: {
|
|
25
|
+
type: PropType<{
|
|
26
|
+
nameKey?: string;
|
|
27
|
+
pathKey?: string;
|
|
28
|
+
}>;
|
|
29
|
+
default: () => {
|
|
30
|
+
nameKey: string;
|
|
31
|
+
pathKey: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
getOssAccess: {
|
|
35
|
+
type: PropType<_ApAttachmentProps["getOssAccess"]>;
|
|
36
|
+
};
|
|
37
|
+
disabled: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
toolTipBgColor: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const e = () => ({
|
|
2
|
+
attachmentList: {
|
|
3
|
+
type: Array,
|
|
4
|
+
default: [],
|
|
5
|
+
required: !0
|
|
6
|
+
},
|
|
7
|
+
textToolTipPlacement: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: "topLeft"
|
|
10
|
+
},
|
|
11
|
+
fileMorePopoverPlacement: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "bottom"
|
|
14
|
+
},
|
|
15
|
+
color: {
|
|
16
|
+
type: String
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "middle"
|
|
21
|
+
},
|
|
22
|
+
needName: {
|
|
23
|
+
type: Object,
|
|
24
|
+
default: () => ({
|
|
25
|
+
nameKey: "fileName",
|
|
26
|
+
pathKey: "filePath"
|
|
27
|
+
})
|
|
28
|
+
},
|
|
29
|
+
getOssAccess: {
|
|
30
|
+
type: Function
|
|
31
|
+
},
|
|
32
|
+
disabled: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: !1
|
|
35
|
+
},
|
|
36
|
+
toolTipBgColor: {
|
|
37
|
+
type: String
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
export {
|
|
41
|
+
e as ApAttachmentProps
|
|
42
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ApDownLoadProps } from '../../ap-download/interface';
|
|
2
|
+
import { TooltipPlacement } from 'ant-design-vue/es/Tooltip';
|
|
3
|
+
export type AttachmentItemProps = {
|
|
4
|
+
fileName: string;
|
|
5
|
+
filePath: string;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
};
|
|
8
|
+
export type ApAttachmentProps = Required<{
|
|
9
|
+
attachmentList: Array<AttachmentItemProps> | [];
|
|
10
|
+
textToolTipPlacement?: TooltipPlacement;
|
|
11
|
+
fileMorePopoverPlacement?: TooltipPlacement;
|
|
12
|
+
toolTipBgColor?: string;
|
|
13
|
+
} & Pick<ApDownLoadProps, 'color' | 'size' | 'needName' | 'disabled'>> & Pick<ApDownLoadProps, 'getOssAccess'>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
.aplus-ap-attachment {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
justify-content: space-between;
|
|
4
|
+
}
|
|
5
|
+
.aplus-ap-attachment__content {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
}
|
|
9
|
+
.aplus-ap-attachment__text-render {
|
|
10
|
+
color: var(--download-main-color);
|
|
11
|
+
margin-right: 5px;
|
|
12
|
+
}
|
|
13
|
+
.aplus-ap-attachment__text-render:hover {
|
|
14
|
+
color: var(--download-main-color-opacity);
|
|
15
|
+
}
|
|
16
|
+
.aplus-ap-attachment__text-inner {
|
|
17
|
+
max-width: 190px;
|
|
18
|
+
display: inline-block;
|
|
19
|
+
white-space: nowrap;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
text-overflow: ellipsis;
|
|
22
|
+
font-size: 14px;
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
color: var(--download-main-color);
|
|
25
|
+
}
|
|
26
|
+
.aplus-ap-attachment__text-inner:hover {
|
|
27
|
+
color: var(--download-main-color-opacity);
|
|
28
|
+
}
|
|
29
|
+
.aplus-ap-attachment__more {
|
|
30
|
+
display: inline-block;
|
|
31
|
+
font-size: 14px;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
color: var(--download-main-color);
|
|
34
|
+
}
|
|
35
|
+
.aplus-ap-attachment__more:hover {
|
|
36
|
+
color: var(--download-main-color-opacity);
|
|
37
|
+
}
|
|
38
|
+
.aplus-ap-attachment__file-list {
|
|
39
|
+
max-width: 312px;
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
}
|
|
43
|
+
.aplus-ap-attachment__file-item {
|
|
44
|
+
flex: 1;
|
|
45
|
+
flex-wrap: wrap;
|
|
46
|
+
margin-bottom: 16px;
|
|
47
|
+
font-size: 14px;
|
|
48
|
+
color: #000;
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
}
|
|
51
|
+
.aplus-ap-attachment__file-item:hover {
|
|
52
|
+
color: var(--download-main-color);
|
|
53
|
+
}
|
|
54
|
+
.aplus-ap-attachment__down-load-all {
|
|
55
|
+
font-size: 14px;
|
|
56
|
+
color: var(--download-main-color);
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
margin-bottom: 0;
|
|
59
|
+
}
|
|
60
|
+
.aplus-ap-attachment__down-load-all:hover {
|
|
61
|
+
color: var(--download-main-color-opacity);
|
|
62
|
+
}
|
|
@@ -6,12 +6,14 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOpti
|
|
|
6
6
|
stringMode: boolean;
|
|
7
7
|
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
8
8
|
"update:value": (...args: any[]) => void;
|
|
9
|
+
InputRadioChange: (...args: any[]) => void;
|
|
9
10
|
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApInputRadioProps>, {
|
|
10
11
|
bordered: boolean;
|
|
11
12
|
controls: boolean;
|
|
12
13
|
stringMode: boolean;
|
|
13
14
|
}>>> & {
|
|
14
15
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
16
|
+
onInputRadioChange?: ((...args: never) => any) | undefined;
|
|
15
17
|
}, {
|
|
16
18
|
bordered: boolean;
|
|
17
19
|
stringMode: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as f,
|
|
1
|
+
import { defineComponent as f, onMounted as g, openBlock as R, createElementBlock as V, normalizeClass as b, unref as t, createVNode as i, mergeProps as h } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
|
-
import { Form as I, InputNumber as
|
|
4
|
-
import { omit as
|
|
3
|
+
import { Form as I, InputNumber as B, RadioGroup as k } from "ant-design-vue";
|
|
4
|
+
import { omit as _ } from "lodash-unified";
|
|
5
5
|
import "./style.css";
|
|
6
|
-
import { useNamespace as
|
|
7
|
-
const
|
|
6
|
+
import { useNamespace as x } from "../../config-provider/hooks/use-namespace.mjs";
|
|
7
|
+
const M = /* @__PURE__ */ f({
|
|
8
8
|
name: "ApInputRadio",
|
|
9
9
|
__name: "ApInputRadio",
|
|
10
10
|
props: {
|
|
@@ -26,29 +26,42 @@ const G = /* @__PURE__ */ f({
|
|
|
26
26
|
onBlur: {},
|
|
27
27
|
onFocus: {},
|
|
28
28
|
value: {},
|
|
29
|
-
options: {}
|
|
29
|
+
options: {},
|
|
30
|
+
onInputRadioChange: {},
|
|
31
|
+
setRadioValCallback: {}
|
|
30
32
|
},
|
|
31
|
-
emits: ["update:value"],
|
|
32
|
-
setup(p, { emit:
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
emits: ["update:value", "InputRadioChange"],
|
|
34
|
+
setup(p, { emit: s }) {
|
|
35
|
+
const d = I.useInjectFormItemContext(), e = p, { b: m, e: c } = x("ap-input-radio"), u = s, n = (o) => {
|
|
36
|
+
let a = { ...e.value, ...o };
|
|
37
|
+
u("update:value", a), u("InputRadioChange", a), d.onFieldChange();
|
|
38
|
+
}, C = (o) => {
|
|
39
|
+
n({ inputVal: o });
|
|
37
40
|
}, v = (o) => {
|
|
38
|
-
|
|
41
|
+
const a = o.target.value;
|
|
42
|
+
if (e.setRadioValCallback) {
|
|
43
|
+
let l = e.setRadioValCallback(a);
|
|
44
|
+
n({ inputVal: l, radioVal: a });
|
|
45
|
+
} else
|
|
46
|
+
n({ radioVal: a });
|
|
39
47
|
};
|
|
40
|
-
return (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
48
|
+
return g(() => {
|
|
49
|
+
if (e.setRadioValCallback) {
|
|
50
|
+
let o = e.setRadioValCallback(e.value.radioVal);
|
|
51
|
+
n({ inputVal: o });
|
|
52
|
+
}
|
|
53
|
+
}), (o, a) => {
|
|
54
|
+
var l, r;
|
|
55
|
+
return R(), V("div", {
|
|
56
|
+
class: b([t(m)()])
|
|
44
57
|
}, [
|
|
45
|
-
|
|
46
|
-
class: t(
|
|
47
|
-
}, t(
|
|
48
|
-
value: e.value ? (
|
|
49
|
-
onChange:
|
|
58
|
+
i(t(B), h({
|
|
59
|
+
class: t(c)("input-number")
|
|
60
|
+
}, t(_)(e, ["value", "options"]), {
|
|
61
|
+
value: e.value ? (l = e.value) == null ? void 0 : l.inputVal : "",
|
|
62
|
+
onChange: C
|
|
50
63
|
}), null, 16, ["class", "value"]),
|
|
51
|
-
|
|
64
|
+
i(t(k), {
|
|
52
65
|
value: e.value ? (r = e.value) == null ? void 0 : r.radioVal : "",
|
|
53
66
|
options: e.options,
|
|
54
67
|
onChange: v
|
|
@@ -58,5 +71,5 @@ const G = /* @__PURE__ */ f({
|
|
|
58
71
|
}
|
|
59
72
|
});
|
|
60
73
|
export {
|
|
61
|
-
|
|
74
|
+
M as default
|
|
62
75
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { InputNumberProps } from 'ant-design-vue/es/input-number';
|
|
2
2
|
type ApInputProps = Pick<InputNumberProps, 'disabled' | 'stringMode' | 'precision' | 'max' | 'min' | 'step' | 'bordered' | 'autofocus' | 'decimalSeparator' | 'controls' | 'formatter' | 'onInput' | 'onChange' | 'onPressEnter' | 'onStep' | 'onBlur' | 'onFocus'>;
|
|
3
|
-
type ApInputValyeName = 'inputval' | 'radioVal';
|
|
4
3
|
export type ApInputValType = {
|
|
5
|
-
value
|
|
4
|
+
value: {
|
|
5
|
+
inputVal: string | number;
|
|
6
|
+
radioVal: string | number;
|
|
7
|
+
};
|
|
6
8
|
};
|
|
7
9
|
export type ApInputRadioOptions = Array<{
|
|
8
10
|
value: string | number;
|
|
@@ -10,5 +12,10 @@ export type ApInputRadioOptions = Array<{
|
|
|
10
12
|
}>;
|
|
11
13
|
export type ApInputRadioProps = ApInputProps & ApInputValType & {
|
|
12
14
|
options: ApInputRadioOptions;
|
|
15
|
+
onInputRadioChange?: (value: {
|
|
16
|
+
inputVal: string | number;
|
|
17
|
+
radioVal: string | number;
|
|
18
|
+
}) => void;
|
|
19
|
+
setRadioValCallback?: (radioVal: string | number) => string | number;
|
|
13
20
|
};
|
|
14
21
|
export {};
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { ApLadderProps, ApLadderSlots, ApLadderLabelValue } from './interface';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType, CSSProperties } from 'vue';
|
|
3
|
+
import { VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
4
|
+
import { TriggerType } from 'ant-design-vue/es/tooltip/abstractTooltipProps';
|
|
5
|
+
import { TooltipPlacement, AdjustOverflow } from 'ant-design-vue/es/tooltip';
|
|
6
|
+
import { LiteralUnion } from 'ant-design-vue/es/_util/type';
|
|
7
|
+
import { PresetColorType } from 'ant-design-vue/es/_util/colors';
|
|
8
|
+
import { AlignType, BuildInPlacements } from 'ant-design-vue/es/vc-trigger/interface';
|
|
9
|
+
declare function __VLS_template(): {
|
|
10
|
+
slots: Readonly<ApLadderSlots> & ApLadderSlots;
|
|
11
|
+
refs: {};
|
|
12
|
+
attrs: Partial<{}>;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApLadderProps>, {
|
|
16
|
+
major: string;
|
|
17
|
+
minor: string;
|
|
18
|
+
majorColor: string;
|
|
19
|
+
minorColor: string;
|
|
20
|
+
layout: string;
|
|
21
|
+
tooltip: boolean;
|
|
22
|
+
labelValues: () => never[];
|
|
23
|
+
tooltipProps: () => {
|
|
24
|
+
title: undefined;
|
|
25
|
+
align: {};
|
|
26
|
+
arrowPointAtCenter: boolean;
|
|
27
|
+
arrow: boolean;
|
|
28
|
+
autoAdjustOverflow: boolean;
|
|
29
|
+
color: string;
|
|
30
|
+
destroyTooltipOnHide: boolean;
|
|
31
|
+
getPopupContainer: () => HTMLElement;
|
|
32
|
+
mouseEnterDelay: number;
|
|
33
|
+
mouseLeaveDelay: number;
|
|
34
|
+
overlayClassName: string;
|
|
35
|
+
overlayStyle: {};
|
|
36
|
+
overlayInnerStyle: {};
|
|
37
|
+
placement: string;
|
|
38
|
+
trigger: string;
|
|
39
|
+
};
|
|
40
|
+
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApLadderProps>, {
|
|
41
|
+
major: string;
|
|
42
|
+
minor: string;
|
|
43
|
+
majorColor: string;
|
|
44
|
+
minorColor: string;
|
|
45
|
+
layout: string;
|
|
46
|
+
tooltip: boolean;
|
|
47
|
+
labelValues: () => never[];
|
|
48
|
+
tooltipProps: () => {
|
|
49
|
+
title: undefined;
|
|
50
|
+
align: {};
|
|
51
|
+
arrowPointAtCenter: boolean;
|
|
52
|
+
arrow: boolean;
|
|
53
|
+
autoAdjustOverflow: boolean;
|
|
54
|
+
color: string;
|
|
55
|
+
destroyTooltipOnHide: boolean;
|
|
56
|
+
getPopupContainer: () => HTMLElement;
|
|
57
|
+
mouseEnterDelay: number;
|
|
58
|
+
mouseLeaveDelay: number;
|
|
59
|
+
overlayClassName: string;
|
|
60
|
+
overlayStyle: {};
|
|
61
|
+
overlayInnerStyle: {};
|
|
62
|
+
placement: string;
|
|
63
|
+
trigger: string;
|
|
64
|
+
};
|
|
65
|
+
}>>>, {
|
|
66
|
+
layout: "vertical" | "horizontal";
|
|
67
|
+
tooltip: boolean;
|
|
68
|
+
tooltipProps: Required<Pick<Partial< ExtractPropTypes<{
|
|
69
|
+
title: VueTypeValidableDef<any>;
|
|
70
|
+
trigger: PropType< TriggerType | TriggerType[]>;
|
|
71
|
+
open: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
default: any;
|
|
74
|
+
};
|
|
75
|
+
visible: {
|
|
76
|
+
type: BooleanConstructor;
|
|
77
|
+
default: any;
|
|
78
|
+
};
|
|
79
|
+
placement: PropType<TooltipPlacement>;
|
|
80
|
+
color: PropType<LiteralUnion<PresetColorType>>;
|
|
81
|
+
transitionName: StringConstructor;
|
|
82
|
+
overlayStyle: {
|
|
83
|
+
type: PropType<CSSProperties>;
|
|
84
|
+
default: CSSProperties;
|
|
85
|
+
};
|
|
86
|
+
overlayInnerStyle: {
|
|
87
|
+
type: PropType<CSSProperties>;
|
|
88
|
+
default: CSSProperties;
|
|
89
|
+
};
|
|
90
|
+
overlayClassName: StringConstructor;
|
|
91
|
+
openClassName: StringConstructor;
|
|
92
|
+
prefixCls: StringConstructor;
|
|
93
|
+
mouseEnterDelay: NumberConstructor;
|
|
94
|
+
mouseLeaveDelay: NumberConstructor;
|
|
95
|
+
getPopupContainer: PropType<(triggerNode: HTMLElement) => HTMLElement>;
|
|
96
|
+
arrowPointAtCenter: {
|
|
97
|
+
type: BooleanConstructor;
|
|
98
|
+
default: any;
|
|
99
|
+
};
|
|
100
|
+
arrow: {
|
|
101
|
+
type: PropType<boolean | {
|
|
102
|
+
pointAtCenter?: boolean;
|
|
103
|
+
}>;
|
|
104
|
+
default: boolean | {
|
|
105
|
+
pointAtCenter?: boolean;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
autoAdjustOverflow: {
|
|
109
|
+
type: PropType<boolean | AdjustOverflow>;
|
|
110
|
+
default: boolean | AdjustOverflow;
|
|
111
|
+
};
|
|
112
|
+
destroyTooltipOnHide: {
|
|
113
|
+
type: BooleanConstructor;
|
|
114
|
+
default: any;
|
|
115
|
+
};
|
|
116
|
+
align: {
|
|
117
|
+
type: PropType<AlignType>;
|
|
118
|
+
default: AlignType;
|
|
119
|
+
};
|
|
120
|
+
builtinPlacements: {
|
|
121
|
+
type: PropType<BuildInPlacements>;
|
|
122
|
+
default: BuildInPlacements;
|
|
123
|
+
};
|
|
124
|
+
children: ArrayConstructor;
|
|
125
|
+
onVisibleChange: PropType<(vis: boolean) => void>;
|
|
126
|
+
'onUpdate:visible': PropType<(vis: boolean) => void>;
|
|
127
|
+
onOpenChange: PropType<(vis: boolean) => void>;
|
|
128
|
+
'onUpdate:open': PropType<(vis: boolean) => void>;
|
|
129
|
+
}>>, "title" | "placement" | "color" | "mouseEnterDelay" | "getPopupContainer" | "trigger" | "overlayStyle" | "overlayInnerStyle" | "overlayClassName" | "mouseLeaveDelay" | "arrowPointAtCenter" | "arrow" | "autoAdjustOverflow" | "destroyTooltipOnHide" | "align">>;
|
|
130
|
+
major: string;
|
|
131
|
+
minor: string;
|
|
132
|
+
majorColor: string;
|
|
133
|
+
minorColor: string;
|
|
134
|
+
labelValues: Array< ApLadderLabelValue>;
|
|
135
|
+
}, {}>;
|
|
136
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
137
|
+
export default _default;
|
|
138
|
+
type __VLS_WithDefaults<P, D> = {
|
|
139
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
140
|
+
default: D[K];
|
|
141
|
+
}> : P[K];
|
|
142
|
+
};
|
|
143
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
144
|
+
type __VLS_TypePropsToOption<T> = {
|
|
145
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
146
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
147
|
+
} : {
|
|
148
|
+
type: PropType<T[K]>;
|
|
149
|
+
required: true;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
153
|
+
new (): {
|
|
154
|
+
$slots: S;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
type __VLS_PrettifyLocal<T> = {
|
|
158
|
+
[K in keyof T]: T[K];
|
|
159
|
+
} & {};
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { defineComponent as O, useSlots as T, ref as W, computed as d, unref as l, onMounted as q, openBlock as t, createElementBlock as s, normalizeClass as a, createBlock as P, normalizeProps as S, mergeProps as _, createSlots as V, withCtx as m, Fragment as c, createElementVNode as u, normalizeStyle as p, toDisplayString as i, renderSlot as $, createCommentVNode as C, renderList as E } from "vue";
|
|
2
|
+
import { Tooltip as M } from "ant-design-vue";
|
|
3
|
+
import "../../config-provider/index.mjs";
|
|
4
|
+
import "./style.css";
|
|
5
|
+
import { useNamespace as H } from "../../config-provider/hooks/use-namespace.mjs";
|
|
6
|
+
import { useGlobalConfig as J } from "../../config-provider/hooks/use-global-config.mjs";
|
|
7
|
+
const K = { key: 0 }, Q = { key: 1 }, R = ["onClick"], U = { key: 0 }, X = { key: 1 }, re = /* @__PURE__ */ O({
|
|
8
|
+
name: "ApLadder",
|
|
9
|
+
__name: "ApLadder",
|
|
10
|
+
props: {
|
|
11
|
+
major: { default: "" },
|
|
12
|
+
minor: { default: "" },
|
|
13
|
+
majorColor: { default: "" },
|
|
14
|
+
minorColor: { default: "" },
|
|
15
|
+
layout: { default: "vertical" },
|
|
16
|
+
tooltip: { type: Boolean, default: !0 },
|
|
17
|
+
labelValues: { default: () => [] },
|
|
18
|
+
tooltipProps: { default: () => ({
|
|
19
|
+
title: void 0,
|
|
20
|
+
align: {},
|
|
21
|
+
arrowPointAtCenter: !1,
|
|
22
|
+
arrow: !0,
|
|
23
|
+
autoAdjustOverflow: !0,
|
|
24
|
+
color: "",
|
|
25
|
+
destroyTooltipOnHide: !1,
|
|
26
|
+
getPopupContainer: () => document.body,
|
|
27
|
+
mouseEnterDelay: 0.1,
|
|
28
|
+
mouseLeaveDelay: 0.1,
|
|
29
|
+
overlayClassName: "",
|
|
30
|
+
overlayStyle: {},
|
|
31
|
+
overlayInnerStyle: {},
|
|
32
|
+
placement: "top",
|
|
33
|
+
trigger: "hover"
|
|
34
|
+
}) }
|
|
35
|
+
},
|
|
36
|
+
setup(w) {
|
|
37
|
+
const y = T(), r = w, { b: A, e: n, m: B } = H("ap-ladder"), N = J("uiMode", "aplus"), v = `ap-ladder-${Math.floor(Math.random() * 1e7)}`, L = n("ellipsis"), h = W(!1), z = d(() => r.major || r.minor), D = d(() => r.labelValues.length > 0), b = d(() => r.majorColor ? {
|
|
38
|
+
color: `${r.majorColor}`
|
|
39
|
+
} : {}), j = d(() => r.minorColor ? {
|
|
40
|
+
color: `${r.minorColor}`
|
|
41
|
+
} : {}), f = (e) => e == null ? "--" : typeof e == "string" ? e || "--" : typeof e == "number" ? e.toFixed(2) : "--", F = () => {
|
|
42
|
+
const e = document.getElementById(v);
|
|
43
|
+
if (!e)
|
|
44
|
+
return;
|
|
45
|
+
e.querySelectorAll(`.${L}`).forEach((o) => {
|
|
46
|
+
o.clientWidth < o.scrollWidth && (h.value = !0);
|
|
47
|
+
});
|
|
48
|
+
}, g = d(() => y.title ? !0 : r.tooltip && l(h)), G = (e) => {
|
|
49
|
+
e && window.open(e, "_blank");
|
|
50
|
+
};
|
|
51
|
+
return q(() => {
|
|
52
|
+
F();
|
|
53
|
+
}), (e, I) => (t(), s("div", {
|
|
54
|
+
id: v,
|
|
55
|
+
class: a([l(A)(), `${l(B)(l(N))}`])
|
|
56
|
+
}, [
|
|
57
|
+
z.value ? (t(), P(l(M), S(_({ key: 0 }, { ...r.tooltipProps })), V({
|
|
58
|
+
default: m(() => [
|
|
59
|
+
r.layout === "vertical" ? (t(), s(c, { key: 0 }, [
|
|
60
|
+
u("div", {
|
|
61
|
+
class: a([l(n)("major"), l(n)("ellipsis")]),
|
|
62
|
+
style: p(b.value)
|
|
63
|
+
}, i(e.major || "--"), 7),
|
|
64
|
+
u("div", {
|
|
65
|
+
class: a([l(n)("minor"), l(n)("ellipsis")]),
|
|
66
|
+
style: p(j.value)
|
|
67
|
+
}, i(e.minor || "--"), 7)
|
|
68
|
+
], 64)) : (t(), s("div", {
|
|
69
|
+
key: 1,
|
|
70
|
+
class: a(l(n)("ellipsis"))
|
|
71
|
+
}, [
|
|
72
|
+
u("span", {
|
|
73
|
+
class: a([l(n)("major")]),
|
|
74
|
+
style: p(b.value)
|
|
75
|
+
}, i(e.major || "--"), 7),
|
|
76
|
+
u("span", {
|
|
77
|
+
class: a([l(n)("minor")]),
|
|
78
|
+
style: p(j.value)
|
|
79
|
+
}, i(e.minor || "--"), 7)
|
|
80
|
+
], 2))
|
|
81
|
+
]),
|
|
82
|
+
_: 2
|
|
83
|
+
}, [
|
|
84
|
+
g.value ? {
|
|
85
|
+
name: "title",
|
|
86
|
+
fn: m(() => [
|
|
87
|
+
y.title ? $(e.$slots, "title", { key: 0 }) : (t(), s(c, { key: 1 }, [
|
|
88
|
+
r.tooltipProps.title ? (t(), s("div", K, i(r.tooltipProps.title), 1)) : (t(), s("div", Q, [
|
|
89
|
+
u("div", null, i(e.major || "--"), 1),
|
|
90
|
+
u("div", null, i(e.minor || "--"), 1)
|
|
91
|
+
]))
|
|
92
|
+
], 64))
|
|
93
|
+
]),
|
|
94
|
+
key: "0"
|
|
95
|
+
} : void 0
|
|
96
|
+
]), 1040)) : C("", !0),
|
|
97
|
+
D.value ? (t(), P(l(M), S(_({ key: 1 }, { ...r.tooltipProps })), V({
|
|
98
|
+
default: m(() => [
|
|
99
|
+
(t(!0), s(c, null, E(r.labelValues, (o, k) => (t(), s("div", {
|
|
100
|
+
key: k,
|
|
101
|
+
class: a([l(n)("ellipsis")])
|
|
102
|
+
}, [
|
|
103
|
+
u("span", {
|
|
104
|
+
class: a(l(n)("label")),
|
|
105
|
+
style: p(o.labelColor ? { color: o.labelColor } : void 0)
|
|
106
|
+
}, i(o.label) + ":", 7),
|
|
107
|
+
o.link ? (t(), s("span", {
|
|
108
|
+
key: 0,
|
|
109
|
+
class: a(l(n)("link")),
|
|
110
|
+
style: p(o.linkColor ? { color: o.linkColor } : void 0),
|
|
111
|
+
onClick: (Y) => G(o.link)
|
|
112
|
+
}, i(f(o.value)), 15, R)) : (t(), s("span", {
|
|
113
|
+
key: 1,
|
|
114
|
+
class: a(l(n)("value")),
|
|
115
|
+
style: p(o.valueColor ? { color: o.valueColor } : void 0)
|
|
116
|
+
}, i(f(o.value)), 7)),
|
|
117
|
+
o.unit ? (t(), s("span", {
|
|
118
|
+
key: 2,
|
|
119
|
+
class: a(l(n)("unit")),
|
|
120
|
+
style: p(o.unitColor ? { color: o.unitColor } : void 0)
|
|
121
|
+
}, i(o.unit), 7)) : C("", !0)
|
|
122
|
+
], 2))), 128))
|
|
123
|
+
]),
|
|
124
|
+
_: 2
|
|
125
|
+
}, [
|
|
126
|
+
g.value ? {
|
|
127
|
+
name: "title",
|
|
128
|
+
fn: m(() => [
|
|
129
|
+
y.title ? $(e.$slots, "title", { key: 0 }) : (t(), s(c, { key: 1 }, [
|
|
130
|
+
r.tooltipProps.title ? (t(), s("div", U, i(r.tooltipProps.title), 1)) : (t(), s("div", X, [
|
|
131
|
+
(t(!0), s(c, null, E(r.labelValues, (o, k) => (t(), s("div", { key: k }, [
|
|
132
|
+
u("span", null, i(o.label), 1),
|
|
133
|
+
u("span", null, i(f(o.value)), 1)
|
|
134
|
+
]))), 128))
|
|
135
|
+
]))
|
|
136
|
+
], 64))
|
|
137
|
+
]),
|
|
138
|
+
key: "0"
|
|
139
|
+
} : void 0
|
|
140
|
+
]), 1040)) : C("", !0)
|
|
141
|
+
], 2));
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
export {
|
|
145
|
+
re as default
|
|
146
|
+
};
|