@aplus-frontend/ui 0.1.31 → 0.1.33
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 +77 -72
- package/es/src/ap-button/ap-action-button.vue.d.ts +43 -0
- package/es/src/ap-button/ap-action-button.vue.mjs +43 -0
- package/es/src/ap-button/ap-action-button.vue2.mjs +4 -0
- package/es/src/ap-button/ap-button.vue.mjs +52 -50
- package/es/src/ap-button/index.d.ts +2 -1
- package/es/src/ap-button/index.mjs +1 -0
- package/es/src/ap-button/interface.d.ts +1 -0
- package/es/src/ap-descriptions/ap-descriptions.vue.mjs +43 -45
- package/es/src/ap-descriptions/formatter/index.d.ts +2 -2
- package/es/src/ap-descriptions/helper.d.ts +19 -1
- package/es/src/ap-descriptions/helper.mjs +22 -12
- package/es/src/ap-descriptions/style/ap-descriptions.css +1 -5
- package/es/src/ap-download/ap-download.vue.mjs +51 -40
- package/es/src/ap-download/utils/getFileInfo.d.ts +4 -1
- package/es/src/ap-download/utils/getFileInfo.mjs +51 -26
- package/es/src/ap-form/ap-form-item.vue.d.ts +1 -1
- package/es/src/ap-form/ap-form-item.vue.mjs +68 -62
- package/es/src/ap-form/ap-form-list.vue.mjs +23 -21
- package/es/src/ap-form/ap-form.vue.d.ts +3 -1
- package/es/src/ap-form/ap-form.vue2.mjs +130 -80
- package/es/src/ap-form/interface.d.ts +51 -1
- package/es/src/ap-form/items/checkbox/index.vue.mjs +6 -5
- package/es/src/ap-form/items/date/index.vue.mjs +10 -9
- package/es/src/ap-form/items/date-range/index.vue.mjs +8 -7
- package/es/src/ap-form/items/number/index.vue.mjs +12 -11
- package/es/src/ap-form/items/radio/index.vue.mjs +5 -4
- package/es/src/ap-form/items/select/index.vue.mjs +1 -0
- package/es/src/ap-form/items/switch/index.vue.mjs +10 -9
- package/es/src/ap-form/items/text/index.vue2.mjs +1 -0
- package/es/src/ap-form/items/text/password.vue.mjs +1 -0
- package/es/src/ap-form/items/text-area/index.vue.mjs +7 -6
- package/es/src/ap-form/modal-form/index.vue.d.ts +7 -3
- package/es/src/ap-form/search-form/index.vue.d.ts +7 -3
- package/es/src/ap-form/utils/get.d.ts +1 -0
- package/es/src/ap-form/utils/get.mjs +12 -0
- package/es/src/ap-form/utils/set.d.ts +6 -0
- package/es/src/ap-form/utils/set.mjs +41 -0
- package/es/src/ap-list/index.vue.d.ts +3 -0
- package/es/src/ap-list/index.vue.mjs +51 -49
- package/es/src/ap-table/ap-table.vue.d.ts +4 -1
- package/es/src/ap-table/ap-table.vue.mjs +65 -59
- package/es/src/ap-table/constants.d.ts +121 -1
- package/es/src/ap-table/interface.d.ts +6 -1
- package/es/src/ap-table/utils.d.ts +121 -1
- package/es/src/business/ap-attachment/ApAttachment.mjs +76 -68
- package/es/src/business/ap-card/ApCard.vue.d.ts +27 -0
- package/es/src/business/ap-card/ApCard.vue.mjs +4 -0
- package/es/src/business/ap-card/ApCard.vue2.mjs +65 -0
- package/es/src/business/ap-card/index.css +10 -0
- package/es/src/business/ap-card/interface.d.ts +9 -0
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +30 -100
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +104 -64
- package/es/src/business/ap-expand-alert/interface.d.ts +24 -6
- package/es/src/business/ap-expand-alert/style.css +9 -0
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +59 -70
- package/es/src/business/ap-export-group/handleExportDownload.d.ts +1 -0
- package/es/src/business/ap-export-group/handleExportDownload.mjs +14 -0
- package/es/src/business/{title → ap-title}/style.css +4 -4
- package/es/src/business/hooks/usePageListApTable.d.ts +2 -0
- package/es/src/business/index.d.ts +105 -188
- package/es/src/business/index.mjs +28 -23
- package/es/src/check-card/group.vue.d.ts +7 -1
- package/es/src/check-card/group.vue.mjs +26 -22
- package/es/src/check-card/index.vue.d.ts +5 -2
- package/es/src/check-card/index.vue2.mjs +69 -60
- package/es/src/check-card/interface.d.ts +12 -0
- package/es/src/check-card/style/index.css +8 -5
- 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 +10 -1
- package/es/src/config-provider/config-provider.mjs +20 -19
- package/es/src/config-provider/constants.d.ts +9 -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/editable-table/interface.d.ts +3 -2
- package/es/src/index.mjs +215 -210
- package/es/src/locale/lang/en.mjs +4 -0
- package/es/src/locale/lang/zh-cn.mjs +4 -0
- package/es/src/theme/ap-card/ap-card.css +10 -0
- package/es/src/theme/ap-descriptions/ap-descriptions.css +1 -5
- package/es/src/theme/ap-expand-alert/ap-expand-alert.css +9 -0
- package/es/src/theme/ap-title/ap-title.css +4 -4
- package/es/src/theme/check-card/index.css +8 -5
- package/es/src/theme/css-var/index.mjs +33 -15
- package/lib/index.js +1 -1
- package/lib/src/ap-button/ap-action-button.vue.d.ts +43 -0
- package/lib/src/ap-button/ap-action-button.vue.js +1 -0
- package/lib/src/ap-button/ap-action-button.vue2.js +1 -0
- package/lib/src/ap-button/ap-button.vue.js +1 -1
- package/lib/src/ap-button/index.d.ts +2 -1
- package/lib/src/ap-button/index.js +1 -1
- package/lib/src/ap-button/interface.d.ts +1 -0
- package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
- package/lib/src/ap-descriptions/formatter/index.d.ts +2 -2
- package/lib/src/ap-descriptions/helper.d.ts +19 -1
- package/lib/src/ap-descriptions/helper.js +1 -1
- package/lib/src/ap-descriptions/style/ap-descriptions.css +1 -5
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-download/utils/getFileInfo.d.ts +4 -1
- package/lib/src/ap-download/utils/getFileInfo.js +1 -1
- package/lib/src/ap-form/ap-form-item.vue.d.ts +1 -1
- package/lib/src/ap-form/ap-form-item.vue.js +1 -1
- package/lib/src/ap-form/ap-form-list.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue.d.ts +3 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/interface.d.ts +51 -1
- package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
- package/lib/src/ap-form/items/date/index.vue.js +1 -1
- package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.js +1 -1
- package/lib/src/ap-form/items/radio/index.vue.js +1 -1
- package/lib/src/ap-form/items/select/index.vue.js +1 -1
- package/lib/src/ap-form/items/switch/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/index.vue2.js +1 -1
- package/lib/src/ap-form/items/text/password.vue.js +1 -1
- package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.d.ts +7 -3
- package/lib/src/ap-form/search-form/index.vue.d.ts +7 -3
- package/lib/src/ap-form/utils/get.d.ts +1 -0
- package/lib/src/ap-form/utils/get.js +1 -0
- package/lib/src/ap-form/utils/set.d.ts +6 -0
- package/lib/src/ap-form/utils/set.js +1 -0
- package/lib/src/ap-list/index.vue.d.ts +3 -0
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +4 -1
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +121 -1
- package/lib/src/ap-table/interface.d.ts +6 -1
- package/lib/src/ap-table/utils.d.ts +121 -1
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-card/ApCard.vue.d.ts +27 -0
- package/lib/src/business/ap-card/ApCard.vue.js +1 -0
- package/lib/src/business/ap-card/ApCard.vue2.js +1 -0
- package/lib/src/business/ap-card/index.css +10 -0
- package/lib/src/business/ap-card/interface.d.ts +9 -0
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +30 -100
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
- package/lib/src/business/ap-expand-alert/interface.d.ts +24 -6
- package/lib/src/business/ap-expand-alert/style.css +9 -0
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/business/ap-export-group/handleExportDownload.d.ts +1 -0
- package/lib/src/business/ap-export-group/handleExportDownload.js +1 -0
- package/lib/src/business/{title → ap-title}/style.css +4 -4
- package/lib/src/business/hooks/usePageListApTable.d.ts +2 -0
- package/lib/src/business/index.d.ts +105 -188
- package/lib/src/business/index.js +1 -1
- package/lib/src/check-card/group.vue.d.ts +7 -1
- package/lib/src/check-card/group.vue.js +1 -1
- package/lib/src/check-card/index.vue.d.ts +5 -2
- package/lib/src/check-card/index.vue2.js +1 -1
- package/lib/src/check-card/interface.d.ts +12 -0
- package/lib/src/check-card/style/index.css +8 -5
- 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 +10 -1
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/constants.d.ts +9 -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/editable-table/interface.d.ts +3 -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/ap-card/ap-card.css +10 -0
- package/lib/src/theme/ap-descriptions/ap-descriptions.css +1 -5
- package/lib/src/theme/ap-expand-alert/ap-expand-alert.css +9 -0
- package/lib/src/theme/ap-title/ap-title.css +4 -4
- package/lib/src/theme/check-card/index.css +8 -5
- package/lib/src/theme/css-var/index.js +1 -1
- package/package.json +1 -1
- /package/es/src/business/{title → ap-title}/ApTitle.vue.d.ts +0 -0
- /package/es/src/business/{title → ap-title}/ApTitle.vue.mjs +0 -0
- /package/es/src/business/{title → ap-title}/ApTitle.vue2.mjs +0 -0
- /package/es/src/business/{title → ap-title}/interface.d.ts +0 -0
- /package/lib/src/business/{title → ap-title}/ApTitle.vue.d.ts +0 -0
- /package/lib/src/business/{title → ap-title}/ApTitle.vue.js +0 -0
- /package/lib/src/business/{title → ap-title}/ApTitle.vue2.js +0 -0
- /package/lib/src/business/{title → ap-title}/interface.d.ts +0 -0
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import { AlertProps } from 'ant-design-vue/es/alert';
|
|
2
|
+
import { Component, CSSProperties, VNode } from 'vue';
|
|
3
|
+
export type ApExpandAlertProps<T> = {
|
|
2
4
|
/**
|
|
3
5
|
* Alert类型
|
|
4
6
|
*/
|
|
5
|
-
type
|
|
7
|
+
type?: 'warning' | 'error' | 'success' | 'info' | 'card' | undefined;
|
|
6
8
|
/**
|
|
7
9
|
* 展开数据
|
|
8
10
|
*/
|
|
9
|
-
data
|
|
11
|
+
data?: Array<T> | string;
|
|
10
12
|
/**
|
|
11
13
|
* 标题前缀
|
|
12
14
|
*/
|
|
@@ -22,9 +24,25 @@ export interface ApExpandAlertProps {
|
|
|
22
24
|
/**
|
|
23
25
|
* 分隔符
|
|
24
26
|
*/
|
|
25
|
-
separator
|
|
27
|
+
separator?: Component | VNode | string;
|
|
28
|
+
/**
|
|
29
|
+
* 分隔符样式
|
|
30
|
+
*/
|
|
31
|
+
separatorStyle?: CSSProperties;
|
|
32
|
+
/**
|
|
33
|
+
* 内容样式
|
|
34
|
+
*/
|
|
35
|
+
contentStyle?: Omit<CSSProperties, 'wordBreak' | 'overflow' | 'display' | 'webkitLineClamp' | 'webkitBoxOrient'>;
|
|
36
|
+
/**
|
|
37
|
+
* 前缀样式
|
|
38
|
+
*/
|
|
39
|
+
prefixStyle?: CSSProperties;
|
|
26
40
|
/**
|
|
27
41
|
* 内容达到几行显示展开收起,默认是两行
|
|
28
42
|
*/
|
|
29
|
-
rows
|
|
30
|
-
|
|
43
|
+
rows?: string | number;
|
|
44
|
+
/**
|
|
45
|
+
* 默认是否展开
|
|
46
|
+
*/
|
|
47
|
+
defaultExpand?: boolean;
|
|
48
|
+
} & Pick<AlertProps, 'showIcon'>;
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
}
|
|
20
20
|
.aplus-ap-expand-alert__prefix {
|
|
21
21
|
color: #182948;
|
|
22
|
+
display: inline-block;
|
|
22
23
|
}
|
|
23
24
|
.aplus-ap-expand-alert__showItem {
|
|
24
25
|
color: #0070ff;
|
|
@@ -40,3 +41,11 @@
|
|
|
40
41
|
font-size: 16px;
|
|
41
42
|
transform: translateY(2px);
|
|
42
43
|
}
|
|
44
|
+
.aplus-ap-expand-alert--aplus .card-alert {
|
|
45
|
+
background-color: transparent !important;
|
|
46
|
+
border: none ;
|
|
47
|
+
}
|
|
48
|
+
.aplus-ap-expand-alert--admin .card-alert {
|
|
49
|
+
background-color: transparent !important;
|
|
50
|
+
border: none;
|
|
51
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("@ant-design/icons-vue"),a=require("ant-design-vue");require("../../config-provider/index.js");const l=require("./interface.js"),A=require("@aplus-frontend/hooks"),S=require("./handleExportDownload.js"),q=require("../../config-provider/hooks/use-namespace.js"),k=require("../../config-provider/hooks/use-locale.js"),G=require("../../config-provider/hooks/use-global-config.js"),T=e.defineComponent({__name:"ApExportGroup",props:{selectedRowKeys:{},disabled:{type:Boolean},auth:{},ifShow:{type:Function},text:{},idKey:{},request:{type:Function},getRequestParams:{type:Function},getInitialParams:{type:Function},beforeRequest:{type:Function}},setup(x){const{hasPermission:m}=A.usePermission(),t=x,{b:w}=q.useNamespace("ap-export-group"),{t:i}=k.useLocale(),h=G.useGlobalConfig("uiMode"),b=e.computed(()=>{const o={aplus:"#0070FF",admin:"#34b77c"};return d.value?"":o[h.value]||o.aplus}),d=e.computed(()=>!!(t!=null&&t.disabled)),g={textAlign:"center"},c=e.ref(!1),f=e.computed(()=>(t==null?void 0:t.selectedRowKeys)||[]),C=e.computed(()=>{let o=t==null?void 0:t.ifShow;return!(t!=null&&t.ifShow)&&(t!=null&&t.auth)&&(o=()=>m(t.auth)),(o==null?void 0:o())??!0});async function v({key:o}){var y,p;const{getRequestParams:u,request:n}=t||{};let s={};o===l.ApExportGroupActionType.SELECT?s={[(t==null?void 0:t.idKey)||"ids"]:f.value}:o===l.ApExportGroupActionType.ALL&&(s=(u==null?void 0:u())||{});const E=((y=t==null?void 0:t.getInitialParams)==null?void 0:y.call(t))||{};try{c.value=!0;let r={...s,...E};r=((p=t==null?void 0:t.beforeRequest)==null?void 0:p.call(t,r))||r,await S.handleExportDownload(async()=>await(n==null?void 0:n(r)))}finally{c.value=!1}}return(o,u)=>C.value?(e.openBlock(),e.createBlock(e.unref(a.Dropdown),{key:0,class:e.normalizeClass([e.unref(w)()]),overlayStyle:g,disabled:d.value},{overlay:e.withCtx(()=>[e.createVNode(e.unref(a.Menu),{onClick:v},{default:e.withCtx(()=>{var n;return[(e.openBlock(),e.createBlock(e.unref(a.MenuItem),{key:e.unref(l.ApExportGroupActionType).SELECT,disabled:((n=f.value)==null?void 0:n.length)===0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("ap.apExportGroup.exportSelected")),1)]),_:1},8,["disabled"])),(e.openBlock(),e.createBlock(e.unref(a.MenuItem),{key:e.unref(l.ApExportGroupActionType).ALL},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("ap.apExportGroup.exportAll")),1)]),_:1}))]}),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(a.Button),{style:e.normalizeStyle({color:b.value}),loading:c.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString((t==null?void 0:t.text)??e.unref(i)("ap.apExportGroup.export"))+" ",1),e.createVNode(e.unref(_.DownOutlined))]),_:1},8,["style","loading"])]),_:1},8,["class","disabled"])):e.createCommentVNode("",!0)}});exports.default=T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function handleExportDownload(request?: () => Promise<any> | undefined): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@aplus-frontend/utils"),a=require("ant-design-vue");async function l(o){const t=await(o==null?void 0:o());Object.prototype.toString.call(t==null?void 0:t.data)==="[object Blob]"&&n.formatFileNameAndDownloadFile(t).catch(e=>{a.Modal.error({title:e,centered:!0})})}exports.handleExportDownload=l;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
.aplus-ap-title {
|
|
2
2
|
position: relative;
|
|
3
3
|
width: 100%;
|
|
4
|
-
height: 20px;
|
|
5
4
|
display: flex;
|
|
6
5
|
align-items: center;
|
|
7
6
|
justify-content: space-between;
|
|
@@ -12,7 +11,8 @@
|
|
|
12
11
|
position: absolute;
|
|
13
12
|
content: '';
|
|
14
13
|
left: 0;
|
|
15
|
-
top:
|
|
14
|
+
top: 50%;
|
|
15
|
+
transform: translateY(-50%);
|
|
16
16
|
width: 3px;
|
|
17
17
|
height: 16px;
|
|
18
18
|
background: #0070ff;
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
color: #0070ff;
|
|
31
31
|
}
|
|
32
32
|
.aplus-ap-title--admin {
|
|
33
|
-
height: 22px;
|
|
34
33
|
padding-left: 14px;
|
|
35
34
|
}
|
|
36
35
|
.aplus-ap-title--admin::before {
|
|
37
|
-
top:
|
|
36
|
+
top: 50%;
|
|
37
|
+
transform: translateY(-50%);
|
|
38
38
|
width: 8px;
|
|
39
39
|
height: 8px;
|
|
40
40
|
border-radius: 50%;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ApTableProps } from '../../';
|
|
2
2
|
import { UseTableRefreshOption } from './useTableRefresh';
|
|
3
3
|
import { Recordable } from '../../type';
|
|
4
|
+
import { TableColumnsType } from 'ant-design-vue';
|
|
4
5
|
export interface UsePageListApTable extends ApTableProps {
|
|
5
6
|
/** 是否显示默认的行选择配置
|
|
6
7
|
* @default true
|
|
@@ -46,6 +47,7 @@ export declare function usePageListApTable(props?: UsePageListApTable): [ApTable
|
|
|
46
47
|
clearAll: () => void;
|
|
47
48
|
toggleSelect: (item: any) => void;
|
|
48
49
|
} | undefined;
|
|
50
|
+
getShownColumns: () => TableColumnsType<any>;
|
|
49
51
|
} | null | undefined;
|
|
50
52
|
clearSelection: () => void;
|
|
51
53
|
}];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApTransformDataHelper } from '../utils/ap-trans-data';
|
|
2
|
-
import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin, VNode, CSSProperties,
|
|
2
|
+
import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin, Component, VNode, CSSProperties, PublicProps, ShallowUnwrapRef, RendererNode, RendererElement, DefineComponent } from 'vue';
|
|
3
3
|
import { TooltipPlacement, AdjustOverflow } from 'ant-design-vue/es/tooltip';
|
|
4
4
|
import { VueTypeValidableDef } from '../../node_modules/vue-types';
|
|
5
5
|
import { LiteralUnion, Key } from 'ant-design-vue/es/_util/type';
|
|
@@ -19,8 +19,9 @@ import { PresetColorType } from 'ant-design-vue/es/_util/colors';
|
|
|
19
19
|
import { AlignType, BuildInPlacements } from 'ant-design-vue/es/vc-trigger/interface';
|
|
20
20
|
import { ApLadderSlots } from './ap-ladder/interface';
|
|
21
21
|
import { AttachmentItemProps, ApAttachmentProps } from './ap-attachment';
|
|
22
|
+
import { ApCardTitleProps } from './ap-card/interface';
|
|
22
23
|
export * from './hooks/index';
|
|
23
|
-
export type { ApTitleProps } from './title/interface';
|
|
24
|
+
export type { ApTitleProps } from './ap-title/interface';
|
|
24
25
|
export type { ApExpandAlertProps } from './ap-expand-alert/interface';
|
|
25
26
|
export type { ApLabelProps, ApLabelGroupProps, ApLabelGroupItemProps } from './ap-label/interface';
|
|
26
27
|
export type { ApStatusProps, ApStatusGroupProps, ApStatusGroupItemProps } from './ap-status/interface';
|
|
@@ -30,6 +31,7 @@ export type { ApExportGroupProps } from './ap-export-group/interface';
|
|
|
30
31
|
export type { ApLadderProps, ApLadderLabelValue, CurrencyCode, TooltipNeedProps } from './ap-ladder/interface';
|
|
31
32
|
export * from './ap-batch-action-group/interface';
|
|
32
33
|
export type { AttachmentItemProps, ApAttachmentProps } from './ap-attachment';
|
|
34
|
+
export * from './ap-export-group/handleExportDownload';
|
|
33
35
|
export declare const ApTitle: {
|
|
34
36
|
new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
|
|
35
37
|
title: {
|
|
@@ -174,196 +176,62 @@ export declare const ApTitle: {
|
|
|
174
176
|
onClick?: () => void;
|
|
175
177
|
};
|
|
176
178
|
}));
|
|
177
|
-
export declare const ApExpandAlert: {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
type: PropType<string>;
|
|
196
|
-
default: string;
|
|
197
|
-
};
|
|
198
|
-
rows: {
|
|
199
|
-
type: PropType<string | number>;
|
|
200
|
-
required: true;
|
|
201
|
-
default: number;
|
|
202
|
-
};
|
|
203
|
-
tipTitle: {
|
|
204
|
-
type: PropType<string>;
|
|
205
|
-
default: string;
|
|
206
|
-
};
|
|
207
|
-
mapLabel: {
|
|
208
|
-
type: PropType<string>;
|
|
209
|
-
};
|
|
210
|
-
}>> & {
|
|
211
|
-
onExpand?: ((...args: any[]) => any) | undefined;
|
|
212
|
-
onChoose?: ((...args: any[]) => any) | undefined;
|
|
213
|
-
}, {
|
|
214
|
-
setExpand: (state?: boolean) => void;
|
|
215
|
-
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
216
|
-
expand: (...args: any[]) => void;
|
|
217
|
-
choose: (...args: any[]) => void;
|
|
218
|
-
}, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{
|
|
219
|
-
type: {
|
|
220
|
-
type: PropType<"error" | "success" | "info" | "warning" | undefined>;
|
|
221
|
-
required: true;
|
|
222
|
-
default: string;
|
|
223
|
-
};
|
|
224
|
-
data: {
|
|
225
|
-
type: PropType<string | any[]>;
|
|
226
|
-
required: true;
|
|
227
|
-
default: () => never[];
|
|
228
|
-
};
|
|
229
|
-
separator: {
|
|
230
|
-
type: PropType<string>;
|
|
231
|
-
required: true;
|
|
232
|
-
default: string;
|
|
233
|
-
};
|
|
234
|
-
prefix: {
|
|
235
|
-
type: PropType<string>;
|
|
236
|
-
default: string;
|
|
237
|
-
};
|
|
238
|
-
rows: {
|
|
239
|
-
type: PropType<string | number>;
|
|
240
|
-
required: true;
|
|
241
|
-
default: number;
|
|
242
|
-
};
|
|
243
|
-
tipTitle: {
|
|
244
|
-
type: PropType<string>;
|
|
245
|
-
default: string;
|
|
246
|
-
};
|
|
247
|
-
mapLabel: {
|
|
248
|
-
type: PropType<string>;
|
|
249
|
-
};
|
|
250
|
-
}>> & {
|
|
251
|
-
onExpand?: ((...args: any[]) => any) | undefined;
|
|
252
|
-
onChoose?: ((...args: any[]) => any) | undefined;
|
|
253
|
-
}, {
|
|
254
|
-
type: "warning" | "error" | "success" | "info" | undefined;
|
|
255
|
-
data: Array<any> | string;
|
|
256
|
-
separator: string;
|
|
257
|
-
prefix: string;
|
|
258
|
-
rows: string | number;
|
|
259
|
-
tipTitle: string;
|
|
260
|
-
}, true, {}, {}, {
|
|
261
|
-
P: {};
|
|
262
|
-
B: {};
|
|
263
|
-
D: {};
|
|
264
|
-
C: {};
|
|
265
|
-
M: {};
|
|
266
|
-
Defaults: {};
|
|
267
|
-
}, Readonly< ExtractPropTypes<{
|
|
268
|
-
type: {
|
|
269
|
-
type: PropType<"error" | "success" | "info" | "warning" | undefined>;
|
|
270
|
-
required: true;
|
|
271
|
-
default: string;
|
|
272
|
-
};
|
|
273
|
-
data: {
|
|
274
|
-
type: PropType<string | any[]>;
|
|
275
|
-
required: true;
|
|
276
|
-
default: () => never[];
|
|
277
|
-
};
|
|
278
|
-
separator: {
|
|
279
|
-
type: PropType<string>;
|
|
280
|
-
required: true;
|
|
281
|
-
default: string;
|
|
282
|
-
};
|
|
283
|
-
prefix: {
|
|
284
|
-
type: PropType<string>;
|
|
285
|
-
default: string;
|
|
286
|
-
};
|
|
287
|
-
rows: {
|
|
288
|
-
type: PropType<string | number>;
|
|
289
|
-
required: true;
|
|
290
|
-
default: number;
|
|
291
|
-
};
|
|
292
|
-
tipTitle: {
|
|
293
|
-
type: PropType<string>;
|
|
294
|
-
default: string;
|
|
295
|
-
};
|
|
296
|
-
mapLabel: {
|
|
297
|
-
type: PropType<string>;
|
|
298
|
-
};
|
|
299
|
-
}>> & {
|
|
179
|
+
export declare const ApExpandAlert: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
180
|
+
attrs: any;
|
|
181
|
+
slots: Readonly<{
|
|
182
|
+
default(props: any): any;
|
|
183
|
+
item(props: {
|
|
184
|
+
record: T;
|
|
185
|
+
index: number;
|
|
186
|
+
}): any;
|
|
187
|
+
}> & {
|
|
188
|
+
default(props: any): any;
|
|
189
|
+
item(props: {
|
|
190
|
+
record: T;
|
|
191
|
+
index: number;
|
|
192
|
+
}): any;
|
|
193
|
+
};
|
|
194
|
+
emit: (event: "expand" | "choose", ...args: any[]) => void;
|
|
195
|
+
}, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
196
|
+
props: {
|
|
300
197
|
onExpand?: ((...args: any[]) => any) | undefined;
|
|
301
198
|
onChoose?: ((...args: any[]) => any) | undefined;
|
|
302
|
-
|
|
199
|
+
type?: "warning" | "error" | "success" | "info" | "card" | undefined;
|
|
200
|
+
data?: string | T[] | undefined;
|
|
201
|
+
prefix?: string | undefined;
|
|
202
|
+
tipTitle?: string | undefined;
|
|
203
|
+
mapLabel?: string | undefined;
|
|
204
|
+
separator?: ( Component | VNode | string) | undefined;
|
|
205
|
+
separatorStyle?: CSSProperties | undefined;
|
|
206
|
+
contentStyle?: Omit< CSSProperties, "wordBreak" | "overflow" | "display" | "webkitLineClamp" | "webkitBoxOrient"> | undefined;
|
|
207
|
+
prefixStyle?: CSSProperties | undefined;
|
|
208
|
+
rows?: (string | number) | undefined;
|
|
209
|
+
defaultExpand?: boolean | undefined;
|
|
210
|
+
showIcon?: boolean | undefined;
|
|
211
|
+
} & PublicProps;
|
|
212
|
+
expose(exposed: ShallowUnwrapRef<{
|
|
303
213
|
setExpand: (state?: boolean) => void;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
required: true;
|
|
319
|
-
default: string;
|
|
320
|
-
};
|
|
321
|
-
data: {
|
|
322
|
-
type: PropType<string | any[]>;
|
|
323
|
-
required: true;
|
|
324
|
-
default: () => never[];
|
|
325
|
-
};
|
|
326
|
-
separator: {
|
|
327
|
-
type: PropType<string>;
|
|
328
|
-
required: true;
|
|
329
|
-
default: string;
|
|
330
|
-
};
|
|
331
|
-
prefix: {
|
|
332
|
-
type: PropType<string>;
|
|
333
|
-
default: string;
|
|
334
|
-
};
|
|
335
|
-
rows: {
|
|
336
|
-
type: PropType<string | number>;
|
|
337
|
-
required: true;
|
|
338
|
-
default: number;
|
|
339
|
-
};
|
|
340
|
-
tipTitle: {
|
|
341
|
-
type: PropType<string>;
|
|
342
|
-
default: string;
|
|
343
|
-
};
|
|
344
|
-
mapLabel: {
|
|
345
|
-
type: PropType<string>;
|
|
346
|
-
};
|
|
347
|
-
}>> & {
|
|
348
|
-
onExpand?: ((...args: any[]) => any) | undefined;
|
|
349
|
-
onChoose?: ((...args: any[]) => any) | undefined;
|
|
350
|
-
}, {
|
|
351
|
-
setExpand: (state?: boolean) => void;
|
|
352
|
-
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
353
|
-
expand: (...args: any[]) => void;
|
|
354
|
-
choose: (...args: any[]) => void;
|
|
355
|
-
}, string, {
|
|
356
|
-
type: "warning" | "error" | "success" | "info" | undefined;
|
|
357
|
-
data: Array<any> | string;
|
|
358
|
-
separator: string;
|
|
359
|
-
prefix: string;
|
|
360
|
-
rows: string | number;
|
|
361
|
-
tipTitle: string;
|
|
362
|
-
}, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
363
|
-
$slots: {
|
|
364
|
-
default?(_: {}): any;
|
|
214
|
+
}>): void;
|
|
215
|
+
attrs: any;
|
|
216
|
+
slots: Readonly<{
|
|
217
|
+
default(props: any): any;
|
|
218
|
+
item(props: {
|
|
219
|
+
record: T;
|
|
220
|
+
index: number;
|
|
221
|
+
}): any;
|
|
222
|
+
}> & {
|
|
223
|
+
default(props: any): any;
|
|
224
|
+
item(props: {
|
|
225
|
+
record: T;
|
|
226
|
+
index: number;
|
|
227
|
+
}): any;
|
|
365
228
|
};
|
|
366
|
-
|
|
229
|
+
emit: (event: "expand" | "choose", ...args: any[]) => void;
|
|
230
|
+
}>) => VNode<RendererNode, RendererElement, {
|
|
231
|
+
[key: string]: any;
|
|
232
|
+
}> & {
|
|
233
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
234
|
+
};
|
|
367
235
|
export declare const ApLabel: {
|
|
368
236
|
new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
|
|
369
237
|
helpMessage: {
|
|
@@ -2798,5 +2666,54 @@ export declare const ApAttachment: DefineComponent<{
|
|
|
2798
2666
|
attachmentList: AttachmentItemProps[];
|
|
2799
2667
|
fileMorePopoverPlacement: TooltipPlacement;
|
|
2800
2668
|
}, {}>;
|
|
2669
|
+
export declare const ApCard: {
|
|
2670
|
+
new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
|
|
2671
|
+
titleProps: {
|
|
2672
|
+
type: PropType<ApCardTitleProps>;
|
|
2673
|
+
};
|
|
2674
|
+
padding: {
|
|
2675
|
+
type: PropType<string>;
|
|
2676
|
+
};
|
|
2677
|
+
}>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{
|
|
2678
|
+
titleProps: {
|
|
2679
|
+
type: PropType<ApCardTitleProps>;
|
|
2680
|
+
};
|
|
2681
|
+
padding: {
|
|
2682
|
+
type: PropType<string>;
|
|
2683
|
+
};
|
|
2684
|
+
}>>, {}, true, {}, {}, {
|
|
2685
|
+
P: {};
|
|
2686
|
+
B: {};
|
|
2687
|
+
D: {};
|
|
2688
|
+
C: {};
|
|
2689
|
+
M: {};
|
|
2690
|
+
Defaults: {};
|
|
2691
|
+
}, Readonly< ExtractPropTypes<{
|
|
2692
|
+
titleProps: {
|
|
2693
|
+
type: PropType<ApCardTitleProps>;
|
|
2694
|
+
};
|
|
2695
|
+
padding: {
|
|
2696
|
+
type: PropType<string>;
|
|
2697
|
+
};
|
|
2698
|
+
}>>, {}, {}, {}, {}, {}>;
|
|
2699
|
+
__isFragment?: never;
|
|
2700
|
+
__isTeleport?: never;
|
|
2701
|
+
__isSuspense?: never;
|
|
2702
|
+
} & ComponentOptionsBase<Readonly< ExtractPropTypes<{
|
|
2703
|
+
titleProps: {
|
|
2704
|
+
type: PropType<ApCardTitleProps>;
|
|
2705
|
+
};
|
|
2706
|
+
padding: {
|
|
2707
|
+
type: PropType<string>;
|
|
2708
|
+
};
|
|
2709
|
+
}>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
2710
|
+
$slots: {
|
|
2711
|
+
default?(_: {}): any;
|
|
2712
|
+
};
|
|
2713
|
+
}) & ( Plugin & (new (...args: any[]) => {
|
|
2714
|
+
$props: {
|
|
2715
|
+
onClick?: () => void;
|
|
2716
|
+
};
|
|
2717
|
+
}));
|
|
2801
2718
|
export { ApTransformDataHelper };
|
|
2802
2719
|
export * from './ap-table-modal';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@aplus-frontend/utils");require("./hooks/index.js");require("./title/ApTitle.vue.js");require("./ap-expand-alert/ApExpandAlert.vue.js");const t=require("./ap-label/ApLabel.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@aplus-frontend/utils");require("./hooks/index.js");require("./ap-title/ApTitle.vue.js");require("./ap-expand-alert/ApExpandAlert.vue.js");const t=require("./ap-label/ApLabel.js"),r=require("./ap-label/ApLabelGroup.js");require("./ap-status/ApStatus.vue.js");require("./ap-status/ApStatusGroup.vue.js");require("./ap-select-layout/select-layout.vue.js");require("./ap-export-group/ApExportGroup.vue.js");require("./ap-input-radio/ApInputRadio.vue.js");require("./ap-batch-action/ApBatchAction.vue.js");require("./ap-batch-action-group/ApBatchActionGroup.vue.js");require("./ap-image/ApImage.vue.js");require("./ap-ladder/ApLadder.vue.js");const u=require("./ap-attachment/ApAttachment.js");require("./ap-card/ApCard.vue.js");const p=require("../utils/ap-trans-data/index.js");require("./ap-batch-action-group/interface.js");const a=require("./ap-export-group/handleExportDownload.js"),_=require("./ap-table-modal/index.js"),n=require("./ap-title/ApTitle.vue2.js"),s=require("./ap-expand-alert/ApExpandAlert.vue2.js"),o=require("./ap-status/ApStatus.vue2.js"),l=require("./ap-status/ApStatusGroup.vue2.js"),i=require("./ap-select-layout/select-layout.vue2.js"),c=require("./ap-export-group/ApExportGroup.vue2.js"),A=require("./ap-input-radio/ApInputRadio.vue2.js"),d=require("./ap-batch-action/ApBatchAction.vue2.js"),q=require("./ap-batch-action-group/ApBatchActionGroup.vue2.js"),v=require("./ap-image/ApImage.vue2.js"),h=require("./ap-ladder/ApLadder.vue2.js"),f=require("./ap-card/ApCard.vue2.js"),g=e.withInstall(n.default),y=s.default,I=e.withInstall(t.default),G=e.withInstall(o.default),L=e.withInstall(l.default),w=e.withInstall(i.default),x=e.withInstall(c.default),S=A.default,b=d.default,m=r.default,E=q.default,T=v.default,B=e.withInstall(h.default),D=u.default,$=e.withInstall(f.default);exports.ApTransformDataHelper=p.ApTransformDataHelper;exports.handleExportDownload=a.handleExportDownload;exports.ApTableModal=_.default;exports.ApAttachment=D;exports.ApBatchAction=b;exports.ApBatchActionGroup=E;exports.ApCard=$;exports.ApExpandAlert=y;exports.ApExportGroup=x;exports.ApImage=T;exports.ApInputRadio=S;exports.ApLabel=I;exports.ApLabelGroup=m;exports.ApLadder=B;exports.ApSelectLayout=w;exports.ApStatus=G;exports.ApStatusGroup=L;exports.ApTitle=g;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CheckCardGroupProps, CheckCardValueType } from './interface';
|
|
2
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, CSSProperties, PropType } from 'vue';
|
|
3
3
|
declare function __VLS_template(): {
|
|
4
4
|
slots: {
|
|
5
5
|
default?(_: {}): any;
|
|
@@ -17,6 +17,8 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
17
17
|
size: undefined;
|
|
18
18
|
stopPropagation: undefined;
|
|
19
19
|
defaultValue: undefined;
|
|
20
|
+
indicatorSize: undefined;
|
|
21
|
+
style: undefined;
|
|
20
22
|
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
21
23
|
"update:value": (...args: any[]) => void;
|
|
22
24
|
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<CheckCardGroupProps>, {
|
|
@@ -28,10 +30,13 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
28
30
|
size: undefined;
|
|
29
31
|
stopPropagation: undefined;
|
|
30
32
|
defaultValue: undefined;
|
|
33
|
+
indicatorSize: undefined;
|
|
34
|
+
style: undefined;
|
|
31
35
|
}>>> & {
|
|
32
36
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
33
37
|
}, {
|
|
34
38
|
size: "middle" | "small";
|
|
39
|
+
style: CSSProperties;
|
|
35
40
|
value: CheckCardValueType | CheckCardValueType[];
|
|
36
41
|
multiple: boolean;
|
|
37
42
|
disabled: boolean;
|
|
@@ -39,6 +44,7 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
39
44
|
defaultValue: CheckCardValueType | CheckCardValueType[];
|
|
40
45
|
bordered: boolean;
|
|
41
46
|
stopPropagation: boolean | ((event: MouseEvent) => boolean);
|
|
47
|
+
indicatorSize: number;
|
|
42
48
|
}, {}>;
|
|
43
49
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
44
50
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("vue");require("../hooks/index.js");const g=require("./context.js"),m=require("lodash-unified"),y=require("../hooks/useControllableValue.js"),b=i.defineComponent({name:"CheckCardGroup",__name:"group",props:{bordered:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},size:{default:void 0},stopPropagation:{type:[Boolean,Function],default:void 0},indicatorSize:{default:void 0},style:{default:void 0},multiple:{type:Boolean,default:!1},defaultValue:{type:[String,Number,Boolean,Array],default:void 0},value:{type:[String,Number,Boolean,Array],default:void 0},"onUpdate:value":{}},emits:["update:value"],setup(u,{emit:d}){const t=u,s=d,{value:a,updateValue:n}=y.useControllableValue(t,s),r=new Map;function p(e){if(!t.multiple){if(i.unref(a)===e)return;n(e);return}let o=[...i.unref(a)||[]];const v=o.find(l=>l===e);m.isUndefined(v)?o.push(e):o=o.filter(l=>l!==e).filter(l=>r.has(l)),n(o)}function f(e){r.set(e,!0)}function c(e){r.delete(e)}return g.useProvideCheckCard(i.computed(()=>({toggleOption:p,registerValue:f,cancelValue:c,disabled:t.disabled,size:t.size,bordered:t.bordered,loading:t.loading,value:i.unref(a),multiple:t.multiple,stopPropagation:t.stopPropagation,style:t.style,indicatorSize:t.indicatorSize}))),(e,o)=>i.renderSlot(e.$slots,"default")}});exports.default=b;
|
|
@@ -15,16 +15,18 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
15
15
|
bordered: boolean;
|
|
16
16
|
size: string;
|
|
17
17
|
checked: undefined;
|
|
18
|
-
style:
|
|
18
|
+
style: undefined;
|
|
19
19
|
stopPropagation: boolean;
|
|
20
|
+
indicatorSize: undefined;
|
|
20
21
|
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
21
22
|
"update:checked": (...args: any[]) => void;
|
|
22
23
|
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<CheckCardProps>, {
|
|
23
24
|
bordered: boolean;
|
|
24
25
|
size: string;
|
|
25
26
|
checked: undefined;
|
|
26
|
-
style:
|
|
27
|
+
style: undefined;
|
|
27
28
|
stopPropagation: boolean;
|
|
29
|
+
indicatorSize: undefined;
|
|
28
30
|
}>>> & {
|
|
29
31
|
"onUpdate:checked"?: ((...args: any[]) => any) | undefined;
|
|
30
32
|
}, {
|
|
@@ -33,6 +35,7 @@ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypeProp
|
|
|
33
35
|
bordered: boolean;
|
|
34
36
|
checked: boolean;
|
|
35
37
|
stopPropagation: boolean | ((event: MouseEvent) => boolean);
|
|
38
|
+
indicatorSize: number;
|
|
36
39
|
}, {}>;
|
|
37
40
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
38
41
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),S=require("ant-design-vue");require("../config-provider/index.js");require("../hooks/index.js");const k=require("lodash-unified"),V=require("./context.js");require("./style/index.css");const q=require("./checked.svg.js"),P=require("../config-provider/hooks/use-namespace.js"),_=require("../hooks/useControllableValue.js"),w=["src"],T=t.defineComponent({name:"CheckCard",__name:"index",props:{bordered:{type:Boolean,default:!0},disabled:{type:Boolean},loading:{type:Boolean},size:{default:"middle"},stopPropagation:{type:[Boolean,Function],default:!1},indicatorSize:{default:void 0},style:{default:void 0},checked:{type:Boolean,default:void 0},"onUpdate:checked":{},defaultChecked:{type:Boolean},value:{type:[String,Number,Boolean]},title:{},content:{}},emits:["update:checked"],setup(h,{emit:b}){const o=h,{b:s,m:u,e:d,em:p}=P.useNamespace("check-card"),y=b,l=V.useInjectCheckCard(),{value:r,updateValue:f}=_.useControllableValue(o,y,{valuePropName:"checked",defaultValuePropName:"defaultChecked"}),a=t.computed(()=>{const e={...o},n=t.unref(l);return n&&(e.disabled=e.disabled||n.disabled,e.bordered=e.bordered||n.bordered,e.loading=e.loading||n.loading,e.size=e.size||n.size,e.indicatorSize=e.indicatorSize||n.indicatorSize,e.stopPropagation=e.stopPropagation||n.stopPropagation,e.style=e.style?e.style:n.style),e}),C=t.computed(()=>{const e=t.unref(a);return[s(),...e.disabled?[]:[s(),t.unref(r)?u("checked"):null],u(e.size),e.bordered?u("bordered"):null,e.disabled?u("disabled"):null]}),B=t.computed(()=>{const e=t.unref(a);return{...e.style||{},"--check-card-indicator-size":`${e.indicatorSize||16}px`}}),m=t.computed(()=>{const e=o.title;if(!e)return;const n=k.isFunction(e)?e(t.unref(r)):t.createVNode("span",null,[e]);return t.createVNode("div",{class:[d("title"),a.value.disabled?p("title","disabled"):null]},[n])}),v=t.computed(()=>{if(!o.content)return;const e=k.isFunction(o.content)?o.content(t.unref(r)):o.content;return t.createVNode("div",{class:[d("content"),a.value.disabled?p("content","disabled"):null]},[e])});function z(e){const n=t.unref(a).stopPropagation;return n?n===!0?e.target!==e.currentTarget:n(e):!1}function N(e){var n,c;z(e)||a.value.loading||a.value.disabled||(l.value?(c=(n=l.value)==null?void 0:n.toggleOption)==null||c.call(n,o.value):f(!t.unref(r)))}return t.watch(()=>l.value,e=>{if(!e)return;const n=e.multiple?(e.value||[]).includes(o.value):e.value===o.value;f(n)},{immediate:!0}),t.watchEffect(e=>{var n,c;(c=(n=l.value)==null?void 0:n.registerValue)==null||c.call(n,o.value),e(()=>{var i,g;return(g=(i=l.value)==null?void 0:i.cancelValue)==null?void 0:g.call(i,o.value)})}),(e,n)=>(t.openBlock(),t.createElementBlock("div",{style:t.normalizeStyle(B.value),class:t.normalizeClass(C.value),onClick:t.withModifiers(N,["stop"])},[a.value.loading?(t.openBlock(),t.createBlock(t.unref(S.Skeleton),{key:0,active:""})):t.renderSlot(e.$slots,"default",{key:1,checked:t.unref(r)},()=>[m.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(m.value),{key:0})):t.createCommentVNode("",!0),v.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(v.value),{key:1})):t.createCommentVNode("",!0)]),t.unref(r)?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(t.unref(d)("checked-icon"))},[t.createElementVNode("img",{src:t.unref(q.default)},null,8,w)],2)):t.createCommentVNode("",!0)],6))}});exports.default=T;
|
|
@@ -24,6 +24,14 @@ type CheckCardCommonType = {
|
|
|
24
24
|
* 是否阻止点击事件冒泡(对于自定义内容包含输入控件时需要设置)
|
|
25
25
|
*/
|
|
26
26
|
stopPropagation?: boolean | ((event: MouseEvent) => boolean);
|
|
27
|
+
/**
|
|
28
|
+
* 选中指示器的尺寸
|
|
29
|
+
*/
|
|
30
|
+
indicatorSize?: number;
|
|
31
|
+
/**
|
|
32
|
+
* 可选卡片容器样式
|
|
33
|
+
*/
|
|
34
|
+
style?: CSSProperties;
|
|
27
35
|
};
|
|
28
36
|
export type CheckCardProps = CheckCardCommonType & {
|
|
29
37
|
/**
|
|
@@ -51,6 +59,10 @@ export type CheckCardProps = CheckCardCommonType & {
|
|
|
51
59
|
* 内容
|
|
52
60
|
*/
|
|
53
61
|
content?: string | ((checked: boolean) => VNode);
|
|
62
|
+
/**
|
|
63
|
+
* 指定选中指示器的尺寸
|
|
64
|
+
*/
|
|
65
|
+
indicatorSize?: number;
|
|
54
66
|
};
|
|
55
67
|
export type CheckCardGroupValueType = CheckCardValueType | CheckCardValueType[] | undefined;
|
|
56
68
|
export type CheckCardGroupProps = CheckCardCommonType & {
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
opacity: 0;
|
|
22
22
|
inset-block-start: -2px;
|
|
23
23
|
inset-inline-end: -2px;
|
|
24
|
-
border-inline-start: 16px solid transparent;
|
|
25
|
-
border-block-end: 16px solid transparent;
|
|
24
|
+
border-inline-start: var(--check-card-indicator-size, 16px) solid transparent;
|
|
25
|
+
border-block-end: var(--check-card-indicator-size, 16px) solid transparent;
|
|
26
26
|
border-radius: 4px;
|
|
27
27
|
}
|
|
28
28
|
.aplus-check-card--checked {
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
}
|
|
34
34
|
.aplus-check-card--checked::after {
|
|
35
35
|
opacity: 1;
|
|
36
|
-
border: 16px solid var(--check-card-checked-bg, #0070ff);
|
|
37
|
-
border-inline-start: 16px solid transparent;
|
|
38
|
-
border-block-end: 16px solid transparent;
|
|
36
|
+
border: var(--check-card-indicator-size, 16px) solid var(--check-card-checked-bg, #0070ff);
|
|
37
|
+
border-inline-start: var(--check-card-indicator-size, 16px) solid transparent;
|
|
38
|
+
border-block-end: var(--check-card-indicator-size, 16px) solid transparent;
|
|
39
39
|
inset-block-start: -2px;
|
|
40
40
|
inset-inline-end: -2px;
|
|
41
41
|
transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
@@ -75,3 +75,6 @@
|
|
|
75
75
|
-moz-user-select: none;
|
|
76
76
|
user-select: none;
|
|
77
77
|
}
|
|
78
|
+
.aplus-check-card__checked-icon > img {
|
|
79
|
+
width: calc(var(--check-card-indicator-size, 16px) - 2px);
|
|
80
|
+
}
|