@aplus-frontend/ui 0.1.24 → 0.1.26

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.
Files changed (96) hide show
  1. package/es/index.mjs +58 -55
  2. package/es/src/ap-form/ap-form-item.vue.mjs +26 -26
  3. package/es/src/ap-form/search-form/index.vue.mjs +1 -0
  4. package/es/src/ap-layout/ApInfoLayout.vue.d.ts +81 -0
  5. package/es/src/ap-layout/ApInfoLayout.vue.mjs +41 -0
  6. package/es/src/ap-layout/ApInfoLayout.vue2.mjs +4 -0
  7. package/es/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +48 -0
  8. package/es/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.mjs +4 -0
  9. package/es/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.mjs +42 -0
  10. package/es/src/ap-layout/{ap-info-layout → ap-info-layout-aplus}/ap-info-layout.vue.d.ts +3 -3
  11. package/es/src/ap-layout/ap-info-layout-aplus/ap-info-layout.vue.mjs +4 -0
  12. package/es/src/ap-layout/index.d.ts +2 -1
  13. package/es/src/ap-layout/index.mjs +2 -1
  14. package/es/src/ap-layout/interface.d.ts +8 -2
  15. package/es/src/ap-layout/interface.mjs +1 -0
  16. package/es/src/ap-layout/style/ap-info-layout.css +17 -0
  17. package/es/src/ap-upload/components/MultipleFile.vue2.mjs +91 -89
  18. package/es/src/ap-upload/components/Picture.vue2.mjs +114 -112
  19. package/es/src/ap-upload/components/SingleFile.vue2.mjs +10 -7
  20. package/es/src/business/ap-input-radio/ApInputRadio.vue2.mjs +37 -27
  21. package/es/src/business/ap-input-radio/interface.d.ts +4 -3
  22. package/es/src/business/ap-ladder/ApLadder.vue.d.ts +159 -0
  23. package/es/src/business/ap-ladder/ApLadder.vue.mjs +4 -0
  24. package/es/src/business/ap-ladder/ApLadder.vue2.mjs +176 -0
  25. package/es/src/business/ap-ladder/interface.d.ts +134 -0
  26. package/es/src/business/ap-ladder/interface.mjs +10 -0
  27. package/es/src/business/ap-ladder/style.css +56 -0
  28. package/es/src/business/hooks/index.d.ts +1 -0
  29. package/es/src/business/hooks/index.mjs +3 -1
  30. package/es/src/business/hooks/usePageListApTable.d.ts +25 -3
  31. package/es/src/business/hooks/usePageListApTable.mjs +40 -29
  32. package/es/src/business/hooks/useTableRefresh.d.ts +17 -0
  33. package/es/src/business/hooks/useTableRefresh.mjs +16 -0
  34. package/es/src/business/index.d.ts +719 -9
  35. package/es/src/business/index.mjs +25 -22
  36. package/es/src/components.d.ts +1 -0
  37. package/es/src/index.mjs +206 -203
  38. package/es/src/theme/antd-global-overwrite/aplus/index.css +8 -0
  39. package/es/src/theme/antd-global-overwrite/aplus/table.css +8 -0
  40. package/es/src/theme/ap-ladder/ap-ladder.css +56 -0
  41. package/es/src/theme/ap-layout/ap-info-layout.css +17 -0
  42. package/lib/index.js +1 -1
  43. package/lib/src/ap-form/ap-form-item.vue.js +1 -1
  44. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  45. package/lib/src/ap-layout/ApInfoLayout.vue.d.ts +81 -0
  46. package/lib/src/ap-layout/ApInfoLayout.vue.js +1 -0
  47. package/lib/src/ap-layout/ApInfoLayout.vue2.js +1 -0
  48. package/lib/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +48 -0
  49. package/lib/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.js +1 -0
  50. package/lib/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.js +1 -0
  51. package/lib/src/ap-layout/{ap-info-layout → ap-info-layout-aplus}/ap-info-layout.vue.d.ts +3 -3
  52. package/lib/src/ap-layout/{ap-info-layout/ap-info-layout.vue2.js → ap-info-layout-aplus/ap-info-layout.vue.js} +1 -1
  53. package/lib/src/ap-layout/index.d.ts +2 -1
  54. package/lib/src/ap-layout/index.js +1 -1
  55. package/lib/src/ap-layout/interface.d.ts +8 -2
  56. package/lib/src/ap-layout/interface.js +1 -0
  57. package/lib/src/ap-layout/style/ap-info-layout.css +17 -0
  58. package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
  59. package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
  60. package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
  61. package/lib/src/business/ap-input-radio/ApInputRadio.vue2.js +1 -1
  62. package/lib/src/business/ap-input-radio/interface.d.ts +4 -3
  63. package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +159 -0
  64. package/lib/src/business/ap-ladder/ApLadder.vue.js +1 -0
  65. package/lib/src/business/ap-ladder/ApLadder.vue2.js +1 -0
  66. package/lib/src/business/ap-ladder/interface.d.ts +134 -0
  67. package/lib/src/business/ap-ladder/interface.js +1 -0
  68. package/lib/src/business/ap-ladder/style.css +56 -0
  69. package/lib/src/business/hooks/index.d.ts +1 -0
  70. package/lib/src/business/hooks/index.js +1 -1
  71. package/lib/src/business/hooks/usePageListApTable.d.ts +25 -3
  72. package/lib/src/business/hooks/usePageListApTable.js +1 -1
  73. package/lib/src/business/hooks/useTableRefresh.d.ts +17 -0
  74. package/lib/src/business/hooks/useTableRefresh.js +1 -0
  75. package/lib/src/business/index.d.ts +719 -9
  76. package/lib/src/business/index.js +1 -1
  77. package/lib/src/components.d.ts +1 -0
  78. package/lib/src/index.js +1 -1
  79. package/lib/src/theme/antd-global-overwrite/aplus/index.css +8 -0
  80. package/lib/src/theme/antd-global-overwrite/aplus/table.css +8 -0
  81. package/lib/src/theme/ap-ladder/ap-ladder.css +56 -0
  82. package/lib/src/theme/ap-layout/ap-info-layout.css +17 -0
  83. package/package.json +1 -1
  84. package/es/src/ap-layout/ap-info-layout/ap-info-layout.vue2.mjs +0 -4
  85. /package/es/src/ap-layout/{ap-info-layout/ap-info-layout.vue.mjs → ap-info-layout-aplus/ap-info-layout.vue2.mjs} +0 -0
  86. /package/es/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.d.ts +0 -0
  87. /package/es/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.mjs +0 -0
  88. /package/es/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue2.mjs +0 -0
  89. /package/es/src/business/{expandAlert → ap-expand-alert}/interface.d.ts +0 -0
  90. /package/es/src/business/{expandAlert → ap-expand-alert}/style.css +0 -0
  91. /package/lib/src/ap-layout/{ap-info-layout/ap-info-layout.vue.js → ap-info-layout-aplus/ap-info-layout.vue2.js} +0 -0
  92. /package/lib/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.d.ts +0 -0
  93. /package/lib/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.js +0 -0
  94. /package/lib/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue2.js +0 -0
  95. /package/lib/src/business/{expandAlert → ap-expand-alert}/interface.d.ts +0 -0
  96. /package/lib/src/business/{expandAlert → ap-expand-alert}/style.css +0 -0
