@aplus-frontend/ui 0.5.24 → 0.5.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 (44) hide show
  1. package/es/src/ap-form/search-form/index.vue.mjs +1 -1
  2. package/es/src/ap-grid/editable/form-item.vue.mjs +14 -14
  3. package/es/src/ap-grid/editable/index.vue.mjs +10 -10
  4. package/es/src/business/ap-ladder/ApLadder.vue.d.ts +1 -83
  5. package/es/src/business/ap-ladder/ApLadder.vue2.mjs +34 -59
  6. package/es/src/business/ap-ladder/components/SimpleMode.vue.d.ts +3 -65
  7. package/es/src/business/ap-ladder/components/SimpleMode.vue2.mjs +34 -99
  8. package/es/src/business/ap-ladder/components/ValueGroupMode.vue.d.ts +3 -75
  9. package/es/src/business/ap-ladder/components/ValueGroupMode.vue2.mjs +68 -195
  10. package/es/src/business/ap-ladder/index.d.ts +1 -235
  11. package/es/src/business/ap-ladder/interface.d.ts +4 -114
  12. package/es/src/business/ap-ladder/utils.d.ts +5 -0
  13. package/es/src/business/ap-ladder/utils.mjs +38 -3
  14. package/es/src/business/ap-product-info/ApProductInfo.d.ts +46 -0
  15. package/es/src/business/ap-product-info/constans.d.ts +23 -0
  16. package/es/src/business/ap-product-info/index.d.ts +1 -0
  17. package/es/src/business/ap-product-info/interface.d.ts +11 -0
  18. package/es/src/editable-table/form-item.vue.mjs +83 -83
  19. package/es/src/editable-table/index.vue.mjs +84 -79
  20. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  21. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  22. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  23. package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +1 -83
  24. package/lib/src/business/ap-ladder/ApLadder.vue2.js +1 -1
  25. package/lib/src/business/ap-ladder/components/SimpleMode.vue.d.ts +3 -65
  26. package/lib/src/business/ap-ladder/components/SimpleMode.vue2.js +1 -1
  27. package/lib/src/business/ap-ladder/components/ValueGroupMode.vue.d.ts +3 -75
  28. package/lib/src/business/ap-ladder/components/ValueGroupMode.vue2.js +1 -1
  29. package/lib/src/business/ap-ladder/index.d.ts +1 -235
  30. package/lib/src/business/ap-ladder/interface.d.ts +4 -114
  31. package/lib/src/business/ap-ladder/utils.d.ts +5 -0
  32. package/lib/src/business/ap-ladder/utils.js +1 -1
  33. package/lib/src/business/ap-product-info/ApProductInfo.d.ts +46 -0
  34. package/lib/src/business/ap-product-info/constans.d.ts +23 -0
  35. package/lib/src/business/ap-product-info/index.d.ts +1 -0
  36. package/lib/src/business/ap-product-info/interface.d.ts +11 -0
  37. package/lib/src/editable-table/form-item.vue.js +1 -1
  38. package/lib/src/editable-table/index.vue.js +1 -1
  39. package/package.json +5 -5
  40. package/theme/ap-grid/index.css +4 -0
  41. package/theme/ap-grid/index.less +4 -0
  42. package/theme/ap-ladder/ap-ladder.css +14 -5
  43. package/theme/ap-ladder/ap-ladder.less +16 -7
  44. package/theme/index.css +18 -5
