@aplus-frontend/ui 0.0.18 → 0.0.19

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 (67) hide show
  1. package/es/index.mjs +26 -23
  2. package/es/src/ap-field/date/index.vue.d.ts +3 -1
  3. package/es/src/ap-field/date-range/index.vue.d.ts +3 -3
  4. package/es/src/ap-field/date-range/index.vue.mjs +1 -1
  5. package/es/src/ap-field/interface.d.ts +1 -1
  6. package/es/src/ap-form/ap-form-item.vue.mjs +61 -57
  7. package/es/src/ap-form/search-form/index.vue.mjs +1 -1
  8. package/es/src/ap-form/style/ap-form-item.css +11 -0
  9. package/es/src/ap-modal/index.d.ts +9 -0
  10. package/es/src/ap-modal/index.mjs +10 -0
  11. package/es/src/ap-modal/type.d.ts +13 -0
  12. package/es/src/ap-modal/type.mjs +1 -0
  13. package/es/src/ap-modal/utils/createModal.d.ts +3 -0
  14. package/es/src/ap-modal/utils/createModal.mjs +74 -0
  15. package/es/src/ap-modal/utils/index.d.ts +1 -0
  16. package/es/src/ap-modal/utils/index.mjs +4 -0
  17. package/es/src/ap-table/ap-table.vue.mjs +133 -120
  18. package/es/src/ap-table/constants.d.ts +25 -23
  19. package/es/src/ap-table/interface.d.ts +4 -0
  20. package/es/src/ap-table/style/ap-table.css +1 -0
  21. package/es/src/business/expandAlert/ApExpandAlert.vue.d.ts +81 -0
  22. package/es/src/business/expandAlert/ApExpandAlert.vue.mjs +4 -0
  23. package/es/src/business/expandAlert/ApExpandAlert.vue2.mjs +113 -0
  24. package/es/src/business/expandAlert/interface.d.ts +26 -0
  25. package/es/src/business/expandAlert/style.css +42 -0
  26. package/es/src/business/index.d.ts +161 -1
  27. package/es/src/business/index.mjs +7 -4
  28. package/es/src/index.d.ts +1 -0
  29. package/es/src/index.mjs +194 -191
  30. package/es/src/theme/ap-expand-alert/ap-expand-alert.css +42 -0
  31. package/es/src/theme/ap-form/ap-form-item.css +11 -0
  32. package/es/src/theme/ap-table/ap-table.css +1 -0
  33. package/es/src/type.d.ts +3 -1
  34. package/lib/index.js +1 -1
  35. package/lib/src/ap-field/date/index.vue.d.ts +3 -1
  36. package/lib/src/ap-field/date-range/index.vue.d.ts +3 -3
  37. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  38. package/lib/src/ap-field/interface.d.ts +1 -1
  39. package/lib/src/ap-form/ap-form-item.vue.js +1 -1
  40. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  41. package/lib/src/ap-form/style/ap-form-item.css +11 -0
  42. package/lib/src/ap-modal/index.d.ts +9 -0
  43. package/lib/src/ap-modal/index.js +1 -0
  44. package/lib/src/ap-modal/type.d.ts +13 -0
  45. package/lib/src/ap-modal/type.js +1 -0
  46. package/lib/src/ap-modal/utils/createModal.d.ts +3 -0
  47. package/lib/src/ap-modal/utils/createModal.js +1 -0
  48. package/lib/src/ap-modal/utils/index.d.ts +1 -0
  49. package/lib/src/ap-modal/utils/index.js +1 -0
  50. package/lib/src/ap-table/ap-table.vue.js +1 -1
  51. package/lib/src/ap-table/constants.d.ts +25 -23
  52. package/lib/src/ap-table/interface.d.ts +4 -0
  53. package/lib/src/ap-table/style/ap-table.css +1 -0
  54. package/lib/src/business/expandAlert/ApExpandAlert.vue.d.ts +81 -0
  55. package/lib/src/business/expandAlert/ApExpandAlert.vue.js +1 -0
  56. package/lib/src/business/expandAlert/ApExpandAlert.vue2.js +1 -0
  57. package/lib/src/business/expandAlert/interface.d.ts +26 -0
  58. package/lib/src/business/expandAlert/style.css +42 -0
  59. package/lib/src/business/index.d.ts +161 -1
  60. package/lib/src/business/index.js +1 -1
  61. package/lib/src/index.d.ts +1 -0
  62. package/lib/src/index.js +1 -1
  63. package/lib/src/theme/ap-expand-alert/ap-expand-alert.css +42 -0
  64. package/lib/src/theme/ap-form/ap-form-item.css +11 -0
  65. package/lib/src/theme/ap-table/ap-table.css +1 -0
  66. package/lib/src/type.d.ts +3 -1
  67. package/package.json +3 -3