@@ -0,0 +1,159 @@
1
+ import { ApLadderProps, ApLadderSlots, ApLadderLabelValue } from './interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType, CSSProperties } from 'vue';
3
+ import { VueTypeValidableDef } from '../../../node_modules/vue-types';
4
+ import { TriggerType } from 'ant-design-vue/es/tooltip/abstractTooltipProps';
5
+ import { TooltipPlacement, AdjustOverflow } from 'ant-design-vue/es/tooltip';
6
+ import { LiteralUnion } from 'ant-design-vue/es/_util/type';
7
+ import { PresetColorType } from 'ant-design-vue/es/_util/colors';
8
+ import { AlignType, BuildInPlacements } from 'ant-design-vue/es/vc-trigger/interface';
9
+ declare function __VLS_template(): {
10
+ slots: Readonly<ApLadderSlots> & ApLadderSlots;
11
+ refs: {};
12
+ attrs: Partial<{}>;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApLadderProps>, {
16
+ major: string;
17
+ minor: string;
18
+ majorColor: string;
19
+ minorColor: string;
20
+ layout: string;
21
+ tooltip: boolean;
22
+ labelValues: () => never[];
23
+ tooltipProps: () => {
24
+ title: undefined;
25
+ align: {};
26
+ arrowPointAtCenter: boolean;
27
+ arrow: boolean;
28
+ autoAdjustOverflow: boolean;
29
+ color: string;
30
+ destroyTooltipOnHide: boolean;
31
+ getPopupContainer: () => HTMLElement;
32
+ mouseEnterDelay: number;
33
+ mouseLeaveDelay: number;
34
+ overlayClassName: string;
35
+ overlayStyle: {};
36
+ overlayInnerStyle: {};
37
+ placement: string;
38
+ trigger: string;
39
+ };
40
+ }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApLadderProps>, {
41
+ major: string;
42
+ minor: string;
43
+ majorColor: string;
44
+ minorColor: string;
45
+ layout: string;
46
+ tooltip: boolean;
47
+ labelValues: () => never[];
48
+ tooltipProps: () => {
49
+ title: undefined;
50
+ align: {};
51
+ arrowPointAtCenter: boolean;
52
+ arrow: boolean;
53
+ autoAdjustOverflow: boolean;
54
+ color: string;
55
+ destroyTooltipOnHide: boolean;
56
+ getPopupContainer: () => HTMLElement;
57
+ mouseEnterDelay: number;
58
+ mouseLeaveDelay: number;
59
+ overlayClassName: string;
60
+ overlayStyle: {};
61
+ overlayInnerStyle: {};
62
+ placement: string;
63
+ trigger: string;
64
+ };
65
+ }>>>, {
66
+ layout: "vertical" | "horizontal";
67
+ tooltip: boolean;
68
+ tooltipProps: Required<Pick<Partial< ExtractPropTypes<{
69
+ title: VueTypeValidableDef<any>;
70
+ trigger: PropType< TriggerType | TriggerType[]>;
71
+ open: {
72
+ type: BooleanConstructor;
73
+ default: any;
74
+ };
75
+ visible: {
76
+ type: BooleanConstructor;
77
+ default: any;
78
+ };
79
+ placement: PropType<TooltipPlacement>;
80
+ color: PropType<LiteralUnion<PresetColorType>>;
81
+ transitionName: StringConstructor;
82
+ overlayStyle: {
83
+ type: PropType<CSSProperties>;
84
+ default: CSSProperties;
85
+ };
86
+ overlayInnerStyle: {
87
+ type: PropType<CSSProperties>;
88
+ default: CSSProperties;
89
+ };
90
+ overlayClassName: StringConstructor;
91
+ openClassName: StringConstructor;
92
+ prefixCls: StringConstructor;
93
+ mouseEnterDelay: NumberConstructor;
94
+ mouseLeaveDelay: NumberConstructor;
95
+ getPopupContainer: PropType<(triggerNode: HTMLElement) => HTMLElement>;
96
+ arrowPointAtCenter: {
97
+ type: BooleanConstructor;
98
+ default: any;
99
+ };
100
+ arrow: {
101
+ type: PropType<boolean | {
102
+ pointAtCenter?: boolean;
103
+ }>;
104
+ default: boolean | {
105
+ pointAtCenter?: boolean;
106
+ };
107
+ };
108
+ autoAdjustOverflow: {
109
+ type: PropType<boolean | AdjustOverflow>;
110
+ default: boolean | AdjustOverflow;
111
+ };
112
+ destroyTooltipOnHide: {
113
+ type: BooleanConstructor;
114
+ default: any;
115
+ };
116
+ align: {
117
+ type: PropType<AlignType>;
118
+ default: AlignType;
119
+ };
120
+ builtinPlacements: {
121
+ type: PropType<BuildInPlacements>;
122
+ default: BuildInPlacements;
123
+ };
124
+ children: ArrayConstructor;
125
+ onVisibleChange: PropType<(vis: boolean) => void>;
126
+ 'onUpdate:visible': PropType<(vis: boolean) => void>;
127
+ onOpenChange: PropType<(vis: boolean) => void>;
128
+ 'onUpdate:open': PropType<(vis: boolean) => void>;
129
+ }>>, "title" | "placement" | "color" | "mouseEnterDelay" | "getPopupContainer" | "trigger" | "overlayStyle" | "overlayInnerStyle" | "overlayClassName" | "mouseLeaveDelay" | "arrowPointAtCenter" | "arrow" | "autoAdjustOverflow" | "destroyTooltipOnHide" | "align">>;
130
+ major: string;
131
+ minor: string;
132
+ majorColor: string;
133
+ minorColor: string;
134
+ labelValues: Array< ApLadderLabelValue>;
135
+ }, {}>;
136
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
137
+ export default _default;
138
+ type __VLS_WithDefaults<P, D> = {
139
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
140
+ default: D[K];
141
+ }> : P[K];
142
+ };
143
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
144
+ type __VLS_TypePropsToOption<T> = {
145
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
146
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
147
+ } : {
148
+ type: PropType<T[K]>;
149
+ required: true;
150
+ };
151
+ };
152
+ type __VLS_WithTemplateSlots<T, S> = T & {
153
+ new (): {
154
+ $slots: S;
155
+ };
156
+ };
157
+ type __VLS_PrettifyLocal<T> = {
158
+ [K in keyof T]: T[K];
159
+ } & {};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ApLadder.vue2.js");exports.default=e.default;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),B=require("ant-design-vue");require("../../config-provider/index.js");const N=require("./interface.js");require("./style.css");const _=require("../../config-provider/hooks/use-namespace.js"),D=require("../../config-provider/hooks/use-global-config.js"),P={key:1},j={key:0},w={key:1},$={key:0},F=["onClick"],M={key:0},q={key:1},O={key:0},L={key:1},A=e.defineComponent({name:"ApLadder",__name:"ApLadder",props:{major:{default:""},minor:{default:""},majorColor:{default:""},minorColor:{default:""},layout:{default:"vertical"},tooltip:{type:Boolean,default:!0},labelValues:{default:()=>[]},tooltipProps:{default:()=>({title:void 0,align:{},arrowPointAtCenter:!1,arrow:!0,autoAdjustOverflow:!0,color:"",destroyTooltipOnHide:!1,getPopupContainer:()=>document.body,mouseEnterDelay:.1,mouseLeaveDelay:.1,overlayClassName:"",overlayStyle:{},overlayInnerStyle:{},placement:"top",trigger:"hover"})}},setup(C){const u=e.useSlots(),l=C,{b:S,e:r,m:g}=_.useNamespace("ap-ladder"),E=D.useGlobalConfig("uiMode","aplus"),p=`ap-ladder-${Math.floor(Math.random()*1e7)}`,h=r("ellipsis"),s=e.ref(!1),b=e.computed(()=>l.labelValues.length===0),v=e.computed(()=>l.labelValues.length>0),m=e.computed(()=>l.majorColor?{color:`${l.majorColor}`}:{}),d=e.computed(()=>l.minorColor?{color:`${l.minorColor}`}:{}),c=t=>t==null||typeof t=="string"&&t.trim()==="",a=(t,n={})=>{const o={rawValue:n.rawValue,precision:n.precision===void 0?2:n.precision,thousand:n.thousand,thousandSeparator:n.thousandSeparator||",",currency:n.currency,percent:n.percent};return c(t)?"--":o.rawValue?t:typeof t=="number"?o.percent?`${t.toFixed(o.precision)}%`:o.currency?t.toLocaleString(N.locales[o.currency],{style:"currency",currency:o.currency}):o.thousand?t.toFixed(o.precision).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${o.thousandSeparator}`):t.toFixed(o.precision):t},V=()=>{const t=document.getElementById(p);if(!t)return;const n=t.querySelectorAll(`.${h}`);new ResizeObserver(i=>{i.forEach(k=>{k.target===t&&(s.value=!1,n.forEach(f=>{f.clientWidth<f.scrollWidth&&(s.value=!0)}))})}).observe(t),s.value=!1,n.forEach(i=>{i.clientWidth<i.scrollWidth&&(s.value=!0)})},y=e.computed(()=>u.title?!0:l.tooltip&&e.unref(s)),z=t=>{t&&window.open(t,"_blank")};return e.onMounted(()=>{V()}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{id:p,class:e.normalizeClass([e.unref(S)(),`${e.unref(g)(e.unref(E))}`])},[b.value?(e.openBlock(),e.createBlock(e.unref(B.Tooltip),e.normalizeProps(e.mergeProps({key:0},{...l.tooltipProps})),e.createSlots({default:e.withCtx(()=>[!c(t.major)||!c(t.minor)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.layout==="vertical"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(r)("major"),e.unref(r)("ellipsis")]),style:e.normalizeStyle(m.value)},e.toDisplayString(a(t.major)),7),e.createElementVNode("div",{class:e.normalizeClass([e.unref(r)("minor"),e.unref(r)("ellipsis")]),style:e.normalizeStyle(d.value)},e.toDisplayString(a(t.minor)),7)],64)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(r)("ellipsis"))},[e.createElementVNode("span",{class:e.normalizeClass([e.unref(r)("major")]),style:e.normalizeStyle(m.value)},e.toDisplayString(a(t.major)),7),e.createElementVNode("span",{class:e.normalizeClass([e.unref(r)("minor")]),style:e.normalizeStyle(d.value)},e.toDisplayString(a(t.minor)),7)],2))],64)):(e.openBlock(),e.createElementBlock("div",P,e.toDisplayString("--")))]),_:2},[y.value?{name:"title",fn:e.withCtx(()=>[u.title?e.renderSlot(t.$slots,"title",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[l.tooltipProps.title?(e.openBlock(),e.createElementBlock("div",j,e.toDisplayString(l.tooltipProps.title),1)):(e.openBlock(),e.createElementBlock("div",w,[e.createElementVNode("div",null,e.toDisplayString(a(t.major)),1),e.createElementVNode("div",null,e.toDisplayString(a(t.minor)),1)]))],64))]),key:"0"}:void 0]),1040)):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createBlock(e.unref(B.Tooltip),e.normalizeProps(e.mergeProps({key:1},{...l.tooltipProps})),e.createSlots({default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.labelValues,(o,i)=>(e.openBlock(),e.createElementBlock("div",{key:i,class:e.normalizeClass([e.unref(r)("ellipsis")])},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(r)("label")),style:e.normalizeStyle(o.labelColor?{color:o.labelColor}:void 0)},[e.createTextVNode(e.toDisplayString(o.label),1),o.label?(e.openBlock(),e.createElementBlock("span",$,":")):e.createCommentVNode("",!0)],6),c(o.link)?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(r)("value")),style:e.normalizeStyle(o.valueColor?{color:o.valueColor}:void 0)},e.toDisplayString(a(o.value,{...o})),7)):(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(r)("link")),style:e.normalizeStyle(o.linkColor?{color:o.linkColor}:void 0),onClick:k=>z(o.link)},e.toDisplayString(a(o.value,{...o})),15,F)),o.unit?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(e.unref(r)("unit")),style:e.normalizeStyle(o.unitColor?{color:o.unitColor}:void 0)},e.toDisplayString(o.unit),7)):e.createCommentVNode("",!0)],2))),128))]),_:2},[y.value?{name:"title",fn:e.withCtx(()=>[u.title?e.renderSlot(t.$slots,"title",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[l.tooltipProps.title?(e.openBlock(),e.createElementBlock("div",M,e.toDisplayString(l.tooltipProps.title),1)):(e.openBlock(),e.createElementBlock("div",q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.labelValues,(o,i)=>(e.openBlock(),e.createElementBlock("div",{key:i},[o.label?(e.openBlock(),e.createElementBlock("span",O,e.toDisplayString(o.label),1)):e.createCommentVNode("",!0),o.label?(e.openBlock(),e.createElementBlock("span",L,":")):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(a(o.value,{...o})),1)]))),128))]))],64))]),key:"0"}:void 0]),1040)):e.createCommentVNode("",!0)],2))}});exports.default=A;
@@ -0,0 +1,134 @@
1
+ import { TooltipProps } from 'ant-design-vue/es/tooltip/Tooltip';
2
+ import { VNode } from 'vue';
3
+ /**
4
+ * Tooltip 需要的属性
5
+ */
6
+ export type TooltipNeedProps = Required<Pick<TooltipProps, 'title' | 'align' | 'arrowPointAtCenter' | 'arrow' | 'autoAdjustOverflow' | 'color' | 'destroyTooltipOnHide' | 'getPopupContainer' | 'mouseEnterDelay' | 'mouseLeaveDelay' | 'overlayClassName' | 'overlayStyle' | 'overlayInnerStyle' | 'placement' | 'trigger'>>;
7
+ /**
8
+ * 健值对
9
+ */
10
+ export interface ApLadderLabelValue {
11
+ /**
12
+ * 健名称
13
+ */
14
+ label: string;
15
+ /**
16
+ * 值
17
+ */
18
+ value: string | number | undefined | null;
19
+ /**
20
+ * 是否采用原始值
21
+ */
22
+ rawValue?: boolean;
23
+ /**
24
+ * 精度 默认2位小数
25
+ */
26
+ precision?: number;
27
+ /**
28
+ * 千分位展示
29
+ */
30
+ thousand?: boolean;
31
+ /**
32
+ * 千分位分隔符
33
+ */
34
+ thousandSeparator?: string;
35
+ /**
36
+ * 货币单位
37
+ */
38
+ currency?: CurrencyCode;
39
+ /**
40
+ * 百分比展示
41
+ */
42
+ percent?: boolean;
43
+ /**
44
+ * 自定义单位
45
+ */
46
+ unit?: string;
47
+ /**
48
+ * 自定义单位颜色
49
+ */
50
+ unitColor?: string;
51
+ /**
52
+ * 自定义健颜色
53
+ */
54
+ labelColor?: string;
55
+ /**
56
+ * 自定义值颜色
57
+ */
58
+ valueColor?: string;
59
+ /**
60
+ * 跳转第三方链接
61
+ */
62
+ link?: string;
63
+ /**
64
+ * 自定义链接颜色
65
+ */
66
+ linkColor?: string;
67
+ }
68
+ /**
69
+ * ApLadder Props 属性类型声明
70
+ */
71
+ export interface ApLadderProps {
72
+ /**
73
+ * 重要信息
74
+ * @description 如 操作人名称、供应商名称...
75
+ */
76
+ major: string;
77
+ /**
78
+ * 次要信息
79
+ * @description 如 操作人邮箱、供应商编码...
80
+ */
81
+ minor: string;
82
+ /**
83
+ * 自定义重要信息颜色
84
+ */
85
+ majorColor: string;
86
+ /**
87
+ * 自定义次要信息颜色
88
+ */
89
+ minorColor: string;
90
+ /**
91
+ * 布局方式
92
+ * - `vertical` 垂直布局
93
+ * - `horizontal` 水平布局
94
+ * @default `vertical`
95
+ */
96
+ layout: 'vertical' | 'horizontal';
97
+ /**
98
+ * 是否展示气泡
99
+ * @description 默认展示
100
+ */
101
+ tooltip: boolean;
102
+ /**
103
+ * 健值对 - 数组展示
104
+ */
105
+ labelValues: Array<ApLadderLabelValue>;
106
+ /**
107
+ * 扩展 Tooltip
108
+ */
109
+ tooltipProps: TooltipNeedProps;
110
+ }
111
+ /**
112
+ * ApLadder Slots 类型声明
113
+ */
114
+ export interface ApLadderSlots {
115
+ title?: VNode;
116
+ }
117
+ /**
118
+ * 国际货币代码-映射-语言
119
+ */
120
+ export interface CurrencyCodeInLocale {
121
+ [string: string]: Intl.LocalesArgument;
122
+ }
123
+ /**
124
+ * 国际货币代码
125
+ * - `CNY` 人民币
126
+ * - `USD` 美元
127
+ * - `EUR` 欧元
128
+ * - `GBP` 英镑
129
+ */
130
+ export type CurrencyCode = 'CNY' | 'USD' | 'EUR' | 'GBP';
131
+ /**
132
+ * 国际货币代码-映射-语言
133
+ */
134
+ export declare const locales: CurrencyCodeInLocale;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={USD:"en-US",CNY:"zh-CN",EUR:"de-DE",GBP:"en-GB"};exports.locales=e;
@@ -0,0 +1,56 @@
1
+ .aplus-ap-ladder {
2
+ position: relative;
3
+ width: inherit;
4
+ font-size: 14px;
5
+ /** 自动溢出省略 */
6
+ /** Aplus端样式 */
7
+ /** Admin端样式 */
8
+ }
9
+ .aplus-ap-ladder__ellipsis {
10
+ overflow: hidden;
11
+ text-overflow: ellipsis;
12
+ white-space: nowrap;
13
+ word-break: break-all;
14
+ }
15
+ .aplus-ap-ladder__major {
16
+ line-height: 22px;
17
+ color: #182948;
18
+ }
19
+ .aplus-ap-ladder__minor {
20
+ line-height: 22px;
21
+ color: #8896B0;
22
+ }
23
+ .aplus-ap-ladder__label {
24
+ color: #8896B0;
25
+ word-break: break-all;
26
+ }
27
+ .aplus-ap-ladder__value {
28
+ color: #182948;
29
+ word-break: break-all;
30
+ }
31
+ .aplus-ap-ladder__unit {
32
+ margin-left: 5px;
33
+ color: #182948;
34
+ }
35
+ .aplus-ap-ladder__link {
36
+ cursor: pointer;
37
+ color: #0070ff;
38
+ }
39
+ .aplus-ap-ladder--admin .aplus-ap-ladder__major {
40
+ color: #333333;
41
+ }
42
+ .aplus-ap-ladder--admin .aplus-ap-ladder__minor {
43
+ color: #999999;
44
+ }
45
+ .aplus-ap-ladder--admin .aplus-ap-ladder__label {
46
+ color: #999999;
47
+ }
48
+ .aplus-ap-ladder--admin .aplus-ap-ladder__value {
49
+ color: #333333;
50
+ }
51
+ .aplus-ap-ladder--admin .aplus-ap-ladder__unit {
52
+ color: #333333;
53
+ }
54
+ .aplus-ap-ladder--admin .aplus-ap-ladder__link {
55
+ color: #34b77c;
56
+ }
@@ -1 +1,2 @@
1
1
  export * from './usePageListApTable';
