@aplus-frontend/ui 0.0.10 → 0.0.12

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 (55) hide show
  1. package/es/src/ap-action/item/index.vue2.mjs +21 -20
  2. package/es/src/ap-action/style/item.css +20 -5
  3. package/es/src/ap-field/checkbox/index.vue.mjs +1 -1
  4. package/es/src/ap-field/date/index.vue.mjs +1 -1
  5. package/es/src/ap-field/date-range/index.vue.mjs +1 -1
  6. package/es/src/ap-field/number/index.vue.mjs +1 -1
  7. package/es/src/ap-field/radio/index.vue.mjs +1 -1
  8. package/es/src/ap-field/select/index.vue.mjs +1 -1
  9. package/es/src/ap-field/slider/index.vue.d.ts +3 -0
  10. package/es/src/ap-field/slider/index.vue.mjs +4 -4
  11. package/es/src/ap-field/switch/index.vue.mjs +1 -1
  12. package/es/src/ap-field/text/index.vue2.mjs +1 -1
  13. package/es/src/ap-field/text/password.vue.mjs +1 -1
  14. package/es/src/ap-field/text-area/index.vue.mjs +1 -1
  15. package/es/src/ap-form/ap-form.vue2.mjs +27 -27
  16. package/es/src/ap-form/modal-form/index.vue.mjs +104 -104
  17. package/es/src/ap-form/style/modal-form.css +5 -1
  18. package/es/src/ap-table/ap-table.vue.d.ts +2 -3
  19. package/es/src/ap-table/ap-table.vue.mjs +95 -91
  20. package/es/src/ap-table/interface.d.ts +1 -1
  21. package/es/src/editable-table/interface.d.ts +73 -0
  22. package/es/src/editable-table/style/index.css +11 -0
  23. package/es/src/editable-table/utils.d.ts +8 -0
  24. package/es/src/pro-form/components/form-action.vue2.mjs +8 -8
  25. package/es/src/theme/ap-action/item.css +20 -5
  26. package/es/src/theme/ap-form/modal-form.css +5 -1
  27. package/es/src/theme/editable-table/index.css +11 -0
  28. package/lib/src/ap-action/item/index.vue2.js +1 -1
  29. package/lib/src/ap-action/style/item.css +20 -5
  30. package/lib/src/ap-field/checkbox/index.vue.js +1 -1
  31. package/lib/src/ap-field/date/index.vue.js +1 -1
  32. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  33. package/lib/src/ap-field/number/index.vue.js +1 -1
  34. package/lib/src/ap-field/radio/index.vue.js +1 -1
  35. package/lib/src/ap-field/select/index.vue.js +1 -1
  36. package/lib/src/ap-field/slider/index.vue.d.ts +3 -0
  37. package/lib/src/ap-field/slider/index.vue.js +1 -1
  38. package/lib/src/ap-field/switch/index.vue.js +1 -1
  39. package/lib/src/ap-field/text/index.vue2.js +1 -1
  40. package/lib/src/ap-field/text/password.vue.js +1 -1
  41. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  42. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  43. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  44. package/lib/src/ap-form/style/modal-form.css +5 -1
  45. package/lib/src/ap-table/ap-table.vue.d.ts +2 -3
  46. package/lib/src/ap-table/ap-table.vue.js +1 -1
  47. package/lib/src/ap-table/interface.d.ts +1 -1
  48. package/lib/src/editable-table/interface.d.ts +73 -0
  49. package/lib/src/editable-table/style/index.css +11 -0
  50. package/lib/src/editable-table/utils.d.ts +8 -0
  51. package/lib/src/pro-form/components/form-action.vue2.js +1 -1
  52. package/lib/src/theme/ap-action/item.css +20 -5
  53. package/lib/src/theme/ap-form/modal-form.css +5 -1
  54. package/lib/src/theme/editable-table/index.css +11 -0
  55. package/package.json +1 -1