@@ -0,0 +1,113 @@
1
+ import { defineComponent as H, ref as f, computed as v, watch as I, nextTick as L, openBlock as s, createElementBlock as i, normalizeClass as l, unref as e, createVNode as h, withCtx as d, createBlock as $, createElementVNode as c, toDisplayString as r, createCommentVNode as y, normalizeStyle as z, renderSlot as R, Fragment as g, renderList as S } from "vue";
2
+ import { DownOutlined as V } from "@ant-design/icons-vue";
3
+ import { Alert as D, Tooltip as M } from "ant-design-vue";
4
+ import { ApActionItem as O } from "../../ap-action/index.mjs";
5
+ import "../../config-provider/index.mjs";
6
+ import "./style.css";
7
+ import { useNamespace as F } from "../../config-provider/hooks/use-namespace.mjs";
8
+ import { useGlobalConfig as G } from "../../config-provider/hooks/use-global-config.mjs";
9
+ const W = { key: 0 }, j = ["onClick"], _ = /* @__PURE__ */ H({
10
+ __name: "ApExpandAlert",
11
+ props: {
12
+ type: { default: "warning" },
13
+ data: { default: () => [] },
14
+ prefix: { default: "" },
15
+ tipTitle: { default: "查看详情" },
16
+ mapLabel: {},
17
+ separator: { default: "|" }
18
+ },
19
+ emits: ["choose"],
20
+ setup(w) {
21
+ const x = w, o = f(""), p = f(null), b = v(() => ({
22
+ fontWeight: "400",
23
+ wordBreak: "break-all",
24
+ overflow: "hidden",
25
+ display: "-webkit-box",
26
+ webkitLineClamp: o.value,
27
+ webkitBoxOrient: "vertical",
28
+ lineHeight: "22px"
29
+ }));
30
+ function C() {
31
+ o.value === "1" ? o.value = "" : o.value = "1";
32
+ }
33
+ const B = v(() => o.value === "1" ? "展开" : "收起"), m = f(!0), k = v(() => o.value !== "1");
34
+ I(
35
+ () => x.data,
36
+ () => {
37
+ o.value = "", L(() => {
38
+ if (p.value) {
39
+ const t = Number(p.value.clientHeight), u = Number(
40
+ parseInt(p.value.style.lineHeight)
41
+ );
42
+ t <= u && k.value ? m.value = !1 : m.value = !0;
43
+ }
44
+ });
45
+ },
46
+ {
47
+ immediate: !0
48
+ }
49
+ );
50
+ const { b: A, e: a, m: N } = F("ap-expand-alert"), T = G("uiMode", "aplus");
51
+ return (t, u) => (s(), i("div", {
52
+ class: l([e(A)(), `${e(N)(e(T))}`])
53
+ }, [
54
+ h(e(D), {
55
+ type: t.type,
56
+ "show-icon": "",
57
+ class: l(e(a)("antAlert"))
58
+ }, {
59
+ action: d(() => [
60
+ m.value ? (s(), $(e(O), {
61
+ key: 0,
62
+ size: "small",
63
+ onClick: u[0] || (u[0] = (n) => C()),
64
+ style: { "font-size": "12px", "padding-left": "16px" }
65
+ }, {
66
+ default: d(() => [
67
+ c("span", {
68
+ class: l(e(a)("expandText"))
69
+ }, r(B.value), 3),
70
+ h(e(V), {
71
+ class: l(k.value ? e(a)("expandIcon") : e(a)("collapseIcon"))
72
+ }, null, 8, ["class"])
73
+ ]),
74
+ _: 1
75
+ })) : y("", !0)
76
+ ]),
77
+ message: d(() => [
78
+ c("div", {
79
+ style: z(b.value),
80
+ class: l(e(a)("alertContent")),
81
+ ref_key: "ellipsisBoxRef",
82
+ ref: p
83
+ }, [
84
+ R(t.$slots, "default", {}, () => [
85
+ c("span", {
86
+ class: l(e(a)("prefix"))
87
+ }, r(t.prefix), 3),
88
+ typeof t.data == "string" ? (s(), i("span", W, r(t.data), 1)) : (s(!0), i(g, { key: 1 }, S(t.data, (n, E) => (s(), i(g, { key: n }, [
89
+ h(e(M), { title: t.tipTitle }, {
90
+ default: d(() => [
91
+ c("span", {
92
+ class: l(e(a)("showItem")),
93
+ onClick: (q) => t.$emit("choose", n)
94
+ }, r(t.mapLabel ? n[t.mapLabel] : n), 11, j)
95
+ ]),
96
+ _: 2
97
+ }, 1032, ["title"]),
98
+ E !== t.data.length - 1 ? (s(), i("span", {
99
+ key: 0,
100
+ class: l(e(a)("spliter"))
101
+ }, r(t.separator), 3)) : y("", !0)
102
+ ], 64))), 128))
103
+ ])
104
+ ], 6)
105
+ ]),
106
+ _: 3
107
+ }, 8, ["type", "class"])
108
+ ], 2));
109
+ }
110
+ });
111
+ export {
112
+ _ as default
113
+ };
@@ -0,0 +1,26 @@
1
+ export interface ApExpandAlertProps {
2
+ /**
3
+ * Alert类型
4
+ */
5
+ type: 'warning' | 'error' | 'success' | 'info' | undefined;
6
+ /**
7
+ * 展开数据
8
+ */
9
+ data: Array<any> | string;
10
+ /**
11
+ * 标题前缀
12
+ */
13
+ prefix?: string;
14
+ /**
15
+ * Tooltip 提示标题
16
+ */
17
+ tipTitle?: string;
18
+ /**
19
+ * Label映射字段
20
+ */
21
+ mapLabel?: string;
22
+ /**
23
+ * 分隔符
24
+ */
25
+ separator: string;
26
+ }
@@ -0,0 +1,42 @@
1
+ .aplus-ap-expand-alert .aplus-action-item {
2
+ font-size: 12px;
3
+ }
4
+ .aplus-ap-expand-alert__expandText {
5
+ font-size: 12px;
6
+ margin-inline-end: 4px;
7
+ margin-inline-start: 4px;
8
+ }
9
+ .aplus-ap-expand-alert__expandIcon {
10
+ transition: all 0.3s;
11
+ transform: rotateZ(180deg);
12
+ }
13
+ .aplus-ap-expand-alert__collapseIcon {
14
+ transition: all 0.3s;
15
+ transform: rotateZ(0deg);
16
+ }
17
+ .aplus-ap-expand-alert__alertContent {
18
+ color: #182948;
19
+ }
20
+ .aplus-ap-expand-alert__prefix {
21
+ color: #182948;
22
+ }
23
+ .aplus-ap-expand-alert__showItem {
24
+ color: #0070ff;
25
+ cursor: pointer;
26
+ white-space: nowrap;
27
+ }
28
+ .aplus-ap-expand-alert__showItem:hover {
29
+ color: #66a9ff;
30
+ }
31
+ .aplus-ap-expand-alert__spliter {
32
+ color: #dee4ed;
33
+ padding: 0 8px;
34
+ }
35
+ .aplus-ap-expand-alert__antAlert.ant-alert {
36
+ align-items: flex-start;
37
+ line-height: 18px;
38
+ }
39
+ .aplus-ap-expand-alert__antAlert.ant-alert .ant-alert-icon {
40
+ font-size: 16px;
41
+ transform: translateY(2px);
42
+ }
@@ -2,6 +2,8 @@ import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOpt
2
2
  import { LiteralUnion } from 'ant-design-vue/es/_util/type';