2
+ export * from './useTableRefresh';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./usePageListApTable.js");exports.usePageListApTable=e.usePageListApTable;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./usePageListApTable.js"),s=require("./useTableRefresh.js");exports.usePageListApTable=e.usePageListApTable;exports.useTableRefresh=s.useTableRefresh;
@@ -1,4 +1,5 @@
1
1
  import { ApTableProps } from '../../';
2
+ import { UseTableRefreshOption } from './useTableRefresh';
2
3
  import { Recordable } from '../../type';
3
4
  export interface UsePageListApTable extends ApTableProps {
4
5
  /** 是否显示默认的行选择配置
@@ -9,6 +10,16 @@ export interface UsePageListApTable extends ApTableProps {
9
10
  transformSearchFormValues?: (values: any) => any;
10
11
  /** ApTable数据接口 */
11
12
  api?(record: any): Promise<any>;
13
+ /** 发起请求的时候情况行选中
14
+ * @default true
15
+ */
16
+ clearSelectionOnRequest?: boolean;
17
+ /** 用于覆盖默认的class */
18
+ class?: string;
19
+ /**
20
+ * 表格刷新相关
21
+ */
22
+ tableRefresh?: boolean | Omit<UseTableRefreshOption, 'apTableRef'>;
12
23
  }
