@aplus-frontend/ui 0.1.24 → 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 +58 -55
- 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/business/ap-input-radio/ApInputRadio.vue2.mjs +37 -27
- package/es/src/business/ap-input-radio/interface.d.ts +4 -3
- 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 +1 -0
- package/es/src/business/hooks/index.mjs +3 -1
- package/es/src/business/hooks/usePageListApTable.d.ts +19 -2
- package/es/src/business/hooks/usePageListApTable.mjs +24 -23
- 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 +718 -8
- package/es/src/business/index.mjs +25 -22
- package/es/src/components.d.ts +1 -0
- package/es/src/index.mjs +206 -203
- 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-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-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/business/ap-input-radio/ApInputRadio.vue2.js +1 -1
- package/lib/src/business/ap-input-radio/interface.d.ts +4 -3
- 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 +1 -0
- package/lib/src/business/hooks/index.js +1 -1
- package/lib/src/business/hooks/usePageListApTable.d.ts +19 -2
- package/lib/src/business/hooks/usePageListApTable.js +1 -1
- 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 +718 -8
- package/lib/src/business/index.js +1 -1
- package/lib/src/components.d.ts +1 -0
- package/lib/src/index.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-ladder/ap-ladder.css +56 -0
- package/lib/src/theme/ap-layout/ap-info-layout.css +17 -0
- package/package.json +1 -1
- 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,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
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./usePageListApTable.js");exports.usePageListApTable=e.usePageListApTable;
|
|
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;
|
|
@@ -9,6 +9,12 @@ export interface UsePageListApTable extends ApTableProps {
|
|
|
9
9
|
transformSearchFormValues?: (values: any) => any;
|
|
10
10
|
/** ApTable数据接口 */
|
|
11
11
|
api?(record: any): Promise<any>;
|
|
12
|
+
/** 发起请求的时候情况行选中
|
|
13
|
+
* @default true
|
|
14
|
+
*/
|
|
15
|
+
clearSelectionOnRequest?: boolean;
|
|
16
|
+
/** 用于覆盖默认的class */
|
|
17
|
+
class?: string;
|
|
12
18
|
}
|
|
13
19
|
/**
|
|
14
20
|
* 集成了列表页面的ApTable的默认配置
|
|
@@ -20,10 +26,21 @@ export declare function usePageListApTable(props?: UsePageListApTable): [ApTable
|
|
|
20
26
|
reset: () => void;
|
|
21
27
|
getSearchFormValues: () => any;
|
|
22
28
|
getApTableInstance: () => {
|
|
23
|
-
reset: () => void;
|
|
24
29
|
submit: () => void;
|
|
25
|
-
|
|
30
|
+
reset: () => void;
|
|
26
31
|
setSearchFormValues: (fields: Partial< Recordable>) => void;
|
|
27
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;
|
|
28
44
|
} | null;
|
|
45
|
+
clearSelection: () => void;
|
|
29
46
|
}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
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;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { ApTableExpose } from '../..';
|
|
3
|
+
interface UseTableRefreshOption {
|
|
4
|
+
/**
|
|
5
|
+
* apTable实例
|
|
6
|
+
*/
|
|
7
|
+
apTableRef?: Ref<ApTableExpose | undefined>;
|
|
8
|
+
/**
|
|
9
|
+
* 刷新类型,reset:重置,submit:提交
|
|
10
|
+
*/
|
|
11
|
+
refreskType?: 'reset' | 'submit';
|
|
12
|
+
/**
|
|
13
|
+
* 刷新前执行,返回false则不执行
|
|
14
|
+
*/
|
|
15
|
+
refreshBefore?: () => boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare function useTableRefresh(option?: UseTableRefreshOption): void;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue");function b(e){const l=(["reset","submit",void 0].includes(e==null?void 0:e.refreskType)?e==null?void 0:e.refreskType:"submit")??"submit",r=(e==null?void 0:e.refreshBefore)??(()=>!0);let s=!0;a.onActivated(()=>{var u,f;if(s){s=!1;return}r!=null&&r()&&((f=(u=e==null?void 0:e.apTableRef)==null?void 0:u.value)==null||f[l]())})}exports.useTableRefresh=b;
|