@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,97 @@
|
|
|
1
|
+
import { AttachmentItemProps, ApAttachmentProps } from './interface';
|
|
2
|
+
import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
3
|
+
import { TooltipPlacement } from 'ant-design-vue/es/tooltip';
|
|
4
|
+
declare const _default: DefineComponent<{
|
|
5
|
+
attachmentList: {
|
|
6
|
+
type: PropType<Array<AttachmentItemProps>>;
|
|
7
|
+
default: never[];
|
|
8
|
+
required: boolean;
|
|
9
|
+
};
|
|
10
|
+
textToolTipPlacement: {
|
|
11
|
+
type: PropType< ApAttachmentProps["textToolTipPlacement"]>;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
fileMorePopoverPlacement: {
|
|
15
|
+
type: PropType< ApAttachmentProps["fileMorePopoverPlacement"]>;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
color: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
};
|
|
21
|
+
size: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
needName: {
|
|
26
|
+
type: PropType<{
|
|
27
|
+
nameKey?: string;
|
|
28
|
+
pathKey?: string;
|
|
29
|
+
}>;
|
|
30
|
+
default: () => {
|
|
31
|
+
nameKey: string;
|
|
32
|
+
pathKey: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
getOssAccess: {
|
|
36
|
+
type: PropType< ApAttachmentProps["getOssAccess"]>;
|
|
37
|
+
};
|
|
38
|
+
disabled: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
toolTipBgColor: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
};
|
|
45
|
+
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
46
|
+
attachmentList: {
|
|
47
|
+
type: PropType<Array<AttachmentItemProps>>;
|
|
48
|
+
default: never[];
|
|
49
|
+
required: boolean;
|
|
50
|
+
};
|
|
51
|
+
textToolTipPlacement: {
|
|
52
|
+
type: PropType< ApAttachmentProps["textToolTipPlacement"]>;
|
|
53
|
+
default: string;
|
|
54
|
+
};
|
|
55
|
+
fileMorePopoverPlacement: {
|
|
56
|
+
type: PropType< ApAttachmentProps["fileMorePopoverPlacement"]>;
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
59
|
+
color: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
};
|
|
62
|
+
size: {
|
|
63
|
+
type: StringConstructor;
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
needName: {
|
|
67
|
+
type: PropType<{
|
|
68
|
+
nameKey?: string;
|
|
69
|
+
pathKey?: string;
|
|
70
|
+
}>;
|
|
71
|
+
default: () => {
|
|
72
|
+
nameKey: string;
|
|
73
|
+
pathKey: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
getOssAccess: {
|
|
77
|
+
type: PropType< ApAttachmentProps["getOssAccess"]>;
|
|
78
|
+
};
|
|
79
|
+
disabled: {
|
|
80
|
+
type: BooleanConstructor;
|
|
81
|
+
default: boolean;
|
|
82
|
+
};
|
|
83
|
+
toolTipBgColor: {
|
|
84
|
+
type: StringConstructor;
|
|
85
|
+
};
|
|
86
|
+
}>>, {
|
|
87
|
+
size: string;
|
|
88
|
+
disabled: boolean;
|
|
89
|
+
needName: {
|
|
90
|
+
nameKey?: string;
|
|
91
|
+
pathKey?: string;
|
|
92
|
+
};
|
|
93
|
+
textToolTipPlacement: TooltipPlacement;
|
|
94
|
+
attachmentList: AttachmentItemProps[];
|
|
95
|
+
fileMorePopoverPlacement: TooltipPlacement;
|
|
96
|
+
}, {}>;
|
|
97
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("ant-design-vue");require("../../config-provider/index.js");const L=require("./constans.js"),v=require("../../ap-download/utils/getFileInfo.js");require("./style.css");const x=require("../../ap-download/hooks/index.js"),O=require("lodash-unified"),T=require("../../config-provider/hooks/use-namespace.js"),h=require("../../config-provider/hooks/use-global-config.js"),b=require("../../config-provider/hooks/use-locale.js"),P=e.defineComponent({name:"ApAttachment",props:L.ApAttachmentProps(),setup(t){const{b:g,e:o}=T.useNamespace("ap-attachment"),N=h.useGlobalConfig("uiMode"),p=h.useGlobalConfig("apUpload"),{lang:A,t:c}=b.useLocale(),s=e.useSlots(),V=e.computed(()=>A.value==="zh-cn"?"zh_CN":"en_US"),l=e.computed(()=>t.attachmentList.length===1),r=e.computed(()=>t.attachmentList.length>0?t.attachmentList[0].fileName:""),w=e.computed(()=>l.value?r.value:c("ap.apAttachment.downloadall")),d=e.computed(()=>t.color?t.color:N.value==="aplus"?"#0070FF":"#1890FF"),C=e.computed(()=>({width:l.value?"auto":"266px"})),m=e.computed(()=>({"--download-main-color":d.value,"--download-main-color-opacity":v.getHexWithOpacity(d.value,.6)})),q=e.computed(()=>{var a;return t.getOssAccess||((a=p.value)==null?void 0:a.getOssAccess)}),y=e.computed(()=>{const a=s.default?s.default()[0]:null;return a?e.cloneVNode(a,{style:{"font-size":"16px"}}):null}),u=async a=>{if(!t.disabled){const n=await x.useOssInit(q.value,e.unref(V)),i=O.isArray(e.toRaw(a))?e.toRaw(a):[e.toRaw(a)];await n.downloadFile(v.getFileInfo(t.needName,i))}},F=a=>a&&a.length>0?e.createVNode("ul",{class:[o("file-list")],style:m.value},[a.map((n,i)=>e.createVNode("li",{key:i,class:[o("file-item")],onClick:()=>u(n)},[n.fileName])),e.createVNode("li",{class:[o("down-load-all")],onClick:()=>u(t.attachmentList)},[c("ap.apAttachment.downloadall")])]):null;return()=>e.createVNode("div",{class:[g()],style:[C.value,m.value]},[e.createVNode(f.Tooltip,{title:w.value,placement:t.textToolTipPlacement,color:t.toolTipBgColor},{default:()=>[e.createVNode("div",{class:[o("content")],onClick:()=>u(l.value?t.attachmentList[0]:t.attachmentList)},[s.default?e.createVNode("div",{class:[o("text-render")]},[y.value,e.createTextVNode(" ")]):null,e.createVNode("div",{class:[o("text-inner")]},[r.value])])]}),e.createVNode(f.Popover,{content:F(t.attachmentList),placement:t.fileMorePopoverPlacement,color:"#fff"},{default:()=>[!l.value&&e.createVNode("div",{class:[o("more")]},[c("ap.apAttachment.more")])]})])}});exports.default=P;
|
|
@@ -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 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=()=>({attachmentList:{type:Array,default:[],required:!0},textToolTipPlacement:{type:String,default:"topLeft"},fileMorePopoverPlacement:{type:String,default:"bottom"},color:{type:String},size:{type:String,default:"middle"},needName:{type:Object,default:()=>({nameKey:"fileName",pathKey:"filePath"})},getOssAccess:{type:Function},disabled:{type:Boolean,default:!1},toolTipBgColor:{type:String}});exports.ApAttachmentProps=e;
|
|
@@ -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 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../config-provider/index.js");const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../config-provider/index.js");const l=require("ant-design-vue"),f=require("lodash-unified");require("./style.css");const g=require("../../config-provider/hooks/use-namespace.js"),V=e.defineComponent({name:"ApInputRadio",__name:"ApInputRadio",props:{disabled:{type:Boolean},stringMode:{type:Boolean,default:!0},precision:{},max:{},min:{},step:{},bordered:{type:Boolean,default:!0},autofocus:{type:Boolean},decimalSeparator:{},controls:{type:Boolean,default:!0},formatter:{},onInput:{},onChange:{},onPressEnter:{},onStep:{},onBlur:{},onFocus:{},value:{},options:{},onInputRadioChange:{},setRadioValCallback:{}},emits:["update:value","InputRadioChange"],setup(s,{emit:p}){const d=l.Form.useInjectFormItemContext(),a=s,{b:c,e:m}=g.useNamespace("ap-input-radio"),r=p,n=o=>{let t={...a.value,...o};r("update:value",t),r("InputRadioChange",t),d.onFieldChange()},v=o=>{n({inputVal:o})},C=o=>{const t=o.target.value;if(a.setRadioValCallback){let u=a.setRadioValCallback(t);n({inputVal:u,radioVal:t})}else n({radioVal:t})};return e.onMounted(()=>{if(a.setRadioValCallback){let o=a.setRadioValCallback(a.value.radioVal);n({inputVal:o})}}),(o,t)=>{var u,i;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(c)()])},[e.createVNode(e.unref(l.InputNumber),e.mergeProps({class:e.unref(m)("input-number")},e.unref(f.omit)(a,["value","options"]),{value:a.value?(u=a.value)==null?void 0:u.inputVal:"",onChange:v}),null,16,["class","value"]),e.createVNode(e.unref(l.RadioGroup),{value:a.value?(i=a.value)==null?void 0:i.radioVal:"",options:a.options,onChange:C},null,8,["value","options"])],2)}}});exports.default=V;
|
|
@@ -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 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ApLadder.vue2.js");exports.default=e.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("ant-design-vue");require("../../config-provider/index.js");require("./style.css");const h=require("../../config-provider/hooks/use-namespace.js"),V=require("../../config-provider/hooks/use-global-config.js"),b={key:0},D={key:1},N=["onClick"],P={key:0},j={key:1},_=e.defineComponent({name:"ApLadder",__name:"ApLadder",props:{major:{default:""},minor:{default:""},majorColor:{default:""},minorColor:{default:""},layout:{default:"vertical"},tooltip:{type:Boolean,default:!0},labelValues:{default:()=>[]},tooltipProps:{default:()=>({title:void 0,align:{},arrowPointAtCenter:!1,arrow:!0,autoAdjustOverflow:!0,color:"",destroyTooltipOnHide:!1,getPopupContainer:()=>document.body,mouseEnterDelay:.1,mouseLeaveDelay:.1,overlayClassName:"",overlayStyle:{},overlayInnerStyle:{},placement:"top",trigger:"hover"})}},setup(y){const n=e.useSlots(),t=y,{b:k,e:r,m:f}=h.useNamespace("ap-ladder"),C=V.useGlobalConfig("uiMode","aplus"),s=`ap-ladder-${Math.floor(Math.random()*1e7)}`,B=r("ellipsis"),c=e.ref(!1),S=e.computed(()=>t.major||t.minor),g=e.computed(()=>t.labelValues.length>0),u=e.computed(()=>t.majorColor?{color:`${t.majorColor}`}:{}),m=e.computed(()=>t.minorColor?{color:`${t.minorColor}`}:{}),a=o=>o==null?"--":typeof o=="string"?o||"--":typeof o=="number"?o.toFixed(2):"--",E=()=>{const o=document.getElementById(s);if(!o)return;o.querySelectorAll(`.${B}`).forEach(l=>{l.clientWidth<l.scrollWidth&&(c.value=!0)})},p=e.computed(()=>n.title?!0:t.tooltip&&e.unref(c)),v=o=>{o&&window.open(o,"_blank")};return e.onMounted(()=>{E()}),(o,z)=>(e.openBlock(),e.createElementBlock("div",{id:s,class:e.normalizeClass([e.unref(k)(),`${e.unref(f)(e.unref(C))}`])},[S.value?(e.openBlock(),e.createBlock(e.unref(d.Tooltip),e.normalizeProps(e.mergeProps({key:0},{...t.tooltipProps})),e.createSlots({default:e.withCtx(()=>[t.layout==="vertical"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(r)("major"),e.unref(r)("ellipsis")]),style:e.normalizeStyle(u.value)},e.toDisplayString(o.major||"--"),7),e.createElementVNode("div",{class:e.normalizeClass([e.unref(r)("minor"),e.unref(r)("ellipsis")]),style:e.normalizeStyle(m.value)},e.toDisplayString(o.minor||"--"),7)],64)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(r)("ellipsis"))},[e.createElementVNode("span",{class:e.normalizeClass([e.unref(r)("major")]),style:e.normalizeStyle(u.value)},e.toDisplayString(o.major||"--"),7),e.createElementVNode("span",{class:e.normalizeClass([e.unref(r)("minor")]),style:e.normalizeStyle(m.value)},e.toDisplayString(o.minor||"--"),7)],2))]),_:2},[p.value?{name:"title",fn:e.withCtx(()=>[n.title?e.renderSlot(o.$slots,"title",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.tooltipProps.title?(e.openBlock(),e.createElementBlock("div",b,e.toDisplayString(t.tooltipProps.title),1)):(e.openBlock(),e.createElementBlock("div",D,[e.createElementVNode("div",null,e.toDisplayString(o.major||"--"),1),e.createElementVNode("div",null,e.toDisplayString(o.minor||"--"),1)]))],64))]),key:"0"}:void 0]),1040)):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createBlock(e.unref(d.Tooltip),e.normalizeProps(e.mergeProps({key:1},{...t.tooltipProps})),e.createSlots({default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.labelValues,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:i,class:e.normalizeClass([e.unref(r)("ellipsis")])},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(r)("label")),style:e.normalizeStyle(l.labelColor?{color:l.labelColor}:void 0)},e.toDisplayString(l.label)+":",7),l.link?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(r)("link")),style:e.normalizeStyle(l.linkColor?{color:l.linkColor}:void 0),onClick:w=>v(l.link)},e.toDisplayString(a(l.value)),15,N)):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(r)("value")),style:e.normalizeStyle(l.valueColor?{color:l.valueColor}:void 0)},e.toDisplayString(a(l.value)),7)),l.unit?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(e.unref(r)("unit")),style:e.normalizeStyle(l.unitColor?{color:l.unitColor}:void 0)},e.toDisplayString(l.unit),7)):e.createCommentVNode("",!0)],2))),128))]),_:2},[p.value?{name:"title",fn:e.withCtx(()=>[n.title?e.renderSlot(o.$slots,"title",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.tooltipProps.title?(e.openBlock(),e.createElementBlock("div",P,e.toDisplayString(t.tooltipProps.title),1)):(e.openBlock(),e.createElementBlock("div",j,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.labelValues,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:i},[e.createElementVNode("span",null,e.toDisplayString(l.label),1),e.createElementVNode("span",null,e.toDisplayString(a(l.value)),1)]))),128))]))],64))]),key:"0"}:void 0]),1040)):e.createCommentVNode("",!0)],2))}});exports.default=_;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { TooltipProps } from 'ant-design-vue/es/tooltip/Tooltip';
|
|
2
|
+
import { VNode } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* Tooltip 需要的属性
|
|
5
|
+
*/
|
|
6
|
+
export type TooltipNeedProps = Required<Pick<TooltipProps, 'title' | 'align' | 'arrowPointAtCenter' | 'arrow' | 'autoAdjustOverflow' | 'color' | 'destroyTooltipOnHide' | 'getPopupContainer' | 'mouseEnterDelay' | 'mouseLeaveDelay' | 'overlayClassName' | 'overlayStyle' | 'overlayInnerStyle' | 'placement' | 'trigger'>>;
|
|
7
|
+
/**
|
|
8
|
+
* 健值对
|
|
9
|
+
*/
|
|
10
|
+
export interface ApLadderLabelValue {
|
|
11
|
+
/**
|
|
12
|
+
* 健名称
|
|
13
|
+
*/
|
|
14
|
+
label: string;
|
|
15
|
+
/**
|
|
16
|
+
* 值
|
|
17
|
+
*/
|
|
18
|
+
value: string | number | undefined | null;
|
|
19
|
+
/**
|
|
20
|
+
* 自定义单位
|
|
21
|
+
*/
|
|
22
|
+
unit?: string;
|
|
23
|
+
/**
|
|
24
|
+
* 自定义单位颜色
|
|
25
|
+
*/
|
|
26
|
+
unitColor?: string;
|
|
27
|
+
/**
|
|
28
|
+
* 自定义健颜色
|
|
29
|
+
*/
|
|
30
|
+
labelColor?: string;
|
|
31
|
+
/**
|
|
32
|
+
* 自定义值颜色
|
|
33
|
+
*/
|
|
34
|
+
valueColor?: string;
|
|
35
|
+
/**
|
|
36
|
+
* 跳转第三方链接
|
|
37
|
+
*/
|
|
38
|
+
link?: string;
|
|
39
|
+
/**
|
|
40
|
+
* 自定义链接颜色
|
|
41
|
+
*/
|
|
42
|
+
linkColor?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* ApLadder Props 属性类型声明
|
|
46
|
+
*/
|
|
47
|
+
export interface ApLadderProps {
|
|
48
|
+
/**
|
|
49
|
+
* 重要信息
|
|
50
|
+
* @description 如 操作人名称、供应商名称...
|
|
51
|
+
*/
|
|
52
|
+
major: string;
|
|
53
|
+
/**
|
|
54
|
+
* 次要信息
|
|
55
|
+
* @description 如 操作人邮箱、供应商编码...
|
|
56
|
+
*/
|
|
57
|
+
minor: string;
|
|
58
|
+
/**
|
|
59
|
+
* 自定义重要信息颜色
|
|
60
|
+
*/
|
|
61
|
+
majorColor: string;
|
|
62
|
+
/**
|
|
63
|
+
* 自定义次要信息颜色
|
|
64
|
+
*/
|
|
65
|
+
minorColor: string;
|
|
66
|
+
/**
|
|
67
|
+
* 布局方式
|
|
68
|
+
* - `vertical` 垂直布局
|
|
69
|
+
* - `horizontal` 水平布局
|
|
70
|
+
* @default `vertical`
|
|
71
|
+
*/
|
|
72
|
+
layout: 'vertical' | 'horizontal';
|
|
73
|
+
/**
|
|
74
|
+
* 是否展示气泡
|
|
75
|
+
* @description 默认展示
|
|
76
|
+
*/
|
|
77
|
+
tooltip: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* 健值对 - 数组展示
|
|
80
|
+
*/
|
|
81
|
+
labelValues: Array<ApLadderLabelValue>;
|
|
82
|
+
/**
|
|
83
|
+
* 扩展 Tooltip
|
|
84
|
+
*/
|
|
85
|
+
tooltipProps: TooltipNeedProps;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* ApLadder Slots 类型声明
|
|
89
|
+
*/
|
|
90
|
+
export interface ApLadderSlots {
|
|
91
|
+
title?: VNode;
|
|
92
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
.aplus-ap-ladder {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: inherit;
|
|
4
|
+
font-size: 14px;
|
|
5
|
+
/** 自动溢出省略 */
|
|
6
|
+
/** Aplus端样式 */
|
|
7
|
+
/** Admin端样式 */
|
|
8
|
+
}
|
|
9
|
+
.aplus-ap-ladder__ellipsis {
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
text-overflow: ellipsis;
|
|
12
|
+
white-space: nowrap;
|
|
13
|
+
word-break: break-all;
|
|
14
|
+
}
|
|
15
|
+
.aplus-ap-ladder__major {
|
|
16
|
+
line-height: 22px;
|
|
17
|
+
color: #182948;
|
|
18
|
+
}
|
|
19
|
+
.aplus-ap-ladder__minor {
|
|
20
|
+
line-height: 22px;
|
|
21
|
+
color: #8896B0;
|
|
22
|
+
}
|
|
23
|
+
.aplus-ap-ladder__label {
|
|
24
|
+
color: #8896B0;
|
|
25
|
+
word-break: break-all;
|
|
26
|
+
}
|
|
27
|
+
.aplus-ap-ladder__value {
|
|
28
|
+
color: #182948;
|
|
29
|
+
word-break: break-all;
|
|
30
|
+
}
|
|
31
|
+
.aplus-ap-ladder__unit {
|
|
32
|
+
margin-left: 5px;
|
|
33
|
+
color: #182948;
|
|
34
|
+
}
|
|
35
|
+
.aplus-ap-ladder__link {
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
color: #0070ff;
|
|
38
|
+
}
|
|
39
|
+
.aplus-ap-ladder--admin .aplus-ap-ladder__major {
|
|
40
|
+
color: #333333;
|
|
41
|
+
}
|
|
42
|
+
.aplus-ap-ladder--admin .aplus-ap-ladder__minor {
|
|
43
|
+
color: #999999;
|
|
44
|
+
}
|
|
45
|
+
.aplus-ap-ladder--admin .aplus-ap-ladder__label {
|
|
46
|
+
color: #999999;
|
|
47
|
+
}
|
|
48
|
+
.aplus-ap-ladder--admin .aplus-ap-ladder__value {
|
|
49
|
+
color: #333333;
|
|
50
|
+
}
|
|
51
|
+
.aplus-ap-ladder--admin .aplus-ap-ladder__unit {
|
|
52
|
+
color: #333333;
|
|
53
|
+
}
|
|
54
|
+
.aplus-ap-ladder--admin .aplus-ap-ladder__link {
|
|
55
|
+
color: #34b77c;
|
|
56
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./usePageListApTable.js"),s=require("./useTableRefresh.js");exports.usePageListApTable=e.usePageListApTable;exports.useTableRefresh=s.useTableRefresh;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ApTableProps } from '../../';
|
|
2
|
+
import { Recordable } from '../../type';
|
|
3
|
+
export interface UsePageListApTable extends ApTableProps {
|
|
4
|
+
/** 是否显示默认的行选择配置
|
|
5
|
+
* @default true
|
|
6
|
+
*/
|
|
7
|
+
isShowRowSelection?: boolean;
|
|
8
|
+
/** 转化ApTable查询参数 */
|
|
9
|
+
transformSearchFormValues?: (values: any) => any;
|
|
10
|
+
/** ApTable数据接口 */
|
|
11
|
+
api?(record: any): Promise<any>;
|
|
12
|
+
/** 发起请求的时候情况行选中
|
|
13
|
+
* @default true
|
|
14
|
+
*/
|
|
15
|
+
clearSelectionOnRequest?: boolean;
|
|
16
|
+
/** 用于覆盖默认的class */
|
|
17
|
+
class?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 集成了列表页面的ApTable的默认配置
|
|
21
|
+
* 表格header吸顶效果,表格可拖动,表格行选择
|
|
22
|
+
* @version 1.0.0
|
|
23
|
+
*/
|
|
24
|
+
export declare function usePageListApTable(props?: UsePageListApTable): [ApTableProps, {
|
|
25
|
+
reload: () => void;
|
|
26
|
+
reset: () => void;
|
|
27
|
+
getSearchFormValues: () => any;
|
|
28
|
+
getApTableInstance: () => {
|
|
29
|
+
submit: () => void;
|
|
30
|
+
reset: () => void;
|
|
31
|
+
setSearchFormValues: (fields: Partial< Recordable>) => void;
|
|
32
|
+
getSearchFormValues: () => Partial< Recordable>;
|
|
33
|
+
dataSource: any;
|
|
34
|
+
rowSelection?: {
|
|
35
|
+
select: (item: any) => void;
|
|
36
|
+
selectedRows: any[];
|
|
37
|
+
unSelect: (item: any) => void;
|
|
38
|
+
isSelected: (item: any) => boolean;
|
|
39
|
+
selectAll: () => void;
|
|
40
|
+
unSelectAll: () => void;
|
|
41
|
+
clearAll: () => void;
|
|
42
|
+
toggleSelect: (item: any) => void;
|
|
43
|
+
} | undefined;
|
|
44
|
+
} | null;
|
|
45
|
+
clearSelection: () => void;
|
|
46
|
+
}];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("lodash-unified"),f=require("vue");function S(n){const r=f.ref(null),{isShowRowSelection:c=!0,clearSelectionOnRequest:u=!0,transformSearchFormValues:a,api:o,...i}=n||{},l=()=>{var e,t;(t=(e=r.value)==null?void 0:e.rowSelection)==null||t.clearAll()},d=async e=>{const t=a?a(e):e;try{if(!o)throw new Error("api is not defined");const{records:s,total:p}=await o(t);return u&&l(),{data:s,total:p}}catch(s){return console.error(s),{data:[],total:0}}};return[b.merge({scroll:{x:"100%",y:"100%"},tableLayout:"fixed",columnResizable:!0,class:"ap-table--sticky",request:o?d:void 0,rowSelection:c?{mode:"internal",fixed:"left",columnWidth:50}:void 0,ref(e){r.value=e}},i),{reload:()=>{var e;(e=r.value)==null||e.submit()},reset:()=>{var e;(e=r.value)==null||e.reset()},getSearchFormValues:()=>{var t;const e=((t=r.value)==null?void 0:t.getSearchFormValues())||{};return a?a(e):e},getApTableInstance:()=>r.value,clearSelection:l}]}exports.usePageListApTable=S;
|