@aplus-frontend/ui 0.1.24 → 0.1.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/es/index.mjs +58 -55
  2. package/es/src/ap-form/search-form/index.vue.mjs +1 -0
  3. package/es/src/ap-layout/ApInfoLayout.vue.d.ts +81 -0
  4. package/es/src/ap-layout/ApInfoLayout.vue.mjs +41 -0
  5. package/es/src/ap-layout/ApInfoLayout.vue2.mjs +4 -0
  6. package/es/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +48 -0
  7. package/es/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.mjs +4 -0
  8. package/es/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.mjs +42 -0
  9. package/es/src/ap-layout/{ap-info-layout → ap-info-layout-aplus}/ap-info-layout.vue.d.ts +3 -3
  10. package/es/src/ap-layout/ap-info-layout-aplus/ap-info-layout.vue.mjs +4 -0
  11. package/es/src/ap-layout/index.d.ts +2 -1
  12. package/es/src/ap-layout/index.mjs +2 -1
  13. package/es/src/ap-layout/interface.d.ts +8 -2
  14. package/es/src/ap-layout/interface.mjs +1 -0
  15. package/es/src/ap-layout/style/ap-info-layout.css +17 -0
  16. package/es/src/business/ap-input-radio/ApInputRadio.vue2.mjs +37 -27
  17. package/es/src/business/ap-input-radio/interface.d.ts +4 -3
  18. package/es/src/business/ap-ladder/ApLadder.vue.d.ts +159 -0
  19. package/es/src/business/ap-ladder/ApLadder.vue.mjs +4 -0
  20. package/es/src/business/ap-ladder/ApLadder.vue2.mjs +146 -0
  21. package/es/src/business/ap-ladder/interface.d.ts +92 -0
  22. package/es/src/business/ap-ladder/style.css +56 -0
  23. package/es/src/business/hooks/index.d.ts +1 -0
  24. package/es/src/business/hooks/index.mjs +3 -1
  25. package/es/src/business/hooks/usePageListApTable.d.ts +19 -2
  26. package/es/src/business/hooks/usePageListApTable.mjs +24 -23
  27. package/es/src/business/hooks/useTableRefresh.d.ts +18 -0
  28. package/es/src/business/hooks/useTableRefresh.mjs +16 -0
  29. package/es/src/business/index.d.ts +718 -8
  30. package/es/src/business/index.mjs +25 -22
  31. package/es/src/components.d.ts +1 -0
  32. package/es/src/index.mjs +206 -203
  33. package/es/src/theme/antd-global-overwrite/aplus/index.css +8 -0
  34. package/es/src/theme/antd-global-overwrite/aplus/table.css +8 -0
  35. package/es/src/theme/ap-ladder/ap-ladder.css +56 -0
  36. package/es/src/theme/ap-layout/ap-info-layout.css +17 -0
  37. package/lib/index.js +1 -1
  38. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  39. package/lib/src/ap-layout/ApInfoLayout.vue.d.ts +81 -0
  40. package/lib/src/ap-layout/ApInfoLayout.vue.js +1 -0
  41. package/lib/src/ap-layout/ApInfoLayout.vue2.js +1 -0
  42. package/lib/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +48 -0
  43. package/lib/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.js +1 -0
  44. package/lib/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.js +1 -0
  45. package/lib/src/ap-layout/{ap-info-layout → ap-info-layout-aplus}/ap-info-layout.vue.d.ts +3 -3
  46. package/lib/src/ap-layout/{ap-info-layout/ap-info-layout.vue2.js → ap-info-layout-aplus/ap-info-layout.vue.js} +1 -1
  47. package/lib/src/ap-layout/index.d.ts +2 -1
  48. package/lib/src/ap-layout/index.js +1 -1
  49. package/lib/src/ap-layout/interface.d.ts +8 -2
  50. package/lib/src/ap-layout/interface.js +1 -0
  51. package/lib/src/ap-layout/style/ap-info-layout.css +17 -0
  52. package/lib/src/business/ap-input-radio/ApInputRadio.vue2.js +1 -1
  53. package/lib/src/business/ap-input-radio/interface.d.ts +4 -3
  54. package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +159 -0
  55. package/lib/src/business/ap-ladder/ApLadder.vue.js +1 -0
  56. package/lib/src/business/ap-ladder/ApLadder.vue2.js +1 -0
  57. package/lib/src/business/ap-ladder/interface.d.ts +92 -0
  58. package/lib/src/business/ap-ladder/style.css +56 -0
  59. package/lib/src/business/hooks/index.d.ts +1 -0
  60. package/lib/src/business/hooks/index.js +1 -1
  61. package/lib/src/business/hooks/usePageListApTable.d.ts +19 -2
  62. package/lib/src/business/hooks/usePageListApTable.js +1 -1
  63. package/lib/src/business/hooks/useTableRefresh.d.ts +18 -0
  64. package/lib/src/business/hooks/useTableRefresh.js +1 -0
  65. package/lib/src/business/index.d.ts +718 -8
  66. package/lib/src/business/index.js +1 -1
  67. package/lib/src/components.d.ts +1 -0
  68. package/lib/src/index.js +1 -1
  69. package/lib/src/theme/antd-global-overwrite/aplus/index.css +8 -0
  70. package/lib/src/theme/antd-global-overwrite/aplus/table.css +8 -0
  71. package/lib/src/theme/ap-ladder/ap-ladder.css +56 -0
  72. package/lib/src/theme/ap-layout/ap-info-layout.css +17 -0
  73. package/package.json +1 -1
  74. package/es/src/ap-layout/ap-info-layout/ap-info-layout.vue2.mjs +0 -4
  75. /package/es/src/ap-layout/{ap-info-layout/ap-info-layout.vue.mjs → ap-info-layout-aplus/ap-info-layout.vue2.mjs} +0 -0
  76. /package/es/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.d.ts +0 -0
  77. /package/es/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.mjs +0 -0
  78. /package/es/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue2.mjs +0 -0
  79. /package/es/src/business/{expandAlert → ap-expand-alert}/interface.d.ts +0 -0
  80. /package/es/src/business/{expandAlert → ap-expand-alert}/style.css +0 -0
  81. /package/lib/src/ap-layout/{ap-info-layout/ap-info-layout.vue.js → ap-info-layout-aplus/ap-info-layout.vue2.js} +0 -0
  82. /package/lib/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.d.ts +0 -0
  83. /package/lib/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.js +0 -0
  84. /package/lib/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue2.js +0 -0
  85. /package/lib/src/business/{expandAlert → ap-expand-alert}/interface.d.ts +0 -0
  86. /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,4 @@