3
3
  import { TooltipPlacement } from 'ant-design-vue/es/tooltip';
4
4
  export type { ApTitleProps } from './title/interface';
5
+ export type { ApExpandAlertProps } from './expandAlert/interface';
6
+ export type { ApLabelProps } from './ap-label/interface';
5
7
  export declare const ApTitle: {
6
8
  new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
7
9
  trigger: {
@@ -123,7 +125,165 @@ export declare const ApTitle: {
123
125
  onClick?: (() => void) | undefined;
124
126
  };
125
127
  });
126
- export type { ApLabelProps } from './ap-label/interface';
128
+ export declare const ApExpandAlert: {
129
+ new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
130
+ type: {
131
+ type: PropType<"success" | "error" | "info" | "warning" | undefined>;
132
+ required: true;
133
+ default: string;
134
+ };
135
+ data: {
136
+ type: PropType<string | any[]>;
137
+ required: true;
138
+ default: () => never[];
139
+ };
140
+ prefix: {
141
+ type: PropType<string>;
142
+ default: string;
143
+ };
144
+ separator: {
145
+ type: PropType<string>;
146
+ required: true;
147
+ default: string;
148
+ };
149
+ tipTitle: {
150
+ type: PropType<string>;
151
+ default: string;
152
+ };
153
+ mapLabel: {
154
+ type: PropType<string>;
155
+ };
156
+ }>> & {
157
+ onChoose?: ((...args: any[]) => any) | undefined;
158
+ }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
159
+ choose: (...args: any[]) => void;
160
+ }, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{
161
+ type: {
162
+ type: PropType<"success" | "error" | "info" | "warning" | undefined>;
163
+ required: true;
164
+ default: string;
165
+ };
166
+ data: {
167
+ type: PropType<string | any[]>;
168
+ required: true;
169
+ default: () => never[];
170
+ };
171
+ prefix: {
172
+ type: PropType<string>;
173
+ default: string;
174
+ };
175
+ separator: {
176
+ type: PropType<string>;
177
+ required: true;
178
+ default: string;
179
+ };
180
+ tipTitle: {
181
+ type: PropType<string>;
182
+ default: string;
183
+ };
184
+ mapLabel: {
185
+ type: PropType<string>;
186
+ };
187
+ }>> & {
188
+ onChoose?: ((...args: any[]) => any) | undefined;
189
+ }, {
190
+ type: "success" | "error" | "info" | "warning" | undefined;
191
+ data: string | any[];
192
+ prefix: string;
193
+ separator: string;
194
+ tipTitle: string;
195
+ }, true, {}, {}, {
196
+ P: {};
197
+ B: {};
198
+ D: {};
199
+ C: {};
200
+ M: {};
201
+ Defaults: {};
202
+ }, Readonly< ExtractPropTypes<{
203
+ type: {
204
+ type: PropType<"success" | "error" | "info" | "warning" | undefined>;
205
+ required: true;
206
+ default: string;
207
+ };
208
+ data: {
209
+ type: PropType<string | any[]>;
210
+ required: true;
211
+ default: () => never[];
212
+ };
213
+ prefix: {
214
+ type: PropType<string>;
215
+ default: string;
216
+ };
217
+ separator: {
218
+ type: PropType<string>;
219
+ required: true;
220
+ default: string;
221
+ };
222
+ tipTitle: {
223
+ type: PropType<string>;
224
+ default: string;
225
+ };
226
+ mapLabel: {
227
+ type: PropType<string>;
228
+ };
229
+ }>> & {
230
+ onChoose?: ((...args: any[]) => any) | undefined;
231
+ }, {}, {}, {}, {}, {
232
+ type: "success" | "error" | "info" | "warning" | undefined;
233
+ data: string | any[];
234
+ prefix: string;
235
+ separator: string;
236
+ tipTitle: string;
237
+ }>;
238
+ __isFragment?: undefined;
239
+ __isTeleport?: undefined;
240
+ __isSuspense?: undefined;
241
+ } & ComponentOptionsBase<Readonly< ExtractPropTypes<{
242
+ type: {
243
+ type: PropType<"success" | "error" | "info" | "warning" | undefined>;
244
+ required: true;
245
+ default: string;
246
+ };
247
+ data: {
248
+ type: PropType<string | any[]>;
249
+ required: true;
250
+ default: () => never[];
251
+ };
252
+ prefix: {
253
+ type: PropType<string>;
254
+ default: string;
255
+ };
256
+ separator: {
257
+ type: PropType<string>;
258
+ required: true;
259
+ default: string;
260
+ };
261
+ tipTitle: {
262
+ type: PropType<string>;
263
+ default: string;
264
+ };
265
+ mapLabel: {
266
+ type: PropType<string>;
267
+ };
268
+ }>> & {
269
+ onChoose?: ((...args: any[]) => any) | undefined;
270
+ }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
271
+ choose: (...args: any[]) => void;
272
+ }, string, {
273
+ type: "success" | "error" | "info" | "warning" | undefined;
274
+ data: string | any[];
275
+ prefix: string;
276
+ separator: string;
277
+ tipTitle: string;
278
+ }, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
279
+ $slots: {
280
+ default?(_: {}): any;
281
+ };
282
+ }) & Plugin<any[]> & (new (...args: any[]) => {
283
+ $props: {
284
+ onClick?: (() => void) | undefined;
285
+ };
286
+ });
127
287
  export declare const ApLabel: {
128
288
  new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
129
289
  text: {
@@ -1,10 +1,13 @@
1
1
  import { withInstall as o } from "@aplus-frontend/utils";
2
2
  import "./title/ApTitle.vue.mjs";
3
+ import "./expandAlert/ApExpandAlert.vue.mjs";
3
4
  import "./ap-label/ApLabel.vue.mjs";
4
5
  import t from "./title/ApTitle.vue2.mjs";
5
- import m from "./ap-label/ApLabel.vue2.mjs";
6
- const s = o(t), a = o(m);
6
+ import m from "./expandAlert/ApExpandAlert.vue2.mjs";
7
+ import r from "./ap-label/ApLabel.vue2.mjs";
8
+ const _ = o(t), l = o(m), e = o(r);
7
9
  export {
8
- a as ApLabel,
9
- s as ApTitle
10
+ l as ApExpandAlert,
11
+ e as ApLabel,
12
+ _ as ApTitle
10
13
  };
package/es/src/index.d.ts CHANGED
@@ -27,6 +27,7 @@ export * from './ap-layout';
27
27
  export * from './ap-upload';
28
28
  export * from './ap-download';
29
29
  export * from './check-card';
30
+ export * from './ap-modal';
30
31
  export * from './business';
31
32
  export * from './ap-table';
32
33
  export * from './editable-table';