@@ -77,7 +77,7 @@ const r = 24, ze = /* @__PURE__ */ ie({
77
77
  },
78
78
  defaultCollapse: {
79
79
  type: Boolean,
80
- default: !1
80
+ default: !0
81
81
  },
82
82
  "onUpdate:collapse": {},
83
83
  searchText: {},
@@ -172,31 +172,31 @@ const ye = /* @__PURE__ */ P({
172
172
  });
173
173
  const c = h(), v = le("valueTypeMap"), D = oe(l, v);
174
174
  function L(e, o) {
175
- var s;
176
- const n = ((s = f(d)) == null ? void 0 : s.length) || 0;
175
+ var u;
176
+ const n = ((u = f(d)) == null ? void 0 : u.length) || 0;
177
177
  if (w(l.maxLength) && n >= l.maxLength)
178
178
  return;
179
179
  const t = {
180
180
  ...e || {}
181
181
  };
182
- a == null || a.setFieldValue(l.name, t, !0, (u, r) => {
183
- console.log("run add", u[r]), u[r] || (u[r] = [t]), I(o) ? u[r].push(t) : u[r].splice(o, 0, t);
182
+ a == null || a.setFieldValue(l.name, t, !0, (s, r) => {
183
+ s[r] || (s[r] = [t]), I(o) ? s[r].push(t) : s[r].splice(o, 0, t);
184
184
  });
185
185
  }
186
186
  function V(e, o = "suffix") {
187
- var u;
188
- const n = ((u = f(d)) == null ? void 0 : u.length) || 0, t = m(e) ? e : e.length;
187
+ var s;
188
+ const n = ((s = f(d)) == null ? void 0 : s.length) || 0, t = m(e) ? e : e.length;
189
189
  if (w(l.maxLength) && n + t > l.maxLength)
190
190
  return;
191
- const s = m(e) ? new Array(e).fill(0).map(() => ({})) : M(e);
192
- a == null || a.setFieldValue(l.name, s, !0, (r, i) => {
193
- r[i] || (r[i] = [...s]), o === "suffix" ? r[i].push(...s) : r[i].unshift(...s);
191
+ const u = m(e) ? new Array(e).fill(0).map(() => ({})) : M(e);
192
+ a == null || a.setFieldValue(l.name, u, !0, (r, i) => {
193
+ r[i] || (r[i] = [...u]), o === "suffix" ? r[i].push(...u) : r[i].unshift(...u);
194
194
  });
195
195
  }
196
196
  function T(e) {
197
197
  const o = new Set(m(e) ? [e] : e);
198
198
  a == null || a.setFieldValue(l.name, void 0, !0, (n, t) => {
199
- n[t] = n[t].filter((s, u) => !o.has(u));
199
+ n[t] = n[t].filter((u, s) => !o.has(s));
200
200
  });
201
201
  }
202
202
  function _() {
@@ -207,9 +207,9 @@ const ye = /* @__PURE__ */ P({
207
207
  return (o = f(d)) == null ? void 0 : o[e];
208
208
  }
209
209
  function k(e, o, n = !0) {
210
- a == null || a.setFieldValue(l.name, null, !0, (t, s) => {
211
- !t[s] || !t[s][e] || (t[s][e] = {
212
- ...n ? t[s][e] : {},
210
+ a == null || a.setFieldValue(l.name, void 0, !0, (t, u) => {
211
+ !t[u] || !t[u][e] || (t[u][e] = {
212
+ ...n ? t[u][e] : {},
213
213
  ...o
214
214
  });
215
215
  });
@@ -251,7 +251,7 @@ const ye = /* @__PURE__ */ P({
251
251
  _: 2
252
252
  }, [J(R, (n, t) => ({
253
253
  name: t,
254
- fn: y((s) => [Q(e.$slots, t, X(Y(s || {})))])
254
+ fn: y((u) => [Q(e.$slots, t, X(Y(u || {})))])
255
255
  }))]), 1040, ["class", "columns", "data-source"])]),
256
256
  _: 3
257
257
  }, 16, ["name", "label"]));
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as U, useSlots as $, ref as w, watch as x, unref as u, createBlock as q, openBlock as J, withCtx as h, createVNode as v, mergeProps as Q, createSlots as X, renderList as Y, renderSlot as Z, normalizeProps as M, guardReactiveProps as ee } from "vue";
2
- import { ApForm as g } from "../../ap-form/index.mjs";
3
- import { isEqual as ae, isArray as R, isUndefined as te, isNumber as y, cloneDeep as le, omit as oe } from "lodash-unified";
2
+ import { ApForm as y } from "../../ap-form/index.mjs";
3
+ import { isEqual as ae, isArray as R, isUndefined as te, isNumber as g, cloneDeep as le, omit as oe } from "lodash-unified";
4
4
  import "../../config-provider/index.mjs";
5
5
  import "../../hooks/index.mjs";
6
6
  import { isDef as b } from "../../utils/index.mjs";
@@ -160,7 +160,7 @@ const Re = /* @__PURE__ */ U({
160
160
  } = se("editable-grid"), _ = S, C = w(), {
161
161
  value: m,
162
162
  updateValue: L
163
- } = re(t, _), i = w(), E = ue("valueTypeMap"), c = g.useWatch(t.name, i);
163
+ } = re(t, _), i = w(), E = ue("valueTypeMap"), c = y.useWatch(t.name, i);
164
164
  x(() => c.value, (e) => {
165
165
  var a;
166
166
  L(e), (a = t.onChange) == null || a.call(t, e);
@@ -195,22 +195,22 @@ const Re = /* @__PURE__ */ U({
195
195
  ...e || {}
196
196
  };
197
197
  (r = (s = i.value) == null ? void 0 : s.setFieldValue) == null || r.call(s, t.name, o, !0, (d, f) => {
198
- console.log("run add", d[f]), d[f] || (d[f] = [o]), te(a) ? d[f].push(o) : d[f].splice(a, 0, o);
198
+ d[f] || (d[f] = [o]), te(a) ? d[f].push(o) : d[f].splice(a, 0, o);
199
199
  });
200
200
  }
201
201
  function z(e, a = "suffix") {
202
202
  var s, r, d;
203
- const l = ((s = u(m)) == null ? void 0 : s.length) || 0, o = y(e) ? e : e.length;
203
+ const l = ((s = u(m)) == null ? void 0 : s.length) || 0, o = g(e) ? e : e.length;
204
204
  if (b(t.maxLength) && l + o > t.maxLength)
205
205
  return;
206
- const n = y(e) ? new Array(e).fill(0).map(() => ({})) : le(e);
206
+ const n = g(e) ? new Array(e).fill(0).map(() => ({})) : le(e);
207
207
  (d = (r = i.value) == null ? void 0 : r.setFieldValue) == null || d.call(r, t.name, n, !0, (f, p) => {
208
208
  f[p] || (f[p] = [...n]), a === "suffix" ? f[p].push(...n) : f[p].unshift(...n);
209
209
  });
210
210
  }
211
211
  function I(e) {
212
212
  var l, o;
213
- const a = new Set(y(e) ? [e] : e);
213
+ const a = new Set(g(e) ? [e] : e);
214
214
  (o = (l = i.value) == null ? void 0 : l.setFieldValue) == null || o.call(l, t.name, void 0, !0, (n, s) => {
215
215
  n[s] = n[s].filter((r, d) => !a.has(d));
216
216
  });
@@ -228,7 +228,7 @@ const Re = /* @__PURE__ */ U({
228
228
  }
229
229
  function W(e, a, l = !0) {
230
230
  var o, n;
231
- (n = (o = i.value) == null ? void 0 : o.setFieldValue) == null || n.call(o, t.name, null, !0, (s, r) => {
231
+ (n = (o = i.value) == null ? void 0 : o.setFieldValue) == null || n.call(o, t.name, void 0, !0, (s, r) => {
232
232
  !s[r] || !s[r][e] || (s[r][e] = {
233
233
  ...l ? s[r][e] : {},
234
234
  ...a
@@ -256,7 +256,7 @@ const Re = /* @__PURE__ */ U({
256
256
  scrollTo: G,
257
257
  clear: K,
258
258
  setTableData: P
259
- }), (e, a) => (J(), q(u(g), {
259
+ }), (e, a) => (J(), q(u(y), {
260
260
  ref_key: "formRef",
261
261
  ref: i,
262
262
  "initial-values": {
@@ -266,7 +266,7 @@ const Re = /* @__PURE__ */ U({
266
266
  height: "100%"
267
267
  }
268
268
  }, {
269
- default: h(() => [v(u(g).FormItem, {
269
+ default: h(() => [v(u(y).FormItem, {
270
270
  name: e.name,
271
271
  "no-style": ""
272
272
  }, {
@@ -1,11 +1,5 @@
1
1
  import { ApLadderLabelValue, ApLadderProps, ApLadderSlots } from './interface';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType, CSSProperties, ComponentProvideOptions } from 'vue';
3
- import { VueTypeValidableDef } from '../../../node_modules/vue-types';
4
- import { TriggerType } from '@aplus-frontend/antdv/es/tooltip/abstractTooltipProps';
5
- import { TooltipPlacement, AdjustOverflow } from '@aplus-frontend/antdv/es/tooltip';
6
- import { LiteralUnion } from '@aplus-frontend/antdv/es/_util/type';
7
- import { PresetColorType } from '@aplus-frontend/antdv/es/_util/colors';
8
- import { AlignType, BuildInPlacements } from '@aplus-frontend/antdv/es/vc-trigger/interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
9
3
  declare function __VLS_template(): {
10
4
  attrs: Partial<{}>;
11
5
  slots: Readonly<ApLadderSlots> & ApLadderSlots;
@@ -15,83 +9,7 @@ declare function __VLS_template(): {
15
9
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
10
  declare const __VLS_component: DefineComponent<ApLadderProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApLadderProps> & Readonly<{}>, {
17
11
  layout: "vertical" | "horizontal";
18
- tooltip: boolean;
19
12
  labelAlign: "left" | "right";
20
- tooltipProps: Partial<Pick<Partial< ExtractPropTypes<{
21
- title: VueTypeValidableDef<any>;
22
- trigger: PropType< TriggerType | TriggerType[]>;
23
- open: {
24
- type: BooleanConstructor;
25
- default: any;
26
- };
27
- visible: {
28
- type: BooleanConstructor;
29
- default: any;
30
- };
31
- placement: PropType<TooltipPlacement>;
32
- color: PropType<LiteralUnion<PresetColorType>>;
33
- transitionName: StringConstructor;
34
- overlayStyle: {
35
- type: PropType<CSSProperties>;
36
- default: CSSProperties;
37
- };
38
- overlayInnerStyle: {
39
- type: PropType<CSSProperties>;
40
- default: CSSProperties;
41
- };
42
- overlayClassName: StringConstructor;
43
- openClassName: StringConstructor;
44
- prefixCls: StringConstructor;
45
- mouseEnterDelay: NumberConstructor;
46
- mouseLeaveDelay: NumberConstructor;
47
- getPopupContainer: PropType<(triggerNode: HTMLElement) => HTMLElement>;
48
- arrowPointAtCenter: {
49
- type: BooleanConstructor;
50
- default: any;
51
- };
52
- arrow: {
53
- type: PropType<boolean | {
54
- pointAtCenter?: boolean;
55
- }>;
56
- default: boolean | {
57
- pointAtCenter?: boolean;
58
- };
59
- };
60
- autoAdjustOverflow: {
61
- type: PropType<boolean | AdjustOverflow>;
62
- default: boolean | AdjustOverflow;
63
- };
64
- destroyTooltipOnHide: {
65
- type: BooleanConstructor;
66
- default: any;
67
- };
68
- align: {
69
- type: PropType<AlignType>;
70
- default: AlignType;
71
- };
72
- builtinPlacements: {
73
- type: PropType<BuildInPlacements>;
74
- default: BuildInPlacements;
75
- };
76
- children: ArrayConstructor;
77
- onVisibleChange: PropType<(vis: boolean) => void>;
78
- 'onUpdate:visible': PropType<(vis: boolean) => void>;
79
- onOpenChange: PropType<(vis: boolean) => void>;
80
- 'onUpdate:open': PropType<(vis: boolean) => void>;
81
- mask: {
82
- type: BooleanConstructor;
83
- default: boolean;
84
- };
85
- maskStyle: {
86
- type: PropType<CSSProperties>;
87
- default: CSSProperties;
88
- };
89
- maskTransitionName: StringConstructor;
90
- maskClosable: {
91
- type: BooleanConstructor;
92
- default: boolean;
93
- };
94
- }>>, "title" | "placement" | "color" | "mouseEnterDelay" | "trigger" | "getPopupContainer" | "align" | "overlayStyle" | "overlayInnerStyle" | "overlayClassName" | "mouseLeaveDelay" | "arrowPointAtCenter" | "arrow" | "autoAdjustOverflow" | "destroyTooltipOnHide">>;
95
13
  labelValues: Array<ApLadderLabelValue>;
96
14
  majorColor: string;
97
15
  minorColor: string;
@@ -1,90 +1,65 @@
1
- import { defineComponent as C, useSlots as j, computed as e, createElementBlock as _, openBlock as i, normalizeClass as g, unref as o, createBlock as n, createCommentVNode as V, createSlots as p, withCtx as m, renderSlot as u } from "vue";
2
- import { memoize as h } from "lodash-unified";
1
+ import { defineComponent as g, useSlots as V, computed as t, withMemo as h, createElementBlock as _, openBlock as n, normalizeClass as j, unref as l, createBlock as a, createCommentVNode as M, createSlots as i, withCtx as m, renderSlot as s } from "vue";
2
+ import { memoize as A } from "lodash-unified";
3
3
  import "../../config-provider/index.mjs";
4
4
  import "./components/SimpleMode.vue.mjs";
5
5
  import "./components/ValueGroupMode.vue.mjs";
6
- import { isNull as L, createMemoizeKey as A } from "./utils.mjs";
7
- import { useNamespace as M } from "../../config-provider/hooks/use-namespace.mjs";
8
- import { useGlobalConfig as $ } from "../../config-provider/hooks/use-global-config.mjs";
9
- import B from "./components/SimpleMode.vue2.mjs";
10
- import w from "./components/ValueGroupMode.vue2.mjs";
11
- const J = /* @__PURE__ */ C({
6
+ import { isNull as S, createMemoizeKey as $ } from "./utils.mjs";
7
+ import { useNamespace as w } from "../../config-provider/hooks/use-namespace.mjs";
8
+ import { useGlobalConfig as L } from "../../config-provider/hooks/use-global-config.mjs";
9
+ import z from "./components/SimpleMode.vue2.mjs";
10
+ import B from "./components/ValueGroupMode.vue2.mjs";
11
+ const P = /* @__PURE__ */ g({
12
12
  name: "ApLadder",
13
13
  __name: "ApLadder",
14
14
  props: {
15
15
  major: {},
16
16
  minor: {},
17
17
  majorColor: { default: "" },
18
- majorStyles: {},
19
18
  minorColor: { default: "" },
20
- minorStyles: {},
21
19
  layout: { default: "vertical" },
22
- tooltip: { type: Boolean, default: !0 },
23
20
  labelValues: { default: () => [] },
24
- labelAlign: { default: "left" },
25
- labelStyles: {},
26
- valueStyles: {},
27
- linkStyles: {},
28
- unitStyles: {},
29
- tooltipProps: { default: () => ({}) },
30
- tooltipLabelStyles: {},
31
- tooltipValueStyles: {}
21
+ labelAlign: { default: "left" }
32
22
  },
33
- setup(y) {
34
- const s = j(), l = y, { b: c, m: f } = M("ap-ladder"), d = $("uiMode", "aplus"), v = e(
35
- () => l.labelValues === void 0 || l.labelValues.length === 0
36
- ), b = e(() => l.labelValues.length > 0), S = e(() => l.labelAlign), r = h((t) => L(t) ? "" : typeof t == "number" ? t.toString() : typeof t == "string" ? t : "", A), a = e(() => !!s.title || l.tooltip), k = (t) => {
37
- t.link && window.open(t.link, "_blank"), typeof t.handleClickLink == "function" && t.handleClickLink();
23
+ setup(u) {
24
+ const r = V(), o = u, { b: c, m: p } = w("ap-ladder"), f = L("uiMode", "aplus"), d = t(
25
+ () => o.labelValues === void 0 || o.labelValues.length === 0
26
+ ), k = t(() => o.labelValues.length > 0), b = t(() => o.labelAlign), v = A((e) => S(e) ? "" : typeof e == "number" ? e.toString() : typeof e == "string" ? e : "", $), y = (e) => {
27
+ e.link && window.open(e.link, "_blank"), typeof e.handleClickLink == "function" && e.handleClickLink();
38
28
  };
39
- return (t, N) => (i(), _("div", {
40
- class: g([o(c)(), `${o(f)(o(d))}`])
29
+ return (e, C) => h([e.labelValues, e.major, e.minor], () => (n(), _("div", {
30
+ class: j([l(c)(), `${l(p)(l(f))}`])
41
31
  }, [
42
- v.value ? (i(), n(B, {
32
+ d.value ? (n(), a(z, {
43
33
  key: 0,
44
- major: l.major,
45
- minor: l.minor,
46
- "major-styles": l.majorStyles || {},
47
- "major-color": l.majorColor || {},
48
- "minor-styles": l.minorStyles || {},
49
- "minor-color": l.minorColor || {},
50
- "tooltip-props": l.tooltipProps || {},
51
- layout: l.layout,
52
- tooltip: a.value,
53
- "convert-value": o(r)
54
- }, p({ _: 2 }, [
55
- s.title ? {
34
+ major: o.major,
35
+ minor: o.minor,
36
+ layout: o.layout,
37
+ "convert-value": l(v)
38
+ }, i({ _: 2 }, [
39
+ r.title ? {
56
40
  name: "title",
57
41
  fn: m(() => [
58
- u(t.$slots, "title")
42
+ s(e.$slots, "title")
59
43
  ]),
60
44
  key: "0"
61
45
  } : void 0
62
- ]), 1032, ["major", "minor", "major-styles", "major-color", "minor-styles", "minor-color", "tooltip-props", "layout", "tooltip", "convert-value"])) : b.value ? (i(), n(w, {
46
+ ]), 1032, ["major", "minor", "layout", "convert-value"])) : k.value ? (n(), a(B, {
63
47
  key: 1,
64
- "label-values": l.labelValues || {},
65
- "label-align": S.value,
66
- "label-styles": l.labelStyles || {},
67
- "value-styles": l.valueStyles || {},
68
- "link-styles": l.linkStyles || {},
69
- "unit-styles": l.unitStyles || {},
70
- "tooltip-label-styles": l.tooltipLabelStyles || {},
71
- "tooltip-value-styles": l.tooltipValueStyles || {},
72
- "tooltip-props": l.tooltipProps || {},
73
- tooltip: a.value,
74
- "convert-value": o(r),
75
- onHandleClick: k
76
- }, p({ _: 2 }, [
77
- s.title ? {
48
+ "label-values": o.labelValues || {},
49
+ "label-align": b.value,
50
+ onHandleClick: y
51
+ }, i({ _: 2 }, [
52
+ r.title ? {
78
53
  name: "title",
79
54
  fn: m(() => [
80
- u(t.$slots, "title")
55
+ s(e.$slots, "title")
81
56
  ]),
82
57
  key: "0"
83
58
  } : void 0
84
- ]), 1032, ["label-values", "label-align", "label-styles", "value-styles", "link-styles", "unit-styles", "tooltip-label-styles", "tooltip-value-styles", "tooltip-props", "tooltip", "convert-value"])) : V("", !0)
85
- ], 2));
59
+ ]), 1032, ["label-values", "label-align"])) : M("", !0)
60
+ ], 2)), C, 0);
86
61
  }
87
62
  });
88
63
  export {
89
- J as default
64
+ P as default
90
65
  };
@@ -1,11 +1,11 @@
1
- import { CSSProperties, PropType, DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
1
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
2
  declare function __VLS_template(): {
3
3
  attrs: Partial<{}>;
4
4
  slots: {
5
5
  title?(_: {}): any;
6
6
  };
7
7
  refs: {};
8
- rootEl: any;
8
+ rootEl: HTMLDivElement;
9
9
  };
10
10
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
11
  declare const __VLS_component: DefineComponent<ExtractPropTypes<{
@@ -17,38 +17,10 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
17
17
  type: (NumberConstructor | ObjectConstructor | StringConstructor | FunctionConstructor)[];
18
18
  default: null;
19
19
  };
20
- majorStyles: {
21
- type: PropType<CSSProperties>;
22
- default: () => {};
23
- };
24
- majorColorStyles: {
25
- type: PropType<CSSProperties>;
26
- default: () => {};
27
- };
28
- minorStyles: {
29
- type: PropType<CSSProperties>;
30
- default: () => {};
31
- };
32
- minorColorStyles: {
33
- type: PropType<CSSProperties>;
34
- default: () => {};
35
- };
36
- tooltipProps: {
37
- type: ObjectConstructor;
38
- default: () => {};
39
- };
40
20
  layout: {
41
21
  type: StringConstructor;
42
22
  default: string;
43
23
  };
44
- tooltip: {
45
- type: BooleanConstructor;
46
- default: boolean;
47
- };
48
- convertValue: {
49
- type: FunctionConstructor;
50
- required: true;
51
- };
52
24
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
53
25
  major: {
54
26
  type: (NumberConstructor | ObjectConstructor | StringConstructor | FunctionConstructor)[];
@@ -58,49 +30,15 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
58
30
  type: (NumberConstructor | ObjectConstructor | StringConstructor | FunctionConstructor)[];
59
31
  default: null;
60
32
  };
61
- majorStyles: {
62
- type: PropType<CSSProperties>;
63
- default: () => {};
64
- };
65
- majorColorStyles: {
66
- type: PropType<CSSProperties>;
67
- default: () => {};
68
- };
69
- minorStyles: {
70
- type: PropType<CSSProperties>;
71
- default: () => {};
72
- };
73
- minorColorStyles: {
74
- type: PropType<CSSProperties>;
75
- default: () => {};
76
- };
77
- tooltipProps: {
78
- type: ObjectConstructor;
79
- default: () => {};
80
- };
81
33
  layout: {
82
34
  type: StringConstructor;
83
35
  default: string;
84
36
  };
85
- tooltip: {
86
- type: BooleanConstructor;
87
- default: boolean;
88
- };
89
- convertValue: {
90
- type: FunctionConstructor;
91
- required: true;
92
- };
93
37
  }>> & Readonly<{}>, {
94
38
  layout: string;
95
- tooltip: boolean;
96
39
  major: string | number | Function | Record<string, any>;
97
40
  minor: string | number | Function | Record<string, any>;
98
- tooltipProps: Record<string, any>;
99
- majorStyles: CSSProperties;
100
- majorColorStyles: CSSProperties;
101
- minorStyles: CSSProperties;
102
- minorColorStyles: CSSProperties;
103
- }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
41
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
104
42
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
105
43
  export default _default;
106
44
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,9 +1,7 @@
1
- import { defineComponent as j, createBlock as S, openBlock as n, unref as t, normalizeProps as v, guardReactiveProps as b, createSlots as k, withCtx as s, createElementBlock as i, createCommentVNode as u, Fragment as C, normalizeClass as l, createElementVNode as a, normalizeStyle as m, toDisplayString as r, renderSlot as V } from "vue";
2
- import { Tooltip as O } from "@aplus-frontend/antdv";
1
+ import { defineComponent as d, createElementBlock as r, openBlock as m, normalizeClass as a, unref as t, renderSlot as u, createCommentVNode as j, createElementVNode as l, toDisplayString as n } from "vue";
3
2
  import "../../../config-provider/index.mjs";
4
- import { isNull as c } from "../utils.mjs";
5
- import { useNamespace as g } from "../../../config-provider/hooks/use-namespace.mjs";
6
- const E = /* @__PURE__ */ j({
3
+ import { useNamespace as S } from "../../../config-provider/hooks/use-namespace.mjs";
4
+ const f = ["title"], y = ["title"], g = ["title"], b = ["title"], N = /* @__PURE__ */ d({
7
5
  name: "ApLadderSimpleMode",
8
6
  __name: "SimpleMode",
9
7
  props: {
@@ -15,108 +13,45 @@ const E = /* @__PURE__ */ j({
15
13
  type: [String, Number, Function, Object],
16
14
  default: null
17
15
  },
18
- majorStyles: {
19
- type: Object,
20
- default: () => ({})
21
- },
22
- majorColorStyles: {
23
- type: Object,
24
- default: () => ({})
25
- },
26
- minorStyles: {
27
- type: Object,
28
- default: () => ({})
29
- },
30
- minorColorStyles: {
31
- type: Object,
32
- default: () => ({})
33
- },
34
- tooltipProps: {
35
- type: Object,
36
- default: () => ({})
37
- },
38
16
  layout: {
39
17
  type: String,
40
18
  default: "vertical"
41
- },
42
- tooltip: {
43
- type: Boolean,
44
- default: !1
45
- },
46
- convertValue: {
47
- type: Function,
48
- required: !0
49
19
  }
50
20
  },
51
21
  setup(e) {
52
- const { b: y, e: o, m: d } = g("ap-ladder");
53
- return (f, N) => (n(), S(t(O), v(b(e.tooltipProps)), k({
54
- default: s(() => [
55
- !t(c)(e.major) || !t(c)(e.minor) ? (n(), i(C, { key: 0 }, [
56
- e.layout === "vertical" ? (n(), i("div", {
57
- key: 0,
58
- class: l([t(y)("base"), t(d)("vertical")])
59
- }, [
60
- a("span", {
61
- class: l([t(o)("major")]),
62
- style: m([e.majorStyles, e.majorColorStyles])
63
- }, r(e.convertValue(e.major)), 7),
64
- a("span", {
65
- class: l([t(o)("minor")]),
66
- style: m([e.minorStyles, e.minorColorStyles])
67
- }, r(e.convertValue(e.minor)), 7)
68
- ], 2)) : (n(), i("div", {
69
- key: 1,
70
- class: l([t(y)("base"), t(d)("horizontal")])
71
- }, [
72
- a("span", {
73
- class: l([t(o)("major")]),
74
- style: m([e.majorStyles, e.majorColorStyles])
75
- }, r(e.convertValue(e.major)), 7),
76
- a("span", {
77
- class: l([t(o)("minor")]),
78
- style: m([e.minorStyles, e.minorColorStyles])
79
- }, r(e.convertValue(e.minor)), 7)
80
- ], 2))
81
- ], 64)) : u("", !0)
82
- ]),
83
- _: 2
22
+ const { b: o, e: i, m: s } = S("ap-ladder");
23
+ return (c, p) => (m(), r("div", {
24
+ class: a([t(o)("simple-mode")])
84
25
  }, [
85
- f.$slots.title ? {
86
- name: "title",
87
- fn: s(() => [
88
- V(f.$slots, "title")
89
- ]),
90
- key: "0"
91
- } : e.tooltip ? {
92
- name: "title",
93
- fn: s(() => [
94
- a("div", {
95
- class: l(t(o)("tooltip"))
96
- }, [
97
- t(c)(e.major) ? u("", !0) : (n(), i("div", {
98
- key: 0,
99
- class: l(t(o)("tooltip-item"))
100
- }, [
101
- a("span", {
102
- class: l(t(o)("tooltip-label"))
103
- }, r(e.convertValue(e.major)), 3)
104
- ], 2)),
105
- t(c)(e.minor) ? u("", !0) : (n(), i("div", {
106
- key: 1,
107
- class: l(t(o)("tooltip-item"))
108
- }, [
109
- a("span", {
110
- class: l(t(o)("tooltip-label"))
111
- }, r(e.convertValue(e.minor)), 3)
112
- ], 2))
113
- ], 2)
114
- ]),
115
- key: "1"
116
- } : void 0
117
- ]), 1040));
26
+ e.layout === "vertical" ? (m(), r("div", {
27
+ key: 0,
28
+ class: a([t(o)("base"), t(s)("vertical")])
29
+ }, [
30
+ l("span", {
31
+ class: a([t(i)("major")]),
32
+ title: String(e.major)
33
+ }, n(e.major), 11, f),
34
+ l("span", {
35
+ class: a([t(i)("minor")]),
36
+ title: String(e.major)
37
+ }, n(e.minor), 11, y)
38
+ ], 2)) : (m(), r("div", {
39
+ key: 1,
40
+ class: a([t(o)("base"), t(s)("horizontal")])
41
+ }, [
42
+ l("span", {
43
+ class: a([t(i)("major")]),
44
+ title: String(e.major)
45
+ }, n(e.major), 11, g),
46
+ l("span", {
47
+ class: a([t(i)("minor")]),
48
+ title: String(e.major)
49
+ }, n(e.minor), 11, b)
50
+ ], 2)),
51
+ c.$slots.title ? u(c.$slots, "title", { key: 2 }) : j("", !0)
52
+ ], 2));
118
53
  }
119
54
  });
120
55
  export {
121
- E as default
56
+ N as default
122
57
  };