@aplus-frontend/ui 0.0.23 → 0.0.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 (31) hide show
  1. package/es/src/ap-field/date/index.vue.mjs +26 -26
  2. package/es/src/ap-field/number/helper.d.ts +9 -0
  3. package/es/src/ap-field/number/helper.mjs +20 -11
  4. package/es/src/ap-table/ap-table.vue.d.ts +2137 -112
  5. package/es/src/ap-table/ap-table.vue.mjs +31 -30
  6. package/es/src/check-card/style/index.css +1 -0
  7. package/es/src/editable-table/form-item.vue.mjs +61 -63
  8. package/es/src/editable-table/hooks/use-get-columns.mjs +27 -27
  9. package/es/src/editable-table/index.vue.mjs +63 -65
  10. package/es/src/editable-table/utils.d.ts +13 -0
  11. package/es/src/editable-table/utils.mjs +26 -6
  12. package/es/src/theme/check-card/index.css +1 -0
  13. package/es/src/work-order-modal/createWorkOrder.mjs +2 -1
  14. package/es/src/work-order-modal/work-order-modal.vue.d.ts +2 -0
  15. package/es/src/work-order-modal/work-order-modal.vue.mjs +51 -46
  16. package/lib/src/ap-field/date/index.vue.js +1 -1
  17. package/lib/src/ap-field/number/helper.d.ts +9 -0
  18. package/lib/src/ap-field/number/helper.js +1 -1
  19. package/lib/src/ap-table/ap-table.vue.d.ts +2137 -112
  20. package/lib/src/ap-table/ap-table.vue.js +1 -1
  21. package/lib/src/check-card/style/index.css +1 -0
  22. package/lib/src/editable-table/form-item.vue.js +1 -1
  23. package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
  24. package/lib/src/editable-table/index.vue.js +1 -1
  25. package/lib/src/editable-table/utils.d.ts +13 -0
  26. package/lib/src/editable-table/utils.js +1 -1
  27. package/lib/src/theme/check-card/index.css +1 -0
  28. package/lib/src/work-order-modal/createWorkOrder.js +1 -1
  29. package/lib/src/work-order-modal/work-order-modal.vue.d.ts +2 -0
  30. package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
  31. package/package.json +3 -3
@@ -1,9 +1,9 @@
1
- import { defineComponent as S, computed as s, unref as t, openBlock as c, createElementBlock as b, Fragment as _, createTextVNode as w, toDisplayString as M, createBlock as R, mergeProps as F, createSlots as A, renderList as x, withCtx as D, renderSlot as E, normalizeProps as V, guardReactiveProps as z } from "vue";
1
+ import { defineComponent as S, computed as i, unref as t, openBlock as v, createElementBlock as b, Fragment as _, createTextVNode as w, toDisplayString as M, createBlock as R, mergeProps as F, createSlots as A, renderList as x, withCtx as D, renderSlot as E, normalizeProps as V, guardReactiveProps as z } from "vue";
2
2
  import r from "dayjs";
3
3
  import { DatePicker as N } from "ant-design-vue";
4
4
  import { ApFieldDatePresetFormats as j, PRESET_FORMAT_MAP as I, PRESET_FORMAT_PICK_MAP as H, PRESET_FORMAT_TIME_MAP as U } from "./constant.mjs";
5
5
  import "../../hooks/index.mjs";
6
- import { isNil as v, omit as K } from "lodash-unified";
6
+ import { isNil as y, omit as K } from "lodash-unified";
7
7
  import { formatDayWithTimezone as $ } from "./helper.mjs";
8
8
  import { getTimeFormatToZone as L } from "@aplus-frontend/utils";
9
9
  import { useControllableValue as W } from "../../hooks/useControllableValue.mjs";