13
24
  /**
14
25
  * 集成了列表页面的ApTable的默认配置
@@ -20,10 +31,21 @@ export declare function usePageListApTable(props?: UsePageListApTable): [ApTable
20
31
  reset: () => void;
21
32
  getSearchFormValues: () => any;
22
33
  getApTableInstance: () => {
23
- reset: () => void;
24
34
  submit: () => void;
25
- dataSource: any;
35
+ reset: () => void;
26
36
  setSearchFormValues: (fields: Partial< Recordable>) => void;
27
37
  getSearchFormValues: () => Partial< Recordable>;
28
- } | null;
38
+ dataSource: any;
39
+ rowSelection?: {
40
+ select: (item: any) => void;
41
+ selectedRows: any[];
42
+ unSelect: (item: any) => void;
43
+ isSelected: (item: any) => boolean;
44
+ selectAll: () => void;
45
+ unSelectAll: () => void;
46
+ clearAll: () => void;
47
+ toggleSelect: (item: any) => void;
48
+ } | undefined;
49
+ } | null | undefined;
50
+ clearSelection: () => void;
29
51
  }];
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../index.js");const p=require("lodash-unified"),b=require("vue"),f=require("../../config-provider/hooks/use-global-config.js");function g(l){const t=b.ref(null),n=f.useGlobalConfig("uiMode","aplus");console.log("mode",n.value);const{isShowRowSelection:u=!0,transformSearchFormValues:o,api:a,...c}=l||{},i=async e=>{const r=o?o(e):e;try{if(!a)throw new Error("api is not defined");const{records:s,total:d}=await a(r);return{data:s,total:d}}catch(s){return console.error(s),{data:[],total:0}}};return[p.merge({scroll:{x:"100%",y:"100%"},tableLayout:"fixed",columnResizable:!0,class:"ap-table--sticky",request:a?i:void 0,rowSelection:u?{mode:"internal",fixed:"left",columnWidth:50}:void 0,ref(e){t.value=e}},c),{reload:()=>{var e;(e=t.value)==null||e.submit()},reset:()=>{var e;(e=t.value)==null||e.reset()},getSearchFormValues:()=>{var r;const e=((r=t.value)==null?void 0:r.getSearchFormValues())||{};return o?o(e):e},getApTableInstance:()=>t.value}]}exports.usePageListApTable=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("lodash-unified"),h=require("vue"),m=require("./useTableRefresh.js");function S(a){return a===!0?{}:a===!1?{refreshBefore:()=>!1}:a}function v(a){const r=h.ref(null),{isShowRowSelection:c=!0,clearSelectionOnRequest:u=!0,transformSearchFormValues:s,api:o,tableRefresh:i=!1,...f}=a||{},n=()=>{var e,t;(t=(e=r.value)==null?void 0:e.rowSelection)==null||t.clearAll()};m.useTableRefresh({...S(i),apTableRef:r});const b=async e=>{const t=s?s(e):e;try{if(!o)throw new Error("api is not defined");const{records:l,total:d}=await o(t);return u&&n(),{data:l,total:d}}catch(l){return console.error(l),{data:[],total:0}}};return[p.merge({scroll:{x:"100%",y:"100%"},tableLayout:"fixed",columnResizable:!0,class:"ap-table--sticky",request:o?b:void 0,rowSelection:c?{mode:"internal",fixed:"left",columnWidth:50}:void 0,ref(e){r.value=e}},f),{reload:()=>{var e;(e=r.value)==null||e.submit()},reset:()=>{var e;(e=r.value)==null||e.reset()},getSearchFormValues:()=>{var t;const e=((t=r.value)==null?void 0:t.getSearchFormValues())||{};return s?s(e):e},getApTableInstance:()=>r.value,clearSelection:n}]}exports.usePageListApTable=v;
@@ -0,0 +1,17 @@
1
+ import { Ref } from 'vue';
2
+ import { ApTableExpose } from '../../';
3
+ export interface UseTableRefreshOption {
4
+ /**
5
+ * apTable实例
6
+ */
7
+ apTableRef?: Ref<ApTableExpose | undefined | null>;
8
+ /**
9
+ * 刷新类型,reset:重置,submit:提交
10
+ */
11
+ refreskType?: 'reset' | 'submit';
12
+ /**
13
+ * 刷新前执行,返回false则不执行
14
+ */
15
+ refreshBefore?: () => boolean;
16
+ }
17
+ export declare function useTableRefresh(option?: UseTableRefreshOption): void;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue");function c(e){const a=(["reset","submit",void 0].includes(e==null?void 0:e.refreskType)?e==null?void 0:e.refreskType:"submit")??"submit",r=(e==null?void 0:e.refreshBefore)??(()=>!0);let u=!0;s.onMounted(()=>{s.nextTick(()=>{u=!1})}),s.onActivated(()=>{var f,l;u||r!=null&&r()&&((l=(f=e==null?void 0:e.apTableRef)==null?void 0:f.value)==null||l[a]())})}exports.useTableRefresh=c;