@@ -1,9 +1,10 @@
1
- import { defineComponent as y, ref as g, unref as r, computed as s, openBlock as n, createElementBlock as c, normalizeClass as C, createBlock as d, createCommentVNode as u, renderSlot as b, isVNode as v, resolveDynamicComponent as B, toDisplayString as A } from "vue";
1
+ import { defineComponent as C, ref as b, unref as n, computed as s, openBlock as t, createElementBlock as c, normalizeClass as v, createBlock as d, createCommentVNode as u, renderSlot as B, isVNode as A, resolveDynamicComponent as x, toDisplayString as h } from "vue";
2
2
  import "../../config-provider/index.mjs";
3
- import x from "ant-design-vue/es/button/LoadingIcon";
3
+ import I from "ant-design-vue/es/button/LoadingIcon";
4
4
  import "../style/item.css";
5
- import { useNamespace as h } from "../../config-provider/hooks/use-namespace.mjs";
6
- const I = { key: 1 }, V = /* @__PURE__ */ y({
5
+ import { useNamespace as L } from "../../config-provider/hooks/use-namespace.mjs";
6
+ import { useGlobalConfig as N } from "../../config-provider/hooks/use-global-config.mjs";
7
+ const _ = { key: 1 }, G = /* @__PURE__ */ C({
7
8
  name: "ApActionItem",
8
9
  __name: "index",
9
10
  props: {
@@ -15,35 +16,35 @@ const I = { key: 1 }, V = /* @__PURE__ */ y({
15
16
  onClick: {},
16
17
  loading: { type: Boolean, default: !1 }
17
18
  },
18
- setup(f) {
19
- const e = f, { b: m, m: t } = h("action-item"), l = g(!1);
20
- function p(o) {
19
+ setup(m) {
20
+ const e = m, { b: f, m: r, bm: p } = L("action-item"), g = N("uiMode"), l = b(!1);
21
+ function k(o) {
21
22
  var i;
22
- r(a) || e.disabled || ((i = e.onClick) == null || i.call(e, o), e.onAction && (l.value = !0, e.onAction(o).finally(() => l.value = !1)));
23
+ n(a) || e.disabled || ((i = e.onClick) == null || i.call(e, o), e.onAction && (l.value = !0, e.onAction(o).finally(() => l.value = !1)));
23
24
  }
24
- const a = s(() => e.loading || r(l)), k = s(() => [
25
- m(),
26
- t(e.color),
27
- e.disabled ? t("disabled") : null,
28
- a.value ? t("loading") : null
25
+ const a = s(() => e.loading || n(l)), y = s(() => [
26
+ f(),
27
+ p(n(g), e.color),
28
+ e.disabled ? r("disabled") : null,
29
+ a.value ? r("loading") : null
29
30
  ].filter(Boolean));
30
- return (o, i) => o.visible ? (n(), c("span", {
31
+ return (o, i) => o.visible ? (t(), c("span", {
31
32
  key: 0,
32
- onClick: p,
33
- class: C(k.value)
33
+ onClick: k,
34
+ class: v(y.value)
34
35
  }, [
35
- a.value ? (n(), d(r(x), {
36
+ a.value ? (t(), d(n(I), {
36
37
  key: 0,
37
38
  prefixCls: "btn",
38
39
  existIcon: !1,
39
40
  loading: ""
40
41
  })) : u("", !0),
41
- b(o.$slots, "default", {}, () => [
42
- v(o.text) ? (n(), d(B(o.text), { key: 0 })) : (n(), c("span", I, A(o.text || ""), 1))
42
+ B(o.$slots, "default", {}, () => [
43
+ A(o.text) ? (t(), d(x(o.text), { key: 0 })) : (t(), c("span", _, h(o.text || ""), 1))
43
44
  ])
44
45
  ], 2)) : u("", !0);
45
46
  }
46
47
  });
47
48
  export {
48
- V as default
49
+ G as default
49
50
  };
@@ -4,21 +4,36 @@
4
4
  line-height: 22px;
5
5
  cursor: pointer;
6
6
  }
7
- .aplus-action-item--primary {
7
+ .aplus-action-item-aplus--primary {
8
8
  color: #0070ff;
9
9
  }
10
- .aplus-action-item--primary:not(.aplus-action-item--disabled):hover {
10
+ .aplus-action-item-aplus--primary:not(.aplus-action-item--disabled):hover {
11
11
  color: #66a9ff;
12
12
  }
13
- .aplus-action-item--success {
13
+ .aplus-action-item-admin--primary {
14
+ color: #1890FF;
15
+ }
16
+ .aplus-action-item-admin--primary:not(.aplus-action-item--disabled):hover {
17
+ color: #5EB1FF;
18
+ }
19
+ .aplus-action-item-aplus--success {
14
20
  color: #2ed1a3;
15
21
  }
16
- .aplus-action-item--error {
22
+ .aplus-action-item-aplus--error {
17
23
  color: #FF4D4F;
18
24
  }
19
- .aplus-action-item--warn {
25
+ .aplus-action-item-aplus--warn {
20
26
  color: #FFA940;
21
27
  }
28
+ .aplus-action-item-admin--success {
29
+ color: #52C41A;
30
+ }
31
+ .aplus-action-item-admin--error {
32
+ color: #FF4D4F;
33
+ }
34
+ .aplus-action-item-admin--warn {
35
+ color: #FAAD14;
36
+ }
22
37
  .aplus-action-item--loading {
23
38
  opacity: 0.35;
24
39
  transition: opacity 0.2s;
@@ -19,7 +19,7 @@ const E = /* @__PURE__ */ g({
19
19
  options: { default: () => [] },
20
20
  disabled: { type: Boolean },
21
21
  id: {},
22
- emptyText: { default: "-" },
22
+ emptyText: { default: "--" },
23
23
  request: {}
24
24
  },
25
25
  emits: ["update:value"],
@@ -73,7 +73,7 @@ const Z = /* @__PURE__ */ b({
73
73
  disabledMinutes: {},
74
74
  disabledSeconds: {},
75
75
  valueFormat: {},
76
- emptyText: { default: "-" },
76
+ emptyText: { default: "--" },
77
77
  value: {},
78
78
  defaultValue: {},
79
79
  onChange: {},
@@ -77,7 +77,7 @@ const de = /* @__PURE__ */ x({
77
77
  disabledMinutes: {},
78
78
  disabledSeconds: {},
79
79
  valueFormat: {},
80
- emptyText: { default: "-" },
80
+ emptyText: { default: "--" },
81
81
  value: {},
82
82
  defaultValue: {},
83
83
  onChange: {},
@@ -48,7 +48,7 @@ const Y = /* @__PURE__ */ h({
48
48
  onStep: {},
49
49
  onBlur: {},
50
50
  onFocus: {},
51
- emptyText: { default: "-" },
51
+ emptyText: { default: "--" },
52
52
  thousands: { type: Boolean, default: !1 },
53
53
  limitDecimalsRetain: { type: Boolean }
54
54
  },
@@ -20,7 +20,7 @@ const j = /* @__PURE__ */ V({
20
20
  optionType: {},
21
21
  onChange: {},
22
22
  "onUpdate:value": {},
23
- emptyText: { default: "-" },
23
+ emptyText: { default: "--" },
24
24
  request: {}
25
25
  },
26
26
  emits: ["update:value"],
@@ -80,7 +80,7 @@ const G = { key: 0 }, oe = /* @__PURE__ */ P({
80
80
  optionLabelProp: {},
81
81
  defaultActiveFirstOption: { type: Boolean, default: void 0 },
82
82
  labelInValue: { type: Boolean, default: void 0 },
83
- emptyText: { default: "-" },
83
+ emptyText: { default: "--" },
84
84
  request: {},
85
85
  multiple: { type: Boolean, default: void 0 },
86
86
  value: {},
@@ -17,6 +17,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
17
17
  step: number;
18
18
  tooltipOpen: undefined;
19
19
  tooltipVisible: undefined;
20
+ emptyText: string;
20
21
  }>, {
21
22
  focus: typeof focus;
22
23
  blur: typeof blur;
@@ -29,6 +30,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
29
30
  step: number;
30
31
  tooltipOpen: undefined;
31
32
  tooltipVisible: undefined;
33
+ emptyText: string;
32
34
  }>>> & {
33
35
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
34
36
  }, {
@@ -38,6 +40,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
38
40
  included: boolean;
39
41
  tooltipOpen: boolean;
40
42
  tooltipVisible: boolean;
43
+ emptyText: string;
41
44
  }, {}>, Readonly<ApFieldSliderSlots> & ApFieldSliderSlots>;
42
45
  export default _default;
43
46
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -36,13 +36,13 @@ const I = /* @__PURE__ */ x({
36
36
  onFocus: {},
37
37
  onBlur: {},
38
38
  "onUpdate:value": {},
39
- emptyText: {}
39
+ emptyText: { default: "--" }
40
40
  },
41
41
  emits: ["update:value"],
42
42
  setup(p, { expose: i, emit: s }) {
43
- const d = g(), a = k(), l = p, m = s, { value: r, updateValue: f } = E(
43
+ const d = g(), a = k(), l = p, f = s, { value: r, updateValue: m } = E(
44
44
  l,
45
- m
45
+ f
46
46
  ), c = C(() => {
47
47
  const e = o(r);
48
48
  return w(e) ? l.emptyText : z(e) ? `${e[0]}-${e[1]}` : e;
@@ -71,7 +71,7 @@ const I = /* @__PURE__ */ x({
71
71
  ]),
72
72
  {
73
73
  value: o(r),
74
- "onUpdate:value": o(f),
74
+ "onUpdate:value": o(m),
75
75
  ref_key: "sliderRef",
76
76
  ref: a
77
77
  }
@@ -41,7 +41,7 @@ const J = /* @__PURE__ */ F({
41
41
  onBlur: {},
42
42
  onFocus: {},
43
43
  emptyText: {
44
- default: "-"
44
+ default: "--"
45
45
  },
46
46
  onAction: {},
47
47
  confirm: {}
@@ -80,7 +80,7 @@ const K = /* @__PURE__ */ v({
80
80
  default: !0
81
81
  },
82
82
  emptyText: {
83
- default: "-"
83
+ default: "--"
84
84
  }
85
85
  },
86
86
  emits: ["update:value"],
@@ -94,7 +94,7 @@ const D = /* @__PURE__ */ x({
94
94
  },
95
95
  "onUpdate:visible": {},
96
96
  emptyText: {
97
- default: "-"
97
+ default: "--"
98
98
  }
99
99
  },
100
100
  emits: ["update:value", "update:visible"],
@@ -52,7 +52,7 @@ const I = /* @__PURE__ */ c({
52
52
  handleReset: {},
53
53
  clearIcon: {},
54
54
  allowClear: { type: Boolean, default: !0 },
55
- emptyText: { default: "-" }
55
+ emptyText: { default: "--" }
56
56
  },
57
57
  emits: ["update:value"],
58
58
  setup(u, { expose: p, emit: s }) {
@@ -1,8 +1,8 @@
1
- import { defineComponent as b, ref as k, reactive as x, computed as M, openBlock as R, createBlock as T, unref as W, mergeProps as q, withCtx as w, renderSlot as z } from "vue";
2
- import { Form as A } from "ant-design-vue";
3
- import { useProvideForm as E } from "./context.mjs";
1
+ import { defineComponent as b, ref as R, reactive as k, toRaw as x, computed as M, openBlock as T, createBlock as w, unref as W, mergeProps as q, withCtx as z, renderSlot as A } from "vue";
2
+ import { Form as E } from "ant-design-vue";
3
+ import { useProvideForm as O } from "./context.mjs";
4
4
  import { isArray as y } from "lodash-unified";
5
- const I = /* @__PURE__ */ b({
5
+ const L = /* @__PURE__ */ b({
6
6
  __name: "ap-form",
7
7
  props: {
8
8
  layout: { default: "horizontal" },
@@ -35,27 +35,27 @@ const I = /* @__PURE__ */ b({
35
35
  function _(e, t) {
36
36
  var V;
37
37
  if (y(e)) {
38
- let u = o;
39
- for (let d = 0; d < e.length - 1; d++)
40
- u = u[e[d]];
41
- u[e[e.length - 1]] = t;
38
+ let n = o;
39
+ for (let u = 0; u < e.length - 1; u++)
40
+ n = n[e[u]];
41
+ n[e[e.length - 1]] = t;
42
42
  } else
43
43
  o[e] = t;
44
44
  let l = y(e) ? e[0] : e;
45
45
  (V = r.onValuesChange) == null || V.call(r, { [l]: o[l] }, o), s();
46
46
  }
47
- const a = k(), o = x(r.initialValues || {});
47
+ const a = R(), o = k(r.initialValues || {});
48
48
  let i = [];
49
- const f = (e) => {
49
+ const d = (e) => {
50
50
  var t;
51
51
  (t = a.value) == null || t.resetFields(e), s();
52
- }, c = (e) => {
52
+ }, f = (e) => {
53
53
  var t;
54
54
  (t = a.value) == null || t.clearValidate(e);
55
- }, p = (e, t) => {
55
+ }, c = (e, t) => {
56
56
  var l;
57
57
  return (l = a.value) == null ? void 0 : l.validateFields(e, t);
58
- }, n = (e) => {
58
+ }, p = (e) => {
59
59
  var t;
60
60
  return (t = a.value) == null ? void 0 : t.getFieldsValue(e);
61
61
  }, h = (e, t) => {
@@ -76,20 +76,20 @@ const I = /* @__PURE__ */ b({
76
76
  }
77
77
  function s() {
78
78
  if (i.length) {
79
- const e = n(!0);
79
+ const e = x(o);
80
80
  i.forEach((t) => {
81
81
  t(e);
82
82
  });
83
83
  }
84
84
  }
85
- return E({
85
+ return O({
86
86
  model: M(() => o),
87
87
  updateModel: _,
88
88
  formInstance: {
89
- resetFields: f,
90
- clearValidate: c,
91
- validateFields: p,
92
- getFieldsValue: n,
89
+ resetFields: d,
90
+ clearValidate: f,
91
+ validateFields: c,
92
+ getFieldsValue: p,
93
93
  validate: h,
94
94
  scrollToField: g,
95
95
  setFieldsValue: F,
@@ -97,26 +97,26 @@ const I = /* @__PURE__ */ b({
97
97
  registerWatch: v
98
98
  }
99
99
  }), B({
100
- resetFields: f,
101
- clearValidate: c,
102
- validateFields: p,
103
- getFieldsValue: n,
100
+ resetFields: d,
101
+ clearValidate: f,
102
+ validateFields: c,
103
+ getFieldsValue: p,
104
104
  validate: h,
105
105
  scrollToField: g,
106
106
  setFieldsValue: F,
107
107
  setFieldValue: m,
108
108
  registerWatch: v
109
- }), (e, t) => (R(), T(W(A), q({
109
+ }), (e, t) => (T(), w(W(E), q({
110
110
  ref_key: "formRef",
111
111
  ref: a
112
112
  }, r, { model: o }), {
113
- default: w(() => [
114
- z(e.$slots, "default")
113
+ default: z(() => [
114
+ A(e.$slots, "default")
115
115
  ]),
116
116
  _: 3
117
117
  }, 16, ["model"]));
118
118
  }
119
119
  });
120
120
  export {
121
- I as default
121
+ L as default
122
122
  };