1
+ import f from "./ApLadder.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,146 @@
1
+ import { defineComponent as O, useSlots as T, ref as W, computed as d, unref as l, onMounted as q, openBlock as t, createElementBlock as s, normalizeClass as a, createBlock as P, normalizeProps as S, mergeProps as _, createSlots as V, withCtx as m, Fragment as c, createElementVNode as u, normalizeStyle as p, toDisplayString as i, renderSlot as $, createCommentVNode as C, renderList as E } from "vue";
2
+ import { Tooltip as M } from "ant-design-vue";
3
+ import "../../config-provider/index.mjs";
4
+ import "./style.css";
5
+ import { useNamespace as H } from "../../config-provider/hooks/use-namespace.mjs";
6
+ import { useGlobalConfig as J } from "../../config-provider/hooks/use-global-config.mjs";
7
+ const K = { key: 0 }, Q = { key: 1 }, R = ["onClick"], U = { key: 0 }, X = { key: 1 }, re = /* @__PURE__ */ O({
8
+ name: "ApLadder",
9
+ __name: "ApLadder",
10
+ props: {
11
+ major: { default: "" },
12
+ minor: { default: "" },
13
+ majorColor: { default: "" },
14
+ minorColor: { default: "" },
15
+ layout: { default: "vertical" },
16
+ tooltip: { type: Boolean, default: !0 },
17
+ labelValues: { default: () => [] },
18
+ tooltipProps: { default: () => ({
19
+ title: void 0,
20
+ align: {},
21
+ arrowPointAtCenter: !1,
22
+ arrow: !0,
23
+ autoAdjustOverflow: !0,
24
+ color: "",
25
+ destroyTooltipOnHide: !1,
26
+ getPopupContainer: () => document.body,
27
+ mouseEnterDelay: 0.1,
28
+ mouseLeaveDelay: 0.1,
29
+ overlayClassName: "",
30
+ overlayStyle: {},
31
+ overlayInnerStyle: {},
32
+ placement: "top",
33
+ trigger: "hover"
34
+ }) }
35
+ },
36
+ setup(w) {
37
+ const y = T(), r = w, { b: A, e: n, m: B } = H("ap-ladder"), N = J("uiMode", "aplus"), v = `ap-ladder-${Math.floor(Math.random() * 1e7)}`, L = n("ellipsis"), h = W(!1), z = d(() => r.major || r.minor), D = d(() => r.labelValues.length > 0), b = d(() => r.majorColor ? {
38
+ color: `${r.majorColor}`
39
+ } : {}), j = d(() => r.minorColor ? {
40
+ color: `${r.minorColor}`
41
+ } : {}), f = (e) => e == null ? "--" : typeof e == "string" ? e || "--" : typeof e == "number" ? e.toFixed(2) : "--", F = () => {
42
+ const e = document.getElementById(v);
43
+ if (!e)
44
+ return;
45
+ e.querySelectorAll(`.${L}`).forEach((o) => {
46
+ o.clientWidth < o.scrollWidth && (h.value = !0);
47
+ });
48
+ }, g = d(() => y.title ? !0 : r.tooltip && l(h)), G = (e) => {
49
+ e && window.open(e, "_blank");
50
+ };
51
+ return q(() => {
52
+ F();
53
+ }), (e, I) => (t(), s("div", {
54
+ id: v,
55
+ class: a([l(A)(), `${l(B)(l(N))}`])
56
+ }, [
57
+ z.value ? (t(), P(l(M), S(_({ key: 0 }, { ...r.tooltipProps })), V({
58
+ default: m(() => [
59
+ r.layout === "vertical" ? (t(), s(c, { key: 0 }, [
60
+ u("div", {
61
+ class: a([l(n)("major"), l(n)("ellipsis")]),
62
+ style: p(b.value)
63
+ }, i(e.major || "--"), 7),
64
+ u("div", {
65
+ class: a([l(n)("minor"), l(n)("ellipsis")]),
66
+ style: p(j.value)
67
+ }, i(e.minor || "--"), 7)
68
+ ], 64)) : (t(), s("div", {
69
+ key: 1,
70
+ class: a(l(n)("ellipsis"))
71
+ }, [
72
+ u("span", {
73
+ class: a([l(n)("major")]),
74
+ style: p(b.value)
75
+ }, i(e.major || "--"), 7),
76
+ u("span", {
77
+ class: a([l(n)("minor")]),
78
+ style: p(j.value)
79
+ }, i(e.minor || "--"), 7)
80
+ ], 2))
81
+ ]),
82
+ _: 2
83
+ }, [
84
+ g.value ? {
85
+ name: "title",
86
+ fn: m(() => [
87
+ y.title ? $(e.$slots, "title", { key: 0 }) : (t(), s(c, { key: 1 }, [
88
+ r.tooltipProps.title ? (t(), s("div", K, i(r.tooltipProps.title), 1)) : (t(), s("div", Q, [
89
+ u("div", null, i(e.major || "--"), 1),
90
+ u("div", null, i(e.minor || "--"), 1)
91
+ ]))
92
+ ], 64))
93
+ ]),
94
+ key: "0"
95
+ } : void 0
96
+ ]), 1040)) : C("", !0),
97
+ D.value ? (t(), P(l(M), S(_({ key: 1 }, { ...r.tooltipProps })), V({
98
+ default: m(() => [
99
+ (t(!0), s(c, null, E(r.labelValues, (o, k) => (t(), s("div", {
100
+ key: k,
101
+ class: a([l(n)("ellipsis")])
102
+ }, [
103
+ u("span", {
104
+ class: a(l(n)("label")),
105
+ style: p(o.labelColor ? { color: o.labelColor } : void 0)
106
+ }, i(o.label) + ":", 7),
107
+ o.link ? (t(), s("span", {
108
+ key: 0,
109
+ class: a(l(n)("link")),
110
+ style: p(o.linkColor ? { color: o.linkColor } : void 0),
111
+ onClick: (Y) => G(o.link)
112
+ }, i(f(o.value)), 15, R)) : (t(), s("span", {
113
+ key: 1,
114
+ class: a(l(n)("value")),
115
+ style: p(o.valueColor ? { color: o.valueColor } : void 0)
116
+ }, i(f(o.value)), 7)),
117
+ o.unit ? (t(), s("span", {
118
+ key: 2,
119
+ class: a(l(n)("unit")),
120
+ style: p(o.unitColor ? { color: o.unitColor } : void 0)
121
+ }, i(o.unit), 7)) : C("", !0)
122
+ ], 2))), 128))
123
+ ]),
124
+ _: 2
125
+ }, [
126
+ g.value ? {
127
+ name: "title",
128
+ fn: m(() => [
129
+ y.title ? $(e.$slots, "title", { key: 0 }) : (t(), s(c, { key: 1 }, [
130
+ r.tooltipProps.title ? (t(), s("div", U, i(r.tooltipProps.title), 1)) : (t(), s("div", X, [
131
+ (t(!0), s(c, null, E(r.labelValues, (o, k) => (t(), s("div", { key: k }, [
132
+ u("span", null, i(o.label), 1),
133
+ u("span", null, i(f(o.value)), 1)
134
+ ]))), 128))
135
+ ]))
136
+ ], 64))
137
+ ]),
138
+ key: "0"
139
+ } : void 0
140
+ ]), 1040)) : C("", !0)
141
+ ], 2));
142
+ }
143
+ });
144
+ export {
145
+ re as default
146
+ };
@@ -0,0 +1,92 @@
1
+ import { TooltipProps } from 'ant-design-vue/es/tooltip/Tooltip';
2
+ import { VNode } from 'vue';
3
+ /**
4
+ * Tooltip 需要的属性
5
+ */
6
+ export type TooltipNeedProps = Required<Pick<TooltipProps, 'title' | 'align' | 'arrowPointAtCenter' | 'arrow' | 'autoAdjustOverflow' | 'color' | 'destroyTooltipOnHide' | 'getPopupContainer' | 'mouseEnterDelay' | 'mouseLeaveDelay' | 'overlayClassName' | 'overlayStyle' | 'overlayInnerStyle' | 'placement' | 'trigger'>>;
7
+ /**
8
+ * 健值对
9
+ */
10
+ export interface ApLadderLabelValue {
11
+ /**
12
+ * 健名称
13
+ */
14
+ label: string;
15
+ /**
16
+ * 值
17
+ */
18
+ value: string | number | undefined | null;
19
+ /**
20
+ * 自定义单位
21
+ */
22
+ unit?: string;
23
+ /**
24
+ * 自定义单位颜色
25
+ */
26
+ unitColor?: string;
27
+ /**
28
+ * 自定义健颜色
29
+ */
30
+ labelColor?: string;
31
+ /**
32
+ * 自定义值颜色
33
+ */
34
+ valueColor?: string;
35
+ /**
36
+ * 跳转第三方链接
37
+ */
38
+ link?: string;
39
+ /**
40
+ * 自定义链接颜色
41
+ */
42
+ linkColor?: string;
43
+ }
44
+ /**
45
+ * ApLadder Props 属性类型声明
46
+ */
47
+ export interface ApLadderProps {
48
+ /**
49
+ * 重要信息
50
+ * @description 如 操作人名称、供应商名称...
51
+ */
52
+ major: string;
53
+ /**
54
+ * 次要信息
55
+ * @description 如 操作人邮箱、供应商编码...
56
+ */
57
+ minor: string;
58
+ /**
59
+ * 自定义重要信息颜色
60
+ */
61
+ majorColor: string;
62
+ /**
63
+ * 自定义次要信息颜色
64
+ */
65
+ minorColor: string;
66
+ /**
67
+ * 布局方式
68
+ * - `vertical` 垂直布局
69
+ * - `horizontal` 水平布局
70
+ * @default `vertical`
71
+ */
72
+ layout: 'vertical' | 'horizontal';
73
+ /**
74
+ * 是否展示气泡
75
+ * @description 默认展示
76
+ */
77
+ tooltip: boolean;
78
+ /**
79
+ * 健值对 - 数组展示
80
+ */
81
+ labelValues: Array<ApLadderLabelValue>;
82
+ /**
83
+ * 扩展 Tooltip
84
+ */
85
+ tooltipProps: TooltipNeedProps;
86
+ }
87
+ /**
88
+ * ApLadder Slots 类型声明
89
+ */
90
+ export interface ApLadderSlots {
91
+ title?: VNode;
92
+ }
@@ -0,0 +1,56 @@
1
+ .aplus-ap-ladder {
2
+ position: relative;
3
+ width: inherit;
4
+ font-size: 14px;
5
+ /** 自动溢出省略 */
6
+ /** Aplus端样式 */
7
+ /** Admin端样式 */
8
+ }
9
+ .aplus-ap-ladder__ellipsis {
10
+ overflow: hidden;
11
+ text-overflow: ellipsis;
12
+ white-space: nowrap;
13
+ word-break: break-all;
14
+ }
15
+ .aplus-ap-ladder__major {
16
+ line-height: 22px;
17
+ color: #182948;
18
+ }
19
+ .aplus-ap-ladder__minor {
20
+ line-height: 22px;
21
+ color: #8896B0;
22
+ }
23
+ .aplus-ap-ladder__label {
24
+ color: #8896B0;
25
+ word-break: break-all;
26
+ }
27
+ .aplus-ap-ladder__value {
28
+ color: #182948;
29
+ word-break: break-all;
30
+ }
31
+ .aplus-ap-ladder__unit {
32
+ margin-left: 5px;
33
+ color: #182948;
34
+ }
35
+ .aplus-ap-ladder__link {
36
+ cursor: pointer;
37
+ color: #0070ff;
38
+ }
39
+ .aplus-ap-ladder--admin .aplus-ap-ladder__major {
40
+ color: #333333;
41
+ }
42
+ .aplus-ap-ladder--admin .aplus-ap-ladder__minor {
43
+ color: #999999;
44
+ }
45
+ .aplus-ap-ladder--admin .aplus-ap-ladder__label {
46
+ color: #999999;
47
+ }
48
+ .aplus-ap-ladder--admin .aplus-ap-ladder__value {
49
+ color: #333333;
50
+ }
51
+ .aplus-ap-ladder--admin .aplus-ap-ladder__unit {
52
+ color: #333333;
53
+ }
54
+ .aplus-ap-ladder--admin .aplus-ap-ladder__link {
55
+ color: #34b77c;
56
+ }
@@ -1 +1,2 @@
1
1
  export * from './usePageListApTable';