@@ -85,17 +85,17 @@ const te = /* @__PURE__ */ S({
85
85
  timezone: {}
86
86
  },
87
87
  emits: ["update:value"],
88
- setup(y, { emit: h }) {
89
- const e = y, B = h, { value: d, updateValue: p } = W(e, B), l = s(
88
+ setup(h, { emit: B }) {
89
+ const e = h, k = B, { value: m, updateValue: p } = W(e, k), l = i(
90
90
  () => j.indexOf(e.format) > -1
91
- ), u = s(
91
+ ), d = i(
92
92
  () => l.value ? I[e.format] : e.format
93
- ), k = s(() => {
94
- if (v(t(d)))
93
+ ), f = i(() => {
94
+ if (y(t(m)))
95
95
  return;
96
- let o = r(t(d));
97
- return e.timezone && (o = r(L(t(d), e.timezone))), o;
98
- }), g = s(() => t(l) ? e.picker ?? H[e.format] : e.picker), O = s(() => {
96
+ let o = r(t(m));
97
+ return e.timezone && (o = r(L(t(m), e.timezone))), o;
98
+ }), g = i(() => t(l) ? e.picker ?? H[e.format] : e.picker), O = i(() => {
99
99
  const o = t(l) ? U[e.format] : {};
100
100
  return {
101
101
  ...K(e, [
@@ -109,39 +109,39 @@ const te = /* @__PURE__ */ S({
109
109
  ]),
110
110
  ...o
111
111
  };
112
- }), f = $(e.timezone);
112
+ }), c = $(e.timezone);
113
113
  function P(o) {
114
- if (v(o)) {
114
+ if (y(o)) {
115
115
  p(null);
116
116
  return;
117
117
  }
118
118
  const a = r(o);
119
- t(l) ? p(f(a, t(u))) : p(a.valueOf());
119
+ t(l) ? p(c(a, t(d))) : p(a.valueOf());
120
120
  }
121
121
  function C(o, a) {
122
- var m;
123
- const i = r(o), n = o ? t(l) ? f(i, t(u)) : i.valueOf() : null;
124
- (m = e.onChange) == null || m.call(e, n, a);
122
+ var s;
123
+ const u = r(o), n = o ? t(l) ? c(u, t(d)) : u.valueOf() : null;
124
+ (s = e.onChange) == null || s.call(e, n, a);
125
125
  }
126
126
  function T(o) {
127
127
  var n;
128
- const a = r(o), i = o ? t(l) ? f(a, t(u)) : a.valueOf() : null;
129
- (n = e.onOk) == null || n.call(e, i);
128
+ const a = r(o), u = o ? t(l) ? c(a, t(d)) : a.valueOf() : null;
129
+ (n = e.onOk) == null || n.call(e, u);
130
130
  }
131
- return (o, a) => o.mode === "read" ? (c(), b(_, { key: 0 }, [
132
- w(M(t(d) ? t(r)(t(d)).format(u.value) : o.emptyText), 1)
133
- ], 64)) : (c(), R(t(N), F({ key: 1 }, O.value, {
134
- value: k.value,
135
- format: u.value,
131
+ return (o, a) => o.mode === "read" ? (v(), b(_, { key: 0 }, [
132
+ w(M(f.value ? t(r)(f.value).format(d.value) : o.emptyText), 1)
133
+ ], 64)) : (v(), R(t(N), F({ key: 1 }, O.value, {
134
+ value: f.value,
135
+ format: d.value,
136
136
  "onUpdate:value": P,
137
137
  onChange: C,
138
138
  onOk: T,
139
139
  picker: g.value
140
140
  }), A({ _: 2 }, [
141
- x(o.$slots, (i, n) => ({
141
+ x(o.$slots, (u, n) => ({
142
142
  name: n,
143
- fn: D((m) => [
144
- E(o.$slots, n, V(z(m || {})))
143
+ fn: D((s) => [
144
+ E(o.$slots, n, V(z(s || {})))
145
145
  ])
146
146
  }))
147
147
  ]), 1040, ["value", "format", "picker"]));
@@ -1 +1,10 @@
1
+ import { ApFieldNumberProps } from '../interface';
2
+
1
3
  export declare function addZeroToDecimalPlaces(numStr: string, precision?: number): string;
4
+ /**
5
+ * 获取字符串类型的值
6
+ * @param value
7
+ * @param options
8
+ * @returns
9
+ */
10
+ export declare function getValueStr(value?: number, options?: ApFieldNumberProps): string | undefined;
@@ -1,14 +1,23 @@
1
- import { isNil as i } from "lodash-unified";
2
- function a(t, r) {
3
- if (i(r))
4
- return t;
5
- let [f, e = ""] = t.split(".");
6
- if (e.length >= r)
7
- return t;
8
- for (let l = e.length; l < r; l++)
9
- e += "0";
10
- return f + "." + e;
1
+ import { isNil as c } from "lodash-unified";
2
+ import { toDecimalMark as t } from "@fruits-chain/utils";
3
+ function m(l, e) {
4
+ if (c(e))
5
+ return l;
6
+ let [a, r = ""] = l.split(".");
7
+ if (r.length >= e)
8
+ return l;
9
+ for (let f = r.length; f < e; f++)
10
+ r += "0";
11
+ return a + "." + r;
12
+ }
13
+ function g(l, e) {
14
+ const a = l;
15
+ if (c(a))
16
+ return e == null ? void 0 : e.emptyText;
17
+ let r = e != null && e.thousands ? t(a, e.precision) : String(a);
18
+ return e != null && e.precision && e.limitDecimalsRetain && (r = m(r, e.precision)), r;
11
19
  }
12
20
  export {
13
- a as addZeroToDecimalPlaces
21
+ m as addZeroToDecimalPlaces,
22
+ g as getValueStr
14
23
  };