@aplus-frontend/ui 0.1.26 → 0.1.27
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/src/ap-download/ap-download.vue.d.ts +7 -3
- package/es/src/ap-download/ap-download.vue.mjs +50 -35
- package/es/src/ap-download/interface.d.ts +3 -11
- package/es/src/ap-download/style/ap-download.css +3 -0
- package/es/src/ap-table/ap-table.vue.mjs +231 -183
- package/es/src/ap-table/components/interface.d.ts +33 -1
- package/es/src/ap-table/components/setting/images/icon_carst_down.svg.mjs +4 -0
- package/es/src/ap-table/components/setting/images/icon_fill_right.svg.mjs +4 -0
- package/es/src/ap-table/components/setting/modal/index.vue.d.ts +28 -0
- package/es/src/ap-table/components/setting/modal/index.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +152 -0
- package/es/src/ap-table/components/setting/select-group/index.vue.d.ts +13 -0
- package/es/src/ap-table/components/setting/select-group/index.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +96 -0
- package/es/src/ap-table/components/setting/sortable/index.vue.d.ts +13 -0
- package/es/src/ap-table/components/setting/sortable/index.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +51 -0
- package/es/src/ap-table/components/setting/sortable/item.vue.d.ts +20 -0
- package/es/src/ap-table/components/setting/sortable/item.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +140 -0
- package/es/src/ap-table/components/setting/sorter/context.d.ts +11 -0
- package/es/src/ap-table/components/setting/sorter/context.mjs +20 -0
- package/es/src/ap-table/components/setting/sorter/index.vue.d.ts +18 -0
- package/es/src/ap-table/components/setting/sorter/index.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +199 -0
- package/es/src/ap-table/components/setting/tree-select/index.vue.d.ts +13 -0
- package/es/src/ap-table/components/setting/tree-select/index.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +75 -0
- package/es/src/ap-table/components/setting/utils.d.ts +17 -0
- package/es/src/ap-table/components/setting/utils.mjs +48 -0
- package/es/src/ap-table/components/style/setting/modal.css +39 -0
- package/es/src/ap-table/components/style/setting/select-group.css +7 -0
- package/es/src/ap-table/components/style/setting/sortable-item-meta.css +50 -0
- package/es/src/ap-table/components/style/setting/sortable-item.css +3 -0
- package/es/src/ap-table/components/style/setting/sorter.css +26 -0
- package/es/src/ap-table/constants.d.ts +31 -8
- package/es/src/ap-table/constants.mjs +41 -53
- package/es/src/ap-table/context.d.ts +31 -0
- package/es/src/ap-table/context.mjs +20 -0
- package/es/src/ap-table/hooks/use-table-column-state.d.ts +18 -0
- package/es/src/ap-table/hooks/use-table-column-state.mjs +46 -0
- package/es/src/ap-table/hooks/use-table-content-height.mjs +19 -19
- package/es/src/ap-table/hooks/use-table-paging.d.ts +1 -0
- package/es/src/ap-table/hooks/use-table-paging.mjs +87 -82
- package/es/src/ap-table/interface.d.ts +51 -1
- package/es/src/ap-table/style/ap-table.css +29 -1
- package/es/src/ap-table/utils.d.ts +1 -1
- package/es/src/ap-table/utils.mjs +82 -82
- package/es/src/business/ap-attachment/ApAttachment.d.ts +1 -1
- package/es/src/business/ap-attachment/ApAttachment.mjs +45 -42
- package/es/src/business/ap-attachment/style.css +2 -0
- package/es/src/business/hooks/usePageListApTable.d.ts +2 -2
- package/es/src/business/index.d.ts +1 -1
- package/es/src/editable-table/interface.d.ts +1 -1
- package/es/src/locale/lang/en.mjs +14 -0
- package/es/src/locale/lang/zh-cn.mjs +14 -0
- package/es/src/theme/ap-attachment/ap-attachment.css +2 -0
- package/es/src/theme/ap-download/ap-download.css +3 -0
- package/es/src/theme/ap-table/ap-table.css +29 -1
- package/es/src/theme/ap-table/setting/modal.css +39 -0
- package/es/src/theme/ap-table/setting/select-group.css +7 -0
- package/es/src/theme/ap-table/setting/sortable-item-meta.css +50 -0
- package/es/src/theme/ap-table/setting/sortable-item.css +3 -0
- package/es/src/theme/ap-table/setting/sorter.css +26 -0
- package/es/src/theme/css-var/index.mjs +22 -12
- package/lib/src/ap-download/ap-download.vue.d.ts +7 -3
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-download/interface.d.ts +3 -11
- package/lib/src/ap-download/style/ap-download.css +3 -0
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/components/interface.d.ts +33 -1
- package/lib/src/ap-table/components/setting/images/icon_carst_down.svg.js +1 -0
- package/lib/src/ap-table/components/setting/images/icon_fill_right.svg.js +1 -0
- package/lib/src/ap-table/components/setting/modal/index.vue.d.ts +28 -0
- package/lib/src/ap-table/components/setting/modal/index.vue.js +1 -0
- package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/select-group/index.vue.d.ts +13 -0
- package/lib/src/ap-table/components/setting/select-group/index.vue.js +1 -0
- package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/sortable/index.vue.d.ts +13 -0
- package/lib/src/ap-table/components/setting/sortable/index.vue.js +1 -0
- package/lib/src/ap-table/components/setting/sortable/index.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/sortable/item.vue.d.ts +20 -0
- package/lib/src/ap-table/components/setting/sortable/item.vue.js +1 -0
- package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/sorter/context.d.ts +11 -0
- package/lib/src/ap-table/components/setting/sorter/context.js +1 -0
- package/lib/src/ap-table/components/setting/sorter/index.vue.d.ts +18 -0
- package/lib/src/ap-table/components/setting/sorter/index.vue.js +1 -0
- package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/tree-select/index.vue.d.ts +13 -0
- package/lib/src/ap-table/components/setting/tree-select/index.vue.js +1 -0
- package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/utils.d.ts +17 -0
- package/lib/src/ap-table/components/setting/utils.js +1 -0
- package/lib/src/ap-table/components/style/setting/modal.css +39 -0
- package/lib/src/ap-table/components/style/setting/select-group.css +7 -0
- package/lib/src/ap-table/components/style/setting/sortable-item-meta.css +50 -0
- package/lib/src/ap-table/components/style/setting/sortable-item.css +3 -0
- package/lib/src/ap-table/components/style/setting/sorter.css +26 -0
- package/lib/src/ap-table/constants.d.ts +31 -8
- package/lib/src/ap-table/constants.js +1 -1
- package/lib/src/ap-table/context.d.ts +31 -0
- package/lib/src/ap-table/context.js +1 -0
- package/lib/src/ap-table/hooks/use-table-column-state.d.ts +18 -0
- package/lib/src/ap-table/hooks/use-table-column-state.js +1 -0
- package/lib/src/ap-table/hooks/use-table-content-height.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging.d.ts +1 -0
- package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
- package/lib/src/ap-table/interface.d.ts +51 -1
- package/lib/src/ap-table/style/ap-table.css +29 -1
- package/lib/src/ap-table/utils.d.ts +1 -1
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.d.ts +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-attachment/style.css +2 -0
- package/lib/src/business/hooks/usePageListApTable.d.ts +2 -2
- package/lib/src/business/index.d.ts +1 -1
- package/lib/src/editable-table/interface.d.ts +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-attachment/ap-attachment.css +2 -0
- package/lib/src/theme/ap-download/ap-download.css +3 -0
- package/lib/src/theme/ap-table/ap-table.css +29 -1
- package/lib/src/theme/ap-table/setting/modal.css +39 -0
- package/lib/src/theme/ap-table/setting/select-group.css +7 -0
- package/lib/src/theme/ap-table/setting/sortable-item-meta.css +50 -0
- package/lib/src/theme/ap-table/setting/sortable-item.css +3 -0
- package/lib/src/theme/ap-table/setting/sorter.css +26 -0
- package/lib/src/theme/css-var/index.js +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
.aplus-sortable-item-meta {
|
|
2
|
+
padding: 6px 8px;
|
|
3
|
+
margin-top: 4px;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: row;
|
|
6
|
+
flex-wrap: nowrap;
|
|
7
|
+
justify-content: space-between;
|
|
8
|
+
align-items: center;
|
|
9
|
+
}
|
|
10
|
+
.aplus-sortable-item-meta:hover {
|
|
11
|
+
background-color: #F1F7FF;
|
|
12
|
+
border-radius: 2px;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
}
|
|
15
|
+
.aplus-sortable-item-meta:hover .aplus-sortable-item-meta-right {
|
|
16
|
+
display: block;
|
|
17
|
+
}
|
|
18
|
+
.aplus-sortable-item-meta:hover .aplus-sortable-item-meta-left__holder {
|
|
19
|
+
color: var(--basic-color-primary, #0070ff) !important;
|
|
20
|
+
}
|
|
21
|
+
.aplus-sortable-item-meta-left {
|
|
22
|
+
flex: 1;
|
|
23
|
+
display: inline-flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
min-width: 0;
|
|
26
|
+
}
|
|
27
|
+
.aplus-sortable-item-meta-left__indicator {
|
|
28
|
+
display: inline-flex;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
align-items: center;
|
|
31
|
+
width: 16px;
|
|
32
|
+
height: 16px;
|
|
33
|
+
margin-right: 4px;
|
|
34
|
+
flex-shrink: 0;
|
|
35
|
+
}
|
|
36
|
+
.aplus-sortable-item-meta-left__label-wrapper {
|
|
37
|
+
white-space: nowrap;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
text-overflow: ellipsis;
|
|
40
|
+
}
|
|
41
|
+
.aplus-sortable-item-meta-right {
|
|
42
|
+
display: none;
|
|
43
|
+
padding-left: 12px;
|
|
44
|
+
}
|
|
45
|
+
.aplus-sortable-item-meta .is-level2 {
|
|
46
|
+
margin-left: 16px;
|
|
47
|
+
}
|
|
48
|
+
.aplus-sortable-item-meta-action-icon:hover {
|
|
49
|
+
color: var(--basic-color-primary, #0070ff);
|
|
50
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.aplus-column-setting-sorter {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
height: 100%;
|
|
5
|
+
}
|
|
6
|
+
.aplus-column-setting-sorter-section-title {
|
|
7
|
+
font-size: 12px;
|
|
8
|
+
line-height: 20px;
|
|
9
|
+
color: #8896b0;
|
|
10
|
+
padding: 2px 8px;
|
|
11
|
+
margin: 4px;
|
|
12
|
+
}
|
|
13
|
+
.aplus-column-setting-sorter-header {
|
|
14
|
+
padding: 16px 20px;
|
|
15
|
+
}
|
|
16
|
+
.aplus-column-setting-sorter-header-title {
|
|
17
|
+
font-size: 14px;
|
|
18
|
+
line-height: 22px;
|
|
19
|
+
font-weight: bold;
|
|
20
|
+
color: #182948;
|
|
21
|
+
}
|
|
22
|
+
.aplus-column-setting-sorter-content {
|
|
23
|
+
flex: 1;
|
|
24
|
+
overflow-y: auto;
|
|
25
|
+
padding: 8px 12px 12px 8px;
|
|
26
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApFieldPassword } from '../ap-field';
|
|
2
2
|
import { ApTableValueFields, ValueEnum } from './interface';
|
|
3
|
-
import {
|
|
3
|
+
import { CreateComponentPublicInstance, ExtractPropTypes, PropType, HTMLAttributes, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, VNode, RendererNode, RendererElement, CSSProperties, DefineComponent, PublicProps, ComputedRef } from 'vue';
|
|
4
4
|
import { ColSize } from 'ant-design-vue/es/grid';
|
|
5
5
|
import { ApFieldDateProps, ApFormItemSlots, ApFieldDateRangeProps, ApFieldNumberProps, ApFieldRadioProps, ApFieldSelectProps, ApFieldSwitchProps, ApFieldTextProps, ApFormItemTextPassword, ApFieldTextAreaProps, ApFieldCheckboxProps, ApFieldTextPasswordProps, FieldMode, GroupActionTypes } from '..';
|
|
6
6
|
import { RuleObject } from 'ant-design-vue/es/form';
|
|
@@ -5242,7 +5242,11 @@ export declare const apTableFormItemMap: {
|
|
|
5242
5242
|
focus: (options?: InputFocusOptions) => void;
|
|
5243
5243
|
blur: () => void;
|
|
5244
5244
|
input: any;
|
|
5245
|
-
setSelectionRange: (start: number, end: number, direction
|
|
5245
|
+
setSelectionRange: (start: number, end: number, direction
|
|
5246
|
+
/**
|
|
5247
|
+
* 不需要渲染到Form表单的valueType字段
|
|
5248
|
+
*/
|
|
5249
|
+
?: "forward" | "backward" | "none") => void;
|
|
5246
5250
|
select: () => void;
|
|
5247
5251
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{
|
|
5248
5252
|
label: {
|
|
@@ -5653,7 +5657,11 @@ export declare const apTableFormItemMap: {
|
|
|
5653
5657
|
focus: (options?: InputFocusOptions) => void;
|
|
5654
5658
|
blur: () => void;
|
|
5655
5659
|
input: any;
|
|
5656
|
-
setSelectionRange: (start: number, end: number, direction
|
|
5660
|
+
setSelectionRange: (start: number, end: number, direction
|
|
5661
|
+
/**
|
|
5662
|
+
* 不需要渲染到Form表单的valueType字段
|
|
5663
|
+
*/
|
|
5664
|
+
?: "forward" | "backward" | "none") => void;
|
|
5657
5665
|
select: () => void;
|
|
5658
5666
|
}, {}, {}, {}, {
|
|
5659
5667
|
disabled: boolean;
|
|
@@ -5866,7 +5874,11 @@ export declare const apTableFormItemMap: {
|
|
|
5866
5874
|
focus: (options?: InputFocusOptions) => void;
|
|
5867
5875
|
blur: () => void;
|
|
5868
5876
|
input: any;
|
|
5869
|
-
setSelectionRange: (start: number, end: number, direction
|
|
5877
|
+
setSelectionRange: (start: number, end: number, direction
|
|
5878
|
+
/**
|
|
5879
|
+
* 不需要渲染到Form表单的valueType字段
|
|
5880
|
+
*/
|
|
5881
|
+
?: "forward" | "backward" | "none") => void;
|
|
5870
5882
|
select: () => void;
|
|
5871
5883
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
5872
5884
|
disabled: boolean;
|
|
@@ -13919,7 +13931,11 @@ export declare const apTableRenderItemMap: {
|
|
|
13919
13931
|
focus: (options?: InputFocusOptions) => void;
|
|
13920
13932
|
blur: () => void;
|
|
13921
13933
|
input: any;
|
|
13922
|
-
setSelectionRange: (start: number, end: number, direction
|
|
13934
|
+
setSelectionRange: (start: number, end: number, direction
|
|
13935
|
+
/**
|
|
13936
|
+
* 不需要渲染到Form表单的valueType字段
|
|
13937
|
+
*/
|
|
13938
|
+
?: "forward" | "backward" | "none") => void;
|
|
13923
13939
|
select: () => void;
|
|
13924
13940
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
13925
13941
|
"update:value": (...args: any[]) => void;
|
|
@@ -14229,7 +14245,11 @@ export declare const apTableRenderItemMap: {
|
|
|
14229
14245
|
focus: (options?: InputFocusOptions) => void;
|
|
14230
14246
|
blur: () => void;
|
|
14231
14247
|
input: any;
|
|
14232
|
-
setSelectionRange: (start: number, end: number, direction
|
|
14248
|
+
setSelectionRange: (start: number, end: number, direction
|
|
14249
|
+
/**
|
|
14250
|
+
* 不需要渲染到Form表单的valueType字段
|
|
14251
|
+
*/
|
|
14252
|
+
?: "forward" | "backward" | "none") => void;
|
|
14233
14253
|
select: () => void;
|
|
14234
14254
|
}, {}, {}, {}, {
|
|
14235
14255
|
type: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "image" | "tel" | "url" | "email" | "datetime-local" | "file" | "password";
|
|
@@ -14390,7 +14410,11 @@ export declare const apTableRenderItemMap: {
|
|
|
14390
14410
|
focus: (options?: InputFocusOptions) => void;
|
|
14391
14411
|
blur: () => void;
|
|
14392
14412
|
input: any;
|
|
14393
|
-
setSelectionRange: (start: number, end: number, direction
|
|
14413
|
+
setSelectionRange: (start: number, end: number, direction
|
|
14414
|
+
/**
|
|
14415
|
+
* 不需要渲染到Form表单的valueType字段
|
|
14416
|
+
*/
|
|
14417
|
+
?: "forward" | "backward" | "none") => void;
|
|
14394
14418
|
select: () => void;
|
|
14395
14419
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
14396
14420
|
"update:value": (...args: any[]) => void;
|
|
@@ -15632,4 +15656,3 @@ export declare const apTableRenderItemMap: {
|
|
|
15632
15656
|
* 不需要渲染到Form表单的valueType字段
|
|
15633
15657
|
*/
|
|
15634
15658
|
export declare const noRenderAsFormItemValueList: (keyof ApTableValueFields)[];
|
|
15635
|
-
export declare const ellipsisTitleStyle: CSSProperties;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../ap-action/index.js");require("../ap-field/index.js");require("../ap-form/index.js");require("./components/index/index.vue.js");require("./components/status/index.vue.js");const t=require("../ap-form/items/date/index.vue.js"),_=require("../ap-form/items/date-range/index.vue.js"),u=require("../ap-form/items/number/index.vue.js"),r=require("../ap-form/items/radio/index.vue.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../ap-action/index.js");require("../ap-field/index.js");require("../ap-form/index.js");require("./components/index/index.vue.js");require("./components/status/index.vue.js");const t=require("../ap-form/items/date/index.vue.js"),_=require("../ap-form/items/date-range/index.vue.js"),u=require("../ap-form/items/number/index.vue.js"),r=require("../ap-form/items/radio/index.vue.js"),s=require("../ap-form/items/select/index.vue.js"),i=require("../ap-form/items/switch/index.vue.js"),e=require("../ap-form/items/text/index.js"),n=require("../ap-form/items/text-area/index.vue.js"),p=require("../ap-form/items/checkbox/index.vue.js"),a=require("../ap-field/date/index.vue.js"),d=require("../ap-field/date-range/index.vue.js"),c=require("../ap-field/number/index.vue.js"),l=require("../ap-field/radio/index.vue.js"),o=require("../ap-field/select/index.vue.js"),v=require("../ap-field/switch/index.vue.js"),x=require("../ap-field/text/index.js"),q=require("../ap-field/text-area/index.vue.js"),g=require("../ap-field/checkbox/index.vue.js"),f=require("../ap-action/group/index.vue.js"),y=require("./components/index/index.vue2.js"),$=require("./components/status/index.vue2.js"),m=require("../ap-field/text/password.vue.js"),b={date:t.default,dateRange:_.default,number:u.default,radio:r.default,select:s.default,switch:i.default,text:e.ApFormItemText,textArea:n.default,checkbox:p.default,password:e.ApFormItemText.Password},I={date:a.default,dateRange:d.default,number:c.default,radio:l.default,select:o.default,switch:v.default,text:x.ApFieldText,textArea:q.default,checkbox:g.default,action:f.default,index:y.default,status:$.default,password:m.default},T=["action","index"];exports.apTableFormItemMap=b;exports.apTableRenderItemMap=I;exports.noRenderAsFormItemValueList=T;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ColumnType } from 'ant-design-vue/es/table';
|
|
2
|
+
import { ComputedRef, InjectionKey } from 'vue';
|
|
3
|
+
import { ApTableProps } from './interface';
|
|
4
|
+
type TableSize = ApTableProps['size'];
|
|
5
|
+
type ApTableContextProps<RecordType> = {
|
|
6
|
+
/**
|
|
7
|
+
* 表格列配置
|
|
8
|
+
*/
|
|
9
|
+
columns?: ComputedRef<ColumnType<RecordType>[]>;
|
|
10
|
+
/**
|
|
11
|
+
* 表格列配置备份(只有在props变更后才会变更)
|
|
12
|
+
*/
|
|
13
|
+
columnsBackup?: ComputedRef<ColumnType<RecordType>[]>;
|
|
14
|
+
/**
|
|
15
|
+
* 更新数据源的方法
|
|
16
|
+
* @param name
|
|
17
|
+
* @param value
|
|
18
|
+
* @param triggerChange 是否触发外部的`onValuesChange`函数
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
updateColumns?: (nextColumns: ColumnType<RecordType>[]) => void;
|
|
22
|
+
/**
|
|
23
|
+
* ApForm内部实例
|
|
24
|
+
*/
|
|
25
|
+
size?: ComputedRef<TableSize>;
|
|
26
|
+
updateSize?: (nextSize: TableSize) => void;
|
|
27
|
+
};
|
|
28
|
+
export declare const ApTableContextKey: InjectionKey<ApTableContextProps<any>>;
|
|
29
|
+
export declare function useProvideApTable<ModelType>(state: ApTableContextProps<ModelType>): void;
|
|
30
|
+
export declare function useInjectApTable(): ApTableContextProps<any>;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=Symbol("apTableContextKey");function u(o){e.provide(t,o)}function n(){return e.inject(t,{columns:e.computed(()=>[]),updateColumns:()=>{},size:e.computed(()=>"middle"),updateSize:()=>{}})}exports.ApTableContextKey=t;exports.useInjectApTable=n;exports.useProvideApTable=u;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ApColumnState } from '../interface';
|
|
2
|
+
import { Ref, ComputedRef } from 'vue';
|
|
3
|
+
export declare const useTableColumnState: (initialColumnState: ApColumnState[]) => {
|
|
4
|
+
columnState: Ref<{
|
|
5
|
+
key: string | number;
|
|
6
|
+
show?: boolean | undefined;
|
|
7
|
+
fixed?: ("left" | "right") | undefined;
|
|
8
|
+
disabled?: boolean | undefined;
|
|
9
|
+
label?: any;
|
|
10
|
+
children?: any[] | undefined;
|
|
11
|
+
}[]>;
|
|
12
|
+
selectAll: () => void;
|
|
13
|
+
unSelectAll: () => void;
|
|
14
|
+
toggleSelect: (key: string, show?: boolean) => void;
|
|
15
|
+
setColumnState: (nextColumnState: ApColumnState[]) => void;
|
|
16
|
+
isAllSelected: ComputedRef<boolean>;
|
|
17
|
+
toggleSelectAll: () => void;
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),d=require("../../utils/index.js");function r(s,e){s.forEach(u=>{var o;e(u),(o=u.children)!=null&&o.length&&r(u.children,e)})}const h=s=>{const e=l.ref(s),u=l.computed(()=>l.unref(e).every(t=>t.show));function o(){const t=l.unref(e);r(t,n=>{!n.disabled&&(n.show=!0)})}function f(){const t=l.unref(e);r(t,n=>{!n.disabled&&(n.show=!1)})}function i(){l.unref(u)?f():o()}function a(t,n){r(l.unref(e),c=>{c.key===t&&(c.show=d.isDef(n)?n:!c.show)})}function S(t){e.value=t}return{columnState:e,selectAll:o,unSelectAll:f,toggleSelect:a,setColumnState:S,isAllSelected:u,toggleSelectAll:i}};exports.useTableColumnState=h;
|
|
@@ -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 S=require("@vueuse/core"),r=require("vue");function f(t){if(!t)return 0;const e=parseFloat(t);return Number.isNaN(e)?0:e}function d(t){if(!t)return 0;const e=getComputedStyle(t);return t.clientHeight+f(e.marginTop)+f(e.marginBottom)}const b=t=>{const e=r.ref(),{height:p}=S.useElementSize(e),i=r.ref();let u=!1;const H=r.computed(()=>{var c,l,g,s,h;const n=((l=(c=e.value)==null?void 0:c.querySelector(".aplus-ap-table-header-wrapper"))==null?void 0:l.clientHeight)||0,a=((s=(g=e.value)==null?void 0:g.querySelector(".ant-table-header"))==null?void 0:s.clientHeight)||47,o=(h=e.value)==null?void 0:h.querySelector(".ant-pagination"),m=o?d(o):r.unref(i);return o&&(u=!0),Math.ceil(r.unref(p)-a-n-(m||0)-((t==null?void 0:t.offset)||0))});return r.onUpdated(()=>{var a;if(u)return;const n=(a=e.value)==null?void 0:a.querySelector(".ant-pagination");if(!n){i.value=0;return}i.value=d(n),u=!0}),{contentRef:e,height:H}};exports.default=b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),O=require("../utils.js"),Y=require("lodash-unified");require("../../config-provider/index.js");const Z=require("../../config-provider/hooks/use-locale.js"),_=require("../../config-provider/hooks/use-namespace.js"),I=({manual:j=!1,defaultCurrent:D=1,defaultPageSize:V=10,request:R,defaultParams:M={},defaultData:A=[],formatParams:x,paramsValueTypeMap:z,resetFieldsIgnores:q,filterFields:B,sortFields:E,showLessItems:P=!1,showTotal:L=!0})=>{let S=0,f={};const $=e=>x?x(e):e,l=t.ref(),i=t.ref(D),g=t.ref(V),{t:T}=Z.useLocale(),{b:F}=_.useNamespace("ap-table"),r=t.ref({total:0,records:A,loading:!1}),y=async e=>{var o;const n=$(e),a=Date.now();S=a,r.value.loading=!0;try{const s=await R({...M,...n});S===a&&(r.value.total=s.total||((o=s.data)==null?void 0:o.length)||0,r.value.records=[...s.data||[]])}catch{S===a&&(r.value.records=[],r.value.total=0)}finally{r.value.loading=!1}},N=e=>{const n={};return Object.entries(e).forEach(([a,o])=>{if(n[a]=o,z&&o){const s=z[a];s&&(n[a]=O.parseFieldValue(s,o))}}),n},J=async e=>{var o,s,p,d,h,c,v;const n=((s=(o=l.value)==null?void 0:o.apForm)==null?void 0:s.getFieldsValue())||{},a={};Object.entries(n).forEach(([m,u])=>{q&&q.indexOf(m)>-1&&(a[m]=u)}),await((d=(p=l.value)==null?void 0:p.apForm)==null?void 0:d.resetFields()),(v=(c=(h=l.value)==null?void 0:h.apForm)==null?void 0:c.setFieldsValue)==null||v.call(c,a),t.nextTick(()=>{e==null||e()})},b=e=>{f=e;const n=N(e);y(n)},Q=e=>{b({...f,...e})},w=()=>{var n,a;const e=((a=(n=l.value)==null?void 0:n.apForm)==null?void 0:a.getFieldsValue(!0))||{};i.value=1,b({...e,current:1,pageSize:f.pageSize||V})},U=()=>{J(w)},G=()=>{b(f)},H=e=>{const n=t.unref(r).total-e,a=Math.ceil(n/t.unref(g)),o=t.unref(i)>a?a:t.unref(i);Q({current:o>0?o:1})},C=(e,n,a)=>{var h,c,v,m;const o=((c=(h=l.value)==null?void 0:h.apForm)==null?void 0:c.getFieldsValue(!0))||{};i.value=e.current,g.value=e.pageSize;const s=Y.isArray(a)?[...a]:[a],p={};for(const u of s)(v=t.unref(E))!=null&&v.includes(u.field)&&(p[O.dataIndexToStr(u.field)]=u.order);const d={};for(const u of Object.keys(n))(m=t.unref(B))!=null&&m.includes(u)&&(d[u]=n[u]);b({...o,filter:d,sort:p,current:e.current,pageSize:e.pageSize})};t.onMounted(()=>{var n,a;const e=((a=(n=l.value)==null?void 0:n.apForm)==null?void 0:a.getFieldsValue(!0))||{};if(f={current:t.unref(i),pageSize:t.unref(g),...e},!j){const o=N(f);y(o)}});const K=t.computed(()=>t.unref(r).total===0?"-":`${t.unref(i.value)}/${Math.ceil(t.unref(r).total/t.unref(g))}`);function W(e){e!=null&&e.length&&(r.value.records=e,r.value.total=e.length)}const X=t.computed(()=>({loading:t.unref(r).loading,pagination:{current:t.unref(i),pageSize:t.unref(g),total:t.unref(r).total,showSizeChanger:!P,showQuickJumper:!P,showLessItems:P,size:"default",showTotal:L?e=>t.createVNode("span",{class:F("pagination-total-wrapper")},[T("ap.apTable.pagination.totalLeftPrefix")," ",t.createVNode("span",{class:F("pagination-count-text")},[e])," ",T("ap.apTable.pagination.totalLeftSuffix"),t.createVNode("span",{class:F("pagination--total-right")},[T("ap.apTable.pagination.totalRightPrefix")," ",t.createVNode("span",{class:F("pagination-count-text")},[t.unref(K)])," ",T("ap.apTable.pagination.totalRightSuffix")])]):void 0},onChange:C,dataSource:t.unref(r).records}));return{formRef:l,submit:w,reset:U,refresh:G,refreshByDelete:H,data:r,current:i,pageSize:g,handleTableChange:C,tableProps:X,dataSource:t.computed(()=>t.unref(r).records),setDataSource:W}};exports.useTablePaging=I;
|
|
@@ -72,6 +72,52 @@ export type CommonFieldReturnType = ApFormItemProps & {
|
|
|
72
72
|
placeholder?: string;
|
|
73
73
|
disabled?: boolean;
|
|
74
74
|
};
|
|
75
|
+
export type ApTableSettingType = {
|
|
76
|
+
/**
|
|
77
|
+
* 用于持久化缓存的key
|
|
78
|
+
*/
|
|
79
|
+
persistenceKey?: string;
|
|
80
|
+
/**
|
|
81
|
+
* 持久化类型
|
|
82
|
+
*/
|
|
83
|
+
persistenceType?: 'localStorage' | 'sessionStorage';
|
|
84
|
+
/**
|
|
85
|
+
* 列的默认状态
|
|
86
|
+
*/
|
|
87
|
+
defaultValue?: Recordable<Omit<ApColumnState, 'children' | 'key'>>;
|
|
88
|
+
/**
|
|
89
|
+
* 列状态变更时的回调(注意,返回的是全量状态)
|
|
90
|
+
* @param val
|
|
91
|
+
* @returns
|
|
92
|
+
*/
|
|
93
|
+
onChange?: (val: ApColumnState[]) => void;
|
|
94
|
+
};
|
|
95
|
+
export type ApColumnState = {
|
|
96
|
+
/**
|
|
97
|
+
* 列的唯一标识
|
|
98
|
+
*/
|
|
99
|
+
key: string | number;
|
|
100
|
+
/**
|
|
101
|
+
* 列是否显示
|
|
102
|
+
*/
|
|
103
|
+
show?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* 列的固定状态
|
|
106
|
+
*/
|
|
107
|
+
fixed?: 'left' | 'right';
|
|
108
|
+
/**
|
|
109
|
+
* 是否可以修改列状态
|
|
110
|
+
*/
|
|
111
|
+
disabled?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* 列对应显示的文本
|
|
114
|
+
*/
|
|
115
|
+
label?: any;
|
|
116
|
+
/**
|
|
117
|
+
* 子节点状态
|
|
118
|
+
*/
|
|
119
|
+
children?: ApColumnState[];
|
|
120
|
+
};
|
|
75
121
|
export type FieldPropsType<ReturnType, RecordType, ExtraValueType, ValueType extends ApTableValueTypes, MergedValueType extends ExtraValueType | ValueType> = ReturnType | ((opt: Partial<{
|
|
76
122
|
value: any;
|
|
77
123
|
text: any;
|
|
@@ -81,7 +127,7 @@ export type FieldPropsType<ReturnType, RecordType, ExtraValueType, ValueType ext
|
|
|
81
127
|
column: ApColumnType<RecordType, ExtraValueType, ValueType, MergedValueType>;
|
|
82
128
|
}>) => ReturnType);
|
|
83
129
|
export type ApColumnType<RecordType = any, ExtraValueType = 'text', ValueType extends ApTableValueTypes = ApTableValueTypes, MergedValueType extends ExtraValueType | ValueType = ExtraValueType | ValueType> = MergedValueType extends ExtraValueType | ValueType ? ExtraProColumnType<RecordType> & {
|
|
84
|
-
children?: ApColumnType<RecordType, ExtraValueType, ValueType, MergedValueType>[];
|
|
130
|
+
children?: Omit<ApColumnType<RecordType, ExtraValueType, ValueType, MergedValueType>, 'fixed'>[];
|
|
85
131
|
/**
|
|
86
132
|
* 表单项所占据的格子数(1-24格)
|
|
87
133
|
*/
|
|
@@ -267,6 +313,10 @@ export type ApTableProps<RecordType = any, ParamsType = any> = Omit<TableProps<R
|
|
|
267
313
|
* 设置表格列是否可以resize
|
|
268
314
|
*/
|
|
269
315
|
columnResizable?: ColumnType['resizable'];
|
|
316
|
+
/**
|
|
317
|
+
* 是否开启表格设置
|
|
318
|
+
*/
|
|
319
|
+
settings?: true | ApTableSettingType;
|
|
270
320
|
};
|
|
271
321
|
export type ApTableExpose<SearchParamsType = Recordable, RecordType = any> = {
|
|
272
322
|
/**
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: column;
|
|
9
9
|
}
|
|
10
|
-
.aplus-ap-table-adaptive .ant-table-wrapper
|
|
10
|
+
.aplus-ap-table-adaptive .ant-table-wrapper {
|
|
11
|
+
flex: 1;
|
|
12
|
+
}
|
|
11
13
|
.aplus-ap-table-adaptive .ant-spin-nested-loading,
|
|
12
14
|
.aplus-ap-table-adaptive .ant-spin-container {
|
|
13
15
|
height: 100%;
|
|
@@ -35,6 +37,8 @@
|
|
|
35
37
|
.aplus-ap-table__table-wrapper {
|
|
36
38
|
flex: 1;
|
|
37
39
|
max-height: 100%;
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
38
42
|
}
|
|
39
43
|
.aplus-ap-table__table-wrapper-card {
|
|
40
44
|
padding: 16px;
|
|
@@ -98,3 +102,27 @@
|
|
|
98
102
|
.aplus-ap-table-pagination-total-wrapper {
|
|
99
103
|
color: var(--ap-table-pagination-total-color, #526A90);
|
|
100
104
|
}
|
|
105
|
+
.aplus-ap-table-header {
|
|
106
|
+
padding-bottom: 16px;
|
|
107
|
+
display: flex;
|
|
108
|
+
justify-content: space-between;
|
|
109
|
+
align-items: center;
|
|
110
|
+
flex-wrap: nowrap;
|
|
111
|
+
}
|
|
112
|
+
.aplus-ap-table-header__title {
|
|
113
|
+
flex: 1;
|
|
114
|
+
flex-shrink: 1;
|
|
115
|
+
min-width: 0;
|
|
116
|
+
}
|
|
117
|
+
.aplus-ap-table-table-header__title {
|
|
118
|
+
display: -webkit-inline-box;
|
|
119
|
+
-webkit-line-clamp: 2;
|
|
120
|
+
-webkit-box-orient: vertical;
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
text-overflow: ellipsis;
|
|
123
|
+
white-space: normal;
|
|
124
|
+
max-width: 100%;
|
|
125
|
+
vertical-align: middle;
|
|
126
|
+
word-break: break-all;
|
|
127
|
+
flex: 1;
|
|
128
|
+
}
|
|
@@ -8423,7 +8423,7 @@ export declare function updateFormProps(item: ApColumnType<any, any>, fieldProps
|
|
|
8423
8423
|
* @returns
|
|
8424
8424
|
*/
|
|
8425
8425
|
export declare function objectToString(value: any): any;
|
|
8426
|
-
export declare function getTableTitle(column: ApColumnType<any>, slot?: (props: {
|
|
8426
|
+
export declare function getTableTitle(column: ApColumnType<any>, titleNodeClassName: string, slot?: (props: {
|
|
8427
8427
|
title: any;
|
|
8428
8428
|
column: ApColumnType<any>;
|
|
8429
8429
|
}) => any, tooltipColor?: string): number | boolean | void | VNodeArrayChildren | import("vue/jsx-runtime").JSX.Element | ((props: ColumnTitleProps<any>) => VNodeArrayChildren | VueNode) | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("vue"),i=require("lodash-unified"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("vue"),i=require("lodash-unified"),d=require("./constants.js"),g=require("@fruits-chain/utils");require("../ap-form/index.js");const b=require("ant-design-vue"),y=require("@ant-design/icons-vue"),h=require("../ap-form/ap-form-item.vue.js");function j(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!u.isVNode(e)}const f=(e,t,n)=>{let o={};return i.isObject(e)?Object.keys(e).forEach(r=>{i.isObject(e[r])?o[r]=f(e[r],t[r],n):o[r]=n(e[r],t)}):o=n(e,t),o},F=(e,t)=>{switch(e){case"dayjs":return t.valueOf();case"dayjsRange":return t.map(n=>n.valueOf());case"dayjsDayRange":{const[n,o]=t;return[n.startOf("day").valueOf(),o.endOf("day").valueOf()]}case"multiple":case"multipleNumber":return i.isArray(t)?t:[t];case"boolean":return t;case"object":return t;default:return t}};function N(e){return i.isArray(e)?e.join("."):e}function O(e){const t=Object.prototype.toString.call(e).match(/^\[object (.*)\]$/)[1].toLowerCase();return t==="string"&&typeof e=="object"?"object":e===null?"null":e===void 0?"undefined":t}const p=e=>O(e)==="map"?e:new Map(Object.entries(e||{})),c=e=>{const t=[],n=p(e);return n.forEach((o,r)=>{const s=n.get(r)||n.get(`${r}`);if(s){if(typeof s=="object"&&(s!=null&&s.text)){t.push({text:s==null?void 0:s.text,value:r,label:s==null?void 0:s.text,disabled:s.disabled});return}t.push({text:s,label:s,value:r})}}),t},S=e=>i.isUndefined(e)||e<0?0:e,V=(e,t,n)=>{if(n)return n;const o=["select","date"],r=["text","textArea","number"];if(t==="dateRange")return[e("ap.common.chooseText"),e("ap.common.chooseText")];if(o.includes(t))return e("ap.common.chooseText");if(r.includes(t))return e("ap.common.inputText")};function m(e,t){return!e||!i.isFunction(e)?e:e(t)}function E(e){let t=e.valueType||"text";return e.valueEnum&&(t="status"),t}function P(e,t,n,o){var l;const r=d.apTableRenderItemMap[e];if(r)return u.createVNode(r,u.mergeProps(t,{mode:"read"}),null);const s=o==null?void 0:o[e];return((l=s==null?void 0:s.render)==null?void 0:l.call(s,t.value,n,t))||t.value}function v(e,t){if(e.customRenderFormItem)return()=>{const r=e.customRenderFormItem(e);return u.cloneVNode(r,{...e.fieldProps,span:e.span,...r.props||{}})};const n=d.apTableFormItemMap[e.valueType];if(n)return n;const o=t==null?void 0:t[e.valueType];return()=>{var s;const r=(s=o==null?void 0:o.renderFormItem)==null?void 0:s.call(o,e.fieldProps.field);return r?u.createVNode(h.default,u.mergeProps(e.fieldProps,{span:e.span}),j(r)?r:{default:()=>[r]}):null}}function I(e,t){const n=m(e.fieldProps,t),o=(n==null?void 0:n.field)||n||{},r=e.valueType==="switch",s=e.valueType==="index",l=r?{checked:t.value}:{value:s?t.index+1:t.value};return e.valueEnum&&(o.valueEnum=e.valueEnum),{...i.omit(o,["request"]),...l}}function q(e){const t={...e};return i.isBoolean(e.filters)&&e.filters&&e.valueEnum&&(t.filters=c(e.valueEnum)),t}function x(e,t){var o;const n=t||{};return e.valueEnum&&!((o=n.field)!=null&&o.options)&&(n.field={...n.field,options:c(e.valueEnum)}),n}function C(e){if(!g.isType("Object")(e))return e;try{return JSON.stringify(e)}catch{return e}}function _(e,t,n,o){const r=n==null?void 0:n({title:e.title,column:e});if(r&&(r.length>1||r[0].children&&r[0].children!=="v-if"))return r;const l=i.isString(e.title)?u.createVNode("span",{class:t,title:e.title},[e.title]):e.title,a=e.tooltip?i.isString(e.tooltip)?u.createVNode(u.Fragment,null,[e.tooltip]):e.tooltip(e):null,T=u.createVNode("span",{style:{display:"inline-flex",alignItems:"center"}},[l,u.createVNode(b.Tooltip,{title:a,placement:"bottom"},{default:()=>[u.createVNode(y.QuestionCircleOutlined,{style:{padding:"4px",color:o,verticalAlign:"middle"}},null)]})]);return a?T:l}exports.apColumnToColumn=q;exports.dataIndexToStr=N;exports.formatParamsValueType=f;exports.getColumnOrder=S;exports.getFieldProps=m;exports.getPlaceholder=V;exports.getSearchFormItemRenderNode=v;exports.getTableCellRenderNode=P;exports.getTableRenderProps=I;exports.getTableRenderType=E;exports.getTableTitle=_;exports.objectToMap=p;exports.objectToString=C;exports.parseFieldValue=F;exports.updateFormProps=x;exports.valueEnumToArray=c;
|
|
@@ -42,7 +42,7 @@ declare const _default: DefineComponent<{
|
|
|
42
42
|
toolTipBgColor: {
|
|
43
43
|
type: StringConstructor;
|
|
44
44
|
};
|
|
45
|
-
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
45
|
+
}, () => false | import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
46
46
|
attachmentList: {
|
|
47
47
|
type: PropType<Array<AttachmentItemProps>>;
|
|
48
48
|
default: never[];
|
|
@@ -1 +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
|
|
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 F=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:F.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"),n=e.computed(()=>t.attachmentList.length===1),r=e.computed(()=>t.attachmentList.length>0?t.attachmentList[0].fileName:""),w=e.computed(()=>n.value?r.value:c("ap.apAttachment.downloadall")),d=e.computed(()=>t.color?t.color:N.value==="aplus"?"#0070FF":"#1890FF"),C=e.computed(()=>({width:n.value?"auto":"266px"})),m=e.computed(()=>({"--download-main-color":d.value,"--download-main-color-opacity":v.getHexWithOpacity(d.value,.6)})),L=e.computed(()=>{var a;return t.getOssAccess||((a=p.value)==null?void 0:a.getOssAccess)}),q=e.computed(()=>{const a=s.default?s.default()[0]:null;return a?e.cloneVNode(a,{style:{"font-size":"16px"}}):null}),i=async a=>{if(!t.disabled){const l=await x.useOssInit(L.value,e.unref(V)),u=O.isArray(e.toRaw(a))?e.toRaw(a):[e.toRaw(a)];await l.downloadFile(v.getFileInfo(t.needName,u))}},y=a=>a&&a.length>0?e.createVNode("ul",{class:[o("file-list")],style:m.value},[a.map((l,u)=>e.createVNode("li",{key:u,class:[o("file-item")],onClick:()=>i(l)},[l.fileName])),e.createVNode("li",{class:[o("down-load-all")],onClick:()=>i(t.attachmentList)},[c("ap.apAttachment.downloadall")])]):null;return()=>{var a;return((a=t.attachmentList)==null?void 0:a.length)>0&&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:()=>i(n.value?t.attachmentList[0]:t.attachmentList)},[s.default?e.createVNode("div",{class:[o("text-render")]},[q.value,e.createTextVNode(" ")]):null,e.createVNode("div",{class:[o("text-inner")]},[r.value])])]}),e.createVNode(f.Popover,{content:y(t.attachmentList),placement:t.fileMorePopoverPlacement,color:"#fff"},{default:()=>[!n.value&&e.createVNode("div",{class:[o("more")]},[c("ap.apAttachment.more")])]})])}}});exports.default=P;
|
|
@@ -38,11 +38,11 @@ export declare function usePageListApTable(props?: UsePageListApTable): [ApTable
|
|
|
38
38
|
dataSource: any;
|
|
39
39
|
rowSelection?: {
|
|
40
40
|
select: (item: any) => void;
|
|
41
|
+
selectAll: () => void;
|
|
42
|
+
unSelectAll: () => void;
|
|
41
43
|
selectedRows: any[];
|
|
42
44
|
unSelect: (item: any) => void;
|
|
43
45
|
isSelected: (item: any) => boolean;
|
|
44
|
-
selectAll: () => void;
|
|
45
|
-
unSelectAll: () => void;
|
|
46
46
|
clearAll: () => void;
|
|
47
47
|
toggleSelect: (item: any) => void;
|
|
48
48
|
} | undefined;
|
|
@@ -2748,7 +2748,7 @@ export declare const ApAttachment: DefineComponent<{
|
|
|
2748
2748
|
toolTipBgColor: {
|
|
2749
2749
|
type: StringConstructor;
|
|
2750
2750
|
};
|
|
2751
|
-
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
2751
|
+
}, () => false | import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
2752
2752
|
attachmentList: {
|
|
2753
2753
|
type: PropType<Array< AttachmentItemProps>>;
|
|
2754
2754
|
default: never[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={name:"en",ap:{button:{prefix:"Prefix"},icon:{picker:{placeholder:"Click the select icon",search:"Search icon",copy:"Copy icon successfully!"}},form:{item:{apiSelect:{loadingTip:"Wait for data loading to complete..."}},maxTip:"The number of characters should be less than {count}"},common:{okText:"OK",cancelText:"Cancel",resetText:"Reset",queryText:"Search",expandText:"Unfold",closeText:"Put away",inputText:"Please enter",chooseText:"Please choose",redo:"Refresh",back:"Back",more:"More"},cropper:{modalTitle:"Avatar upload",okText:"Confirm and upload ",selectImage:"Select Image",rotateLeft:"Counterclockwise rotation",rotateRight:"Clockwise rotation",scaleX:"Flip horizontal",scaleY:"Flip vertical",zoomIn:"Zoom in",zoomOut:"Zoom out",preview:"Preview",imageTooBig:"Image too big",uploadSuccess:"Uploaded success!"},modal:{restore:"Restore",maximize:"Maximize",close:"Close"},countdown:{normalText:"Get SMS code",sendText:"Reacquire in {sec}s"},table:{settingColumn:"Column settings",settingColumnShow:"Column display",settingIndexColumnShow:"Index Column",settingSelectColumnShow:"Selection Column",settingFixedLeft:"Fixed Left",settingFixedRight:"Fixed Right",settingFullScreen:"Full Screen",settingDens:"Density",settingDensDefault:"Default",settingDensMiddle:"Middle",settingDensSmall:"Compact",selectionBarTips:"{count} records selected.",selectionBarEmpty:"No records selected.",selectionBarClear:"Clear",total:"total of {total}",index:"Index"},apForm:{search:{search:"Search",reset:"Reset"}},apTable:{pagination:{totalLeftPrefix:"Total",totalLeftSuffix:"items",totalRightPrefix:"Page",totalRightSuffix:""}},apUpload:{update:"Upload",pictureType:"Image type",videoType:"Video type",audioType:"Audio type",documentType:"Document type",allTypes:"All types",networkAnomaly:"Network abnormality",FailedToObtainOssTemporaryPermissions:"Failed to obtain temporary OSS permissions",pleasePass:"Please pass in",supportExtension:"Support extensions",uploadFile:"Upload files",fileInitializationException:"If the initial number of initialized files exceeds {maxCount}, subsequent uploaded files will be out of sync with the data",maxUploadFiles:"Upload a maximum of {maxCount} files",maxUploadPicture:"Upload a maximum of {maxCount} images",maxUploadFileSize:"The file size does not exceed {maxSize}MB",maxWarnUploadFileSize:"The file size is smaller than {maxSize}MB",maxUploadPictureSize:"The image size is smaller than {maxSize}MB",fileFormatNotSupported:"Files in this format are not supported",pictureFormatNotSupported:"Images in this format are not supported",imageParsingFailed:"Image parsing failed",clickOrDragUpload:"Click or drag the file",foldersNotSupported:"Do not support uploading folders"},apCustomColumn:{title:"Custom table",selectDes:"Please select the fields that you want to display in the table",allSelect:"check all"},apExportGroup:{exportError:"Export error",exportSelected:"Export selected",exportAll:"Export all",export:"Export"},apBatchAction:{selected:"Selected",piecesOfData:"Pieces of data",empty:"Empty"},apApBatchActionGroup:{batchOperation:"Batch operation"},workOrderModal:{createTickets:"Create ticket",submit:"Confirm",cancel:"Cancel",ticketsTitle:"Ticket Title",noEmpty:"No empty",pleaseEntry:"please enter",ticketsType:"Ticket Type",ticketsDetail:"Ticket Detail",ticketsLevel:"Priority",operationSuccess:"operate successfully",fileSizeMax:"Single file size limit",fileCountMax:"Limit the number to {x} at a time"},apTableModal:{titleSuffixOne:"You can add up to {maxCount},",titleSuffixTwo:"Added",titleSuffixThree:"",messageMaxCount:"You can select up to {maxCount} data entries"},apAttachment:{downloadall:"Download All",more:"More"}}};exports.default=e;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={name:"en",ap:{button:{prefix:"Prefix"},icon:{picker:{placeholder:"Click the select icon",search:"Search icon",copy:"Copy icon successfully!"}},form:{item:{apiSelect:{loadingTip:"Wait for data loading to complete..."}},maxTip:"The number of characters should be less than {count}"},common:{okText:"OK",cancelText:"Cancel",resetText:"Reset",queryText:"Search",expandText:"Unfold",closeText:"Put away",inputText:"Please enter",chooseText:"Please choose",redo:"Refresh",back:"Back",more:"More"},cropper:{modalTitle:"Avatar upload",okText:"Confirm and upload ",selectImage:"Select Image",rotateLeft:"Counterclockwise rotation",rotateRight:"Clockwise rotation",scaleX:"Flip horizontal",scaleY:"Flip vertical",zoomIn:"Zoom in",zoomOut:"Zoom out",preview:"Preview",imageTooBig:"Image too big",uploadSuccess:"Uploaded success!"},modal:{restore:"Restore",maximize:"Maximize",close:"Close"},countdown:{normalText:"Get SMS code",sendText:"Reacquire in {sec}s"},table:{settingColumn:"Column settings",settingColumnShow:"Column display",settingIndexColumnShow:"Index Column",settingSelectColumnShow:"Selection Column",settingFixedLeft:"Fixed Left",settingFixedRight:"Fixed Right",settingFullScreen:"Full Screen",settingDens:"Density",settingDensDefault:"Default",settingDensMiddle:"Middle",settingDensSmall:"Compact",selectionBarTips:"{count} records selected.",selectionBarEmpty:"No records selected.",selectionBarClear:"Clear",total:"total of {total}",index:"Index"},apForm:{search:{search:"Search",reset:"Reset"}},apTable:{pagination:{totalLeftPrefix:"Total",totalLeftSuffix:"items",totalRightPrefix:"Page",totalRightSuffix:""},setting:{title:"Custom Table",selectAll:"Select All",unSelectAll:"Deselect All",selectAllTip:"Please select the columns to display in the table.",sizeSmall:"Small",sizeNormal:"Normal",selectCount:"Selected fields ({count})",reset:"Reset",fixToLeft:"Fixed on the left",fixToRight:"Fixed on the right",unFixed:"Not fixed",delete:"Delete"}},apUpload:{update:"Upload",pictureType:"Image type",videoType:"Video type",audioType:"Audio type",documentType:"Document type",allTypes:"All types",networkAnomaly:"Network abnormality",FailedToObtainOssTemporaryPermissions:"Failed to obtain temporary OSS permissions",pleasePass:"Please pass in",supportExtension:"Support extensions",uploadFile:"Upload files",fileInitializationException:"If the initial number of initialized files exceeds {maxCount}, subsequent uploaded files will be out of sync with the data",maxUploadFiles:"Upload a maximum of {maxCount} files",maxUploadPicture:"Upload a maximum of {maxCount} images",maxUploadFileSize:"The file size does not exceed {maxSize}MB",maxWarnUploadFileSize:"The file size is smaller than {maxSize}MB",maxUploadPictureSize:"The image size is smaller than {maxSize}MB",fileFormatNotSupported:"Files in this format are not supported",pictureFormatNotSupported:"Images in this format are not supported",imageParsingFailed:"Image parsing failed",clickOrDragUpload:"Click or drag the file",foldersNotSupported:"Do not support uploading folders"},apCustomColumn:{title:"Custom table",selectDes:"Please select the fields that you want to display in the table",allSelect:"check all"},apExportGroup:{exportError:"Export error",exportSelected:"Export selected",exportAll:"Export all",export:"Export"},apBatchAction:{selected:"Selected",piecesOfData:"Pieces of data",empty:"Empty"},apApBatchActionGroup:{batchOperation:"Batch operation"},workOrderModal:{createTickets:"Create ticket",submit:"Confirm",cancel:"Cancel",ticketsTitle:"Ticket Title",noEmpty:"No empty",pleaseEntry:"please enter",ticketsType:"Ticket Type",ticketsDetail:"Ticket Detail",ticketsLevel:"Priority",operationSuccess:"operate successfully",fileSizeMax:"Single file size limit",fileCountMax:"Limit the number to {x} at a time"},apTableModal:{titleSuffixOne:"You can add up to {maxCount},",titleSuffixTwo:"Added",titleSuffixThree:"",messageMaxCount:"You can select up to {maxCount} data entries"},apAttachment:{downloadall:"Download All",more:"More"}}};exports.default=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={name:"zh-cn",ap:{button:{prefix:"前缀"},icon:{picker:{placeholder:"点击选择图标",search:"搜索图标",copy:"复制图标成功!"}},form:{item:{apiSelect:{loadingTip:"请等待数据加载完成..."}},maxTip:"字符数应小于{count}位"},common:{okText:"确认",cancelText:"取消",resetText:"重置",queryText:"查询",expandText:"展开",closeText:"收起",inputText:"请输入",chooseText:"请选择",redo:"刷新",back:"返回",more:"更多"},cropper:{modalTitle:"头像上传",okText:"确认并上传",selectImage:"选择图片",rotateLeft:"逆时针旋转",rotateRight:"顺时针旋转",scaleX:"水平翻转",scaleY:"垂直翻转",zoomIn:"放大",zoomOut:"缩小",preview:"预览",imageTooBig:"图片超限",uploadSuccess:"上传成功"},modal:{restore:"还原",maximize:"最大化",close:"关闭"},countdown:{normalText:"获取验证码",sendText:"{sec}秒后重新获取"},table:{settingColumn:"列设置",settingColumnShow:"列展示",settingIndexColumnShow:"序号列",settingSelectColumnShow:"勾选列",settingFixedLeft:"固定到左侧",settingFixedRight:"固定到右侧",settingFullScreen:"全屏",settingDens:"密度",settingDensDefault:"默认",settingDensMiddle:"中等",settingDensSmall:"紧凑",selectionBarTips:"已选择{count}条记录",selectionBarEmpty:"未选中任何记录",selectionBarClear:"清空",total:"共 {total} 条数据",index:"索引"},apForm:{search:{search:"查询",reset:"重置"}},apTable:{pagination:{totalLeftPrefix:"共",totalLeftSuffix:"条记录",totalRightPrefix:"第",totalRightSuffix:"页"}},apUpload:{update:"上传",pictureType:"图片类型",videoType:"视频类型",audioType:"音频类型",documentType:"文档类型",allTypes:"全部类型",networkAnomaly:"网络异常",FailedToObtainOssTemporaryPermissions:"获取oss临时权限失败",pleasePass:"请传入",supportExtension:"支持扩展名",uploadFile:"上传文件",fileInitializationException:"文件初始化个数超过{maxCount}个,后续上传的文件会与数据不同步",maxUploadFiles:"最多上传{maxCount}个文件",maxUploadPicture:"最多上传{maxCount}张图片",maxUploadFileSize:"文件大小不超过{maxSize}MB",maxWarnUploadFileSize:"文件大小小于{maxSize}MB",maxUploadPictureSize:"图片大小小于{maxSize}MB",fileFormatNotSupported:"不支持该格式的文件",pictureFormatNotSupported:"不支持该格式的图片",imageParsingFailed:"图片解析失败",clickOrDragUpload:"点击或将文件拖拽到这里上传",foldersNotSupported:"不支持上传文件夹"},apCustomColumn:{title:"自定义表格",selectDes:"请选择需要展示在表格的字段",allSelect:"全选"},apExportGroup:{exportError:"导出失败",exportSelected:"导出所选",exportAll:"导出全部",export:"导出"},apBatchAction:{selected:"已选",piecesOfData:"条数据",empty:"清空"},apApBatchActionGroup:{batchOperation:"批量操作"},workOrderModal:{createTickets:"创建工单",submit:"确定",cancel:"取消",ticketsTitle:"工单标题",noEmpty:"不可为空",pleaseEntry:"请输入",ticketsType:"工单类型",ticketsDetail:"工单详情",ticketsLevel:"优先级",operationSuccess:"操作成功",fileSizeMax:"单个文件大小限制",fileCountMax:"单次数量限制 {x} 个"},apTableModal:{titleSuffixOne:"最多可添加{maxCount}个,",titleSuffixTwo:"已添加",titleSuffixThree:"个",messageMaxCount:"最多选择{maxCount}条数据"},apAttachment:{downloadall:"下载全部",more:"更多"}}};exports.default=e;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={name:"zh-cn",ap:{button:{prefix:"前缀"},icon:{picker:{placeholder:"点击选择图标",search:"搜索图标",copy:"复制图标成功!"}},form:{item:{apiSelect:{loadingTip:"请等待数据加载完成..."}},maxTip:"字符数应小于{count}位"},common:{okText:"确认",cancelText:"取消",resetText:"重置",queryText:"查询",expandText:"展开",closeText:"收起",inputText:"请输入",chooseText:"请选择",redo:"刷新",back:"返回",more:"更多"},cropper:{modalTitle:"头像上传",okText:"确认并上传",selectImage:"选择图片",rotateLeft:"逆时针旋转",rotateRight:"顺时针旋转",scaleX:"水平翻转",scaleY:"垂直翻转",zoomIn:"放大",zoomOut:"缩小",preview:"预览",imageTooBig:"图片超限",uploadSuccess:"上传成功"},modal:{restore:"还原",maximize:"最大化",close:"关闭"},countdown:{normalText:"获取验证码",sendText:"{sec}秒后重新获取"},table:{settingColumn:"列设置",settingColumnShow:"列展示",settingIndexColumnShow:"序号列",settingSelectColumnShow:"勾选列",settingFixedLeft:"固定到左侧",settingFixedRight:"固定到右侧",settingFullScreen:"全屏",settingDens:"密度",settingDensDefault:"默认",settingDensMiddle:"中等",settingDensSmall:"紧凑",selectionBarTips:"已选择{count}条记录",selectionBarEmpty:"未选中任何记录",selectionBarClear:"清空",total:"共 {total} 条数据",index:"索引"},apForm:{search:{search:"查询",reset:"重置"}},apTable:{pagination:{totalLeftPrefix:"共",totalLeftSuffix:"条记录",totalRightPrefix:"第",totalRightSuffix:"页"},setting:{title:"自定义表格",selectAll:"全选",unSelectAll:"取消全选",selectAllTip:"请选择需要展示在表格的字段",sizeSmall:"紧凑",sizeNormal:"正常",selectCount:"已选字段({count})",reset:"重置",fixToLeft:"固定在左侧",fixToRight:"固定在右侧",unFixed:"不固定",delete:"删除"}},apUpload:{update:"上传",pictureType:"图片类型",videoType:"视频类型",audioType:"音频类型",documentType:"文档类型",allTypes:"全部类型",networkAnomaly:"网络异常",FailedToObtainOssTemporaryPermissions:"获取oss临时权限失败",pleasePass:"请传入",supportExtension:"支持扩展名",uploadFile:"上传文件",fileInitializationException:"文件初始化个数超过{maxCount}个,后续上传的文件会与数据不同步",maxUploadFiles:"最多上传{maxCount}个文件",maxUploadPicture:"最多上传{maxCount}张图片",maxUploadFileSize:"文件大小不超过{maxSize}MB",maxWarnUploadFileSize:"文件大小小于{maxSize}MB",maxUploadPictureSize:"图片大小小于{maxSize}MB",fileFormatNotSupported:"不支持该格式的文件",pictureFormatNotSupported:"不支持该格式的图片",imageParsingFailed:"图片解析失败",clickOrDragUpload:"点击或将文件拖拽到这里上传",foldersNotSupported:"不支持上传文件夹"},apCustomColumn:{title:"自定义表格",selectDes:"请选择需要展示在表格的字段",allSelect:"全选"},apExportGroup:{exportError:"导出失败",exportSelected:"导出所选",exportAll:"导出全部",export:"导出"},apBatchAction:{selected:"已选",piecesOfData:"条数据",empty:"清空"},apApBatchActionGroup:{batchOperation:"批量操作"},workOrderModal:{createTickets:"创建工单",submit:"确定",cancel:"取消",ticketsTitle:"工单标题",noEmpty:"不可为空",pleaseEntry:"请输入",ticketsType:"工单类型",ticketsDetail:"工单详情",ticketsLevel:"优先级",operationSuccess:"操作成功",fileSizeMax:"单个文件大小限制",fileCountMax:"单次数量限制 {x} 个"},apTableModal:{titleSuffixOne:"最多可添加{maxCount}个,",titleSuffixTwo:"已添加",titleSuffixThree:"个",messageMaxCount:"最多选择{maxCount}条数据"},apAttachment:{downloadall:"下载全部",more:"更多"}}};exports.default=e;
|