2
+ export * from './useTableRefresh';
@@ -1,4 +1,6 @@
1
1
  import { usePageListApTable as o } from "./usePageListApTable.mjs";
2
+ import { useTableRefresh as a } from "./useTableRefresh.mjs";
2
3
  export {
3
- o as usePageListApTable
4
+ o as usePageListApTable,
5
+ a as useTableRefresh
4
6
  };
@@ -9,6 +9,12 @@ export interface UsePageListApTable extends ApTableProps {
9
9
  transformSearchFormValues?: (values: any) => any;
10
10
  /** ApTable数据接口 */
11
11
  api?(record: any): Promise<any>;
12
+ /** 发起请求的时候情况行选中
13
+ * @default true
14
+ */
15
+ clearSelectionOnRequest?: boolean;
16
+ /** 用于覆盖默认的class */
17
+ class?: string;
12
18
  }
13
19
  /**
14
20
  * 集成了列表页面的ApTable的默认配置
@@ -20,10 +26,21 @@ export declare function usePageListApTable(props?: UsePageListApTable): [ApTable
20
26
  reset: () => void;
21
27
  getSearchFormValues: () => any;
22
28
  getApTableInstance: () => {
23
- reset: () => void;
24
29
  submit: () => void;
25
- dataSource: any;
30
+ reset: () => void;
26
31
  setSearchFormValues: (fields: Partial< Recordable>) => void;
27
32
  getSearchFormValues: () => Partial< Recordable>;
33
+ dataSource: any;
34
+ rowSelection?: {
35
+ select: (item: any) => void;
36
+ selectedRows: any[];
37
+ unSelect: (item: any) => void;
38
+ isSelected: (item: any) => boolean;
39
+ selectAll: () => void;
40
+ unSelectAll: () => void;
41
+ clearAll: () => void;
42
+ toggleSelect: (item: any) => void;
43
+ } | undefined;
28
44
  } | null;
45
+ clearSelection: () => void;
29
46
  }];
@@ -1,17 +1,17 @@
1
- import "../../index.mjs";
2
- import { merge as p } from "lodash-unified";
3
- import { ref as m } from "vue";
4
- import { useGlobalConfig as d } from "../../config-provider/hooks/use-global-config.mjs";
5
- function A(l) {
6
- const t = m(null), n = d("uiMode", "aplus");
7
- console.log("mode", n.value);
8
- const {
1
+ import { merge as m } from "lodash-unified";
2
+ import { ref as d } from "vue";
3
+ function y(n) {
4
+ const r = d(null), {
9
5
  isShowRowSelection: c = !0,
6
+ clearSelectionOnRequest: u = !0,
10
7
  transformSearchFormValues: o,
11
8
  api: a,
12
- ...u
13
- } = l || {};
14
- return [p(
9
+ ...i
10
+ } = n || {}, l = () => {
11
+ var e, t;
12
+ (t = (e = r.value) == null ? void 0 : e.rowSelection) == null || t.clearAll();
13
+ };
14
+ return [m(
15
15
  {
16
16
  // scroll,tableLayout,columnResizable设置表格可拖动
17
17
  scroll: { x: "100%", y: "100%" },
@@ -20,13 +20,13 @@ function A(l) {
20
20
  // 表格header吸顶效果
21
21
  class: "ap-table--sticky",
22
22
  request: a ? async (e) => {
23
- const r = o ? o(e) : e;
23
+ const t = o ? o(e) : e;
24
24
  try {
25
25
  if (!a) throw new Error("api is not defined");
26
- const { records: s, total: i } = await a(r);
27
- return {
26
+ const { records: s, total: p } = await a(t);
27
+ return u && l(), {
28
28
  data: s,
29
- total: i
29
+ total: p
30
30
  };
31
31
  } catch (s) {
32
32
  return console.error(s), {
@@ -41,27 +41,28 @@ function A(l) {
41
41
  columnWidth: 50
42
42
  } : void 0,
43
43
  ref(e) {
44
- t.value = e;
44
+ r.value = e;
45
45
  }
46
46
  },
47
- u
47
+ i
48
48
  ), {
49
49
  reload: () => {
50
50
  var e;
51
- (e = t.value) == null || e.submit();
51
+ (e = r.value) == null || e.submit();
52
52
  },
53
53
  reset: () => {
54
54
  var e;
55
- (e = t.value) == null || e.reset();
55
+ (e = r.value) == null || e.reset();
56
56
  },
57
57
  getSearchFormValues: () => {
58
- var r;
59
- const e = ((r = t.value) == null ? void 0 : r.getSearchFormValues()) || {};
58
+ var t;
59
+ const e = ((t = r.value) == null ? void 0 : t.getSearchFormValues()) || {};
60
60
  return o ? o(e) : e;
61
61
  },
62
- getApTableInstance: () => t.value
62
+ getApTableInstance: () => r.value,
63
+ clearSelection: l
63
64
  }];
64
65
  }
65
66
  export {
66
- A as usePageListApTable
67
+ y as usePageListApTable
67
68
  };
@@ -0,0 +1,18 @@
1
+ import { Ref } from 'vue';
2
+ import { ApTableExpose } from '../..';
3
+ interface UseTableRefreshOption {
4
+ /**
5
+ * apTable实例
6
+ */
7
+ apTableRef?: Ref<ApTableExpose | undefined>;
8
+ /**
9
+ * 刷新类型,reset:重置,submit:提交
10
+ */
11
+ refreskType?: 'reset' | 'submit';
12
+ /**
13
+ * 刷新前执行,返回false则不执行
14
+ */
15
+ refreshBefore?: () => boolean;
16
+ }
17
+ export declare function useTableRefresh(option?: UseTableRefreshOption): void;
18
+ export {};
@@ -0,0 +1,16 @@
1
+ import { onActivated as l } from "vue";
2
+ function c(e) {
3
+ 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);
4
+ let s = !0;
5
+ l(() => {
6
+ var u, f;
7
+ if (s) {
8
+ s = !1;
9
+ return;
10
+ }
11
+ r != null && r() && ((f = (u = e == null ? void 0 : e.apTableRef) == null ? void 0 : u.value) == null || f[a]());
12
+ });
13
+ }
14
+ export {
15
+ c as useTableRefresh
16
+ };