@aplus-frontend/ui 7.13.12 → 7.14.0

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 (99) hide show
  1. package/es/index.mjs +58 -56
  2. package/es/src/ap-field/text/index.vue2.mjs +2 -2
  3. package/es/src/ap-field/text/password.vue.mjs +8 -8
  4. package/es/src/ap-form/ap-form.vue.d.ts +1 -0
  5. package/es/src/ap-form/ap-form.vue2.mjs +122 -106
  6. package/es/src/ap-form/drawer-form/index.vue.d.ts +4 -0
  7. package/es/src/ap-form/drawer-form/index.vue.mjs +13 -10
  8. package/es/src/ap-form/interface.d.ts +5 -0
  9. package/es/src/ap-form/item/index.vue.d.ts +1 -0
  10. package/es/src/ap-form/item/index.vue.mjs +84 -70
  11. package/es/src/ap-form/items/checkbox/index.vue.mjs +9 -8
  12. package/es/src/ap-form/items/date/index.vue.mjs +10 -9
  13. package/es/src/ap-form/items/date-range/index.vue.mjs +10 -9
  14. package/es/src/ap-form/items/number/index.vue.mjs +7 -6
  15. package/es/src/ap-form/items/radio/index.vue.mjs +9 -8
  16. package/es/src/ap-form/items/select/index.vue.mjs +3 -2
  17. package/es/src/ap-form/items/switch/index.vue.mjs +10 -9
  18. package/es/src/ap-form/items/text/index.vue2.mjs +6 -5
  19. package/es/src/ap-form/items/text/password.vue.mjs +10 -9
  20. package/es/src/ap-form/items/text-area/index.vue.mjs +4 -3
  21. package/es/src/ap-form/items/tree-select/index.vue.mjs +1 -0
  22. package/es/src/ap-form/modal-form/index.vue.d.ts +4 -0
  23. package/es/src/ap-form/modal-form/index.vue.mjs +3 -0
  24. package/es/src/ap-form/render/item.vue.mjs +6 -5
  25. package/es/src/ap-form/search-form/index.vue.d.ts +4 -0
  26. package/es/src/ap-form/search-form/index.vue.mjs +26 -23
  27. package/es/src/ap-table/ap-table.vue2.mjs +2 -2
  28. package/es/src/ap-table/components/setting/index.d.ts +2 -0
  29. package/es/src/ap-table/components/setting/index.mjs +5 -0
  30. package/es/src/ap-table/components/setting/modal/index.vue.mjs +277 -2
  31. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +2 -273
  32. package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +11 -8
  33. package/es/src/ap-table/components/setting/template/edit-form.vue.d.ts +2 -0
  34. package/es/src/ap-table/components/setting/template/item.vue2.mjs +35 -35
  35. package/es/src/ap-table/hooks/use-table-template-storage.mjs +55 -54
  36. package/es/src/ap-table/index.d.ts +2 -2
  37. package/es/src/ap-table/index.mjs +7 -6
  38. package/es/src/ap-table/interface.d.ts +16 -0
  39. package/es/src/business/ap-size-input/form-item.vue.mjs +6 -5
  40. package/es/src/business/ap-view/components/main-button-content.vue.d.ts +2 -0
  41. package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +2 -0
  42. package/es/src/business/batch-input-group/form-item.vue.mjs +8 -7
  43. package/es/src/index.mjs +54 -52
  44. package/es/src/locale/lang/en.mjs +1 -0
  45. package/es/src/locale/lang/zh-cn.mjs +1 -0
  46. package/es/src/render/render.d.ts +7 -4
  47. package/es/src/render/render.mjs +17 -7
  48. package/es/src/version.d.ts +1 -1
  49. package/es/src/version.mjs +1 -1
  50. package/lib/index.js +1 -1
  51. package/lib/src/ap-field/text/index.vue2.js +1 -1
  52. package/lib/src/ap-field/text/password.vue.js +1 -1
  53. package/lib/src/ap-form/ap-form.vue.d.ts +1 -0
  54. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  55. package/lib/src/ap-form/drawer-form/index.vue.d.ts +4 -0
  56. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  57. package/lib/src/ap-form/interface.d.ts +5 -0
  58. package/lib/src/ap-form/item/index.vue.d.ts +1 -0
  59. package/lib/src/ap-form/item/index.vue.js +1 -1
  60. package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
  61. package/lib/src/ap-form/items/date/index.vue.js +1 -1
  62. package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
  63. package/lib/src/ap-form/items/number/index.vue.js +1 -1
  64. package/lib/src/ap-form/items/radio/index.vue.js +1 -1
  65. package/lib/src/ap-form/items/select/index.vue.js +1 -1
  66. package/lib/src/ap-form/items/switch/index.vue.js +1 -1
  67. package/lib/src/ap-form/items/text/index.vue2.js +1 -1
  68. package/lib/src/ap-form/items/text/password.vue.js +1 -1
  69. package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
  70. package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
  71. package/lib/src/ap-form/modal-form/index.vue.d.ts +4 -0
  72. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  73. package/lib/src/ap-form/render/item.vue.js +1 -1
  74. package/lib/src/ap-form/search-form/index.vue.d.ts +4 -0
  75. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  76. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  77. package/lib/src/ap-table/components/setting/index.d.ts +2 -0
  78. package/lib/src/ap-table/components/setting/index.js +1 -0
  79. package/lib/src/ap-table/components/setting/modal/index.vue.js +1 -1
  80. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  81. package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
  82. package/lib/src/ap-table/components/setting/template/edit-form.vue.d.ts +2 -0
  83. package/lib/src/ap-table/components/setting/template/item.vue2.js +1 -1
  84. package/lib/src/ap-table/hooks/use-table-template-storage.js +1 -1
  85. package/lib/src/ap-table/index.d.ts +2 -2
  86. package/lib/src/ap-table/index.js +1 -1
  87. package/lib/src/ap-table/interface.d.ts +16 -0
  88. package/lib/src/business/ap-size-input/form-item.vue.js +1 -1
  89. package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +2 -0
  90. package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +2 -0
  91. package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
  92. package/lib/src/index.js +1 -1
  93. package/lib/src/locale/lang/en.js +1 -1
  94. package/lib/src/locale/lang/zh-cn.js +1 -1
  95. package/lib/src/render/render.d.ts +7 -4
  96. package/lib/src/render/render.js +1 -1
  97. package/lib/src/version.d.ts +1 -1
  98. package/lib/src/version.js +1 -1
  99. package/package.json +5 -5
@@ -1,12 +1,12 @@
1
- import { defineComponent as b, ref as g, createElementBlock as u, openBlock as s, normalizeClass as n, unref as e, createElementVNode as c, createBlock as w, createCommentVNode as f, toDisplayString as B, withCtx as r, createVNode as i, withModifiers as v } from "vue";
1
+ import { defineComponent as g, ref as b, createElementBlock as c, openBlock as s, normalizeClass as n, unref as t, createElementVNode as f, createBlock as w, createCommentVNode as v, toDisplayString as B, withCtx as r, createVNode as i, withModifiers as d } from "vue";
2
2
  import { EditOutlined as N, DeleteOutlined as A } from "@ant-design/icons-vue";
3
3
  import { Flex as D, Popover as E } from "@aplus-frontend/antdv";
4
4
  import "../../../../config-provider/index.mjs";
5
- import { useInjectApColumnSetting as V } from "../context.mjs";
5
+ import { useInjectApColumnSetting as S } from "../context.mjs";
6
6
  import "./edit-form.vue.mjs";
7
- import { useNamespace as F } from "../../../../config-provider/hooks/use-namespace.mjs";
8
- import O from "./edit-form.vue2.mjs";
9
- const M = /* @__PURE__ */ b({
7
+ import { useNamespace as V } from "../../../../config-provider/hooks/use-namespace.mjs";
8
+ import F from "./edit-form.vue2.mjs";
9
+ const K = /* @__PURE__ */ g({
10
10
  __name: "item",
11
11
  props: {
12
12
  value: {},
@@ -14,29 +14,29 @@ const M = /* @__PURE__ */ b({
14
14
  onClick: { type: Function },
15
15
  shouldRemove: { type: Boolean }
16
16
  },
17
- setup(d) {
18
- const p = d, { b: l } = F("ap-column-setting-template-item"), a = g(!1), { deleteTemplate: C, cacheConfig: k } = V();
19
- function y(t) {
20
- if (!t || t === p.value.label)
17
+ setup(C) {
18
+ const p = C, { b: l } = V("ap-column-setting-template-item"), a = b(!1), { deleteTemplate: k, cacheConfig: m } = S();
19
+ function y(o) {
20
+ if (!o || o === p.value.label)
21
21
  return;
22
- const o = p.value;
23
- o.label = t, a.value = !1;
22
+ const e = p.value;
23
+ e.label = o, m.value?.onChange?.(e.columnState, e), a.value = !1;
24
24
  }
25
- return (t, o) => (s(), u("div", {
26
- class: n([e(l)(), { [e(l)("active")]: t.isActive }]),
27
- onClick: o[3] || (o[3] = //@ts-ignore
28
- (...m) => t.onClick && t.onClick(...m))
25
+ return (o, e) => (s(), c("div", {
26
+ class: n([t(l)(), { [t(l)("active")]: o.isActive }]),
27
+ onClick: e[3] || (e[3] = //@ts-ignore
28
+ (...u) => o.onClick && o.onClick(...u))
29
29
  }, [
30
- c("span", {
31
- class: n(e(l)("label"))
32
- }, B(t.value.label), 3),
33
- e(k).persistenceKey ? (s(), w(e(D), {
30
+ f("span", {
31
+ class: n(t(l)("label"))
32
+ }, B(o.value.label), 3),
33
+ t(m).persistenceKey ? (s(), w(t(D), {
34
34
  key: 0,
35
35
  gap: 8,
36
- class: n(e(l)("action-wrapper"))
36
+ class: n(t(l)("action-wrapper"))
37
37
  }, {
38
38
  default: r(() => [
39
- i(e(E), {
39
+ i(t(E), {
40
40
  open: a.value,
41
41
  trigger: "click",
42
42
  arrow: !1,
@@ -44,36 +44,36 @@ const M = /* @__PURE__ */ b({
44
44
  "destroy-tooltip-on-hide": ""
45
45
  }, {
46
46
  content: r(() => [
47
- i(O, {
47
+ i(F, {
48
48
  "is-edit": "",
49
- "initial-values": { label: t.value.label },
49
+ "initial-values": { label: o.value.label },
50
50
  onConfirm: y,
51
- onCancel: o[1] || (o[1] = () => a.value = !1)
51
+ onCancel: e[1] || (e[1] = () => a.value = !1)
52
52
  }, null, 8, ["initial-values"])
53
53
  ]),
54
54
  default: r(() => [
55
- c("span", {
56
- class: n(e(l)("icon-wrapper")),
57
- onClick: o[0] || (o[0] = v((m) => a.value = !0, ["stop"]))
55
+ f("span", {
56
+ class: n(t(l)("icon-wrapper")),
57
+ onClick: e[0] || (e[0] = d((u) => a.value = !0, ["stop"]))
58
58
  }, [
59
- i(e(N))
59
+ i(t(N))
60
60
  ], 2)
61
61
  ]),
62
62
  _: 1
63
63
  }, 8, ["open"]),
64
- t.shouldRemove ? (s(), u("span", {
64
+ o.shouldRemove ? (s(), c("span", {
65
65
  key: 0,
66
- class: n(e(l)("icon-wrapper")),
67
- onClick: o[2] || (o[2] = v(() => e(C)(t.value.key), ["stop"]))
66
+ class: n(t(l)("icon-wrapper")),
67
+ onClick: e[2] || (e[2] = d(() => t(k)(o.value.key), ["stop"]))
68
68
  }, [
69
- i(e(A))
70
- ], 2)) : f("", !0)
69
+ i(t(A))
70
+ ], 2)) : v("", !0)
71
71
  ]),
72
72
  _: 1
73
- }, 8, ["class"])) : f("", !0)
73
+ }, 8, ["class"])) : v("", !0)
74
74
  ], 2));
75
75
  }
76
76
  });
77
77
  export {
78
- M as default
78
+ K as default
79
79
  };
@@ -1,41 +1,42 @@
1
- import { useToken as F } from "@aplus-frontend/antdv/es/theme/internal";
2
- import { isBoolean as J, isNumber as T, isObject as x, mergeWith as y, omit as L, isString as j } from "lodash-unified";
1
+ import { useToken as C } from "@aplus-frontend/antdv/es/theme/internal";
2
+ import { isBoolean as J, isNumber as v, isObject as x, mergeWith as y, omit as M, isString as j } from "lodash-unified";
3
3
  import { ref as S, unref as c, watch as h } from "vue";
4
4
  import "../../config-provider/index.mjs";
5
- import { randomStr as k } from "../../utils/index.mjs";
5
+ import { randomStr as A } from "../../utils/index.mjs";
6
6
  import { getColumnStateString as G } from "../components/setting/utils.mjs";
7
- import { useInjectApTable as M } from "../context.mjs";
7
+ import { useInjectApTable as P } from "../context.mjs";
8
8
  import { getTableTitle as R } from "../utils.mjs";
9
+ import { useLocale as U } from "../../config-provider/hooks/use-locale.mjs";
9
10
  import { useNamespace as W } from "../../config-provider/hooks/use-namespace.mjs";
10
11
  function X(t, e, i, o) {
11
12
  return o ? o.fixed : e ? e.fixed : i && "fixed" in i ? i.fixed : J(t.fixed) ? t.fixed ? "left" : void 0 : t.fixed;
12
13
  }
13
- const b = Number.MAX_SAFE_INTEGER, q = k();
14
- function H(t, e) {
15
- const i = T(t.order) ? t.order : b;
16
- let o = T(e.order) ? e.order : b;
14
+ const b = Number.MAX_SAFE_INTEGER, q = A();
15
+ function D(t, e) {
16
+ const i = v(t.order) ? t.order : b;
17
+ let o = v(e.order) ? e.order : b;
17
18
  return t.fixed === "right" && e.fixed !== "right" && (o = i - 1), e.fixed === "left" && t.fixed !== "left" && (o = i - 1), i - o;
18
19
  }
19
- function P(t, e) {
20
+ function H(t, e) {
20
21
  e && t.removeItem(e);
21
22
  }
22
- function Q(t, e) {
23
+ function K(t, e) {
23
24
  if (!e)
24
25
  return [];
25
26
  const i = t.getItem(e);
26
27
  if (!i)
27
28
  return [];
28
29
  const o = JSON.parse(i);
29
- return Array.isArray(o) ? o : (P(t, e), []);
30
+ return Array.isArray(o) ? o : (H(t, e), []);
30
31
  }
31
- function I(t, e) {
32
+ function k(t, e) {
32
33
  if (x(t) && x(e))
33
- return y({}, t, e, I);
34
+ return y({}, t, e, k);
34
35
  }
35
- const ie = (t, e) => {
36
- const { columnsBackup: i, size: o } = M(), { be: A } = W("ap-table"), [U, N] = F(), m = S(), u = S(
36
+ const ae = (t, e) => {
37
+ const { columnsBackup: i, size: o } = P(), { t: I } = U(), { be: E } = W("ap-table"), [Q, N] = C(), m = S(), l = S(
37
38
  z(
38
- Q(localStorage, c(e))
39
+ K(localStorage, c(e))
39
40
  )
40
41
  );
41
42
  h(
@@ -43,7 +44,7 @@ const ie = (t, e) => {
43
44
  ([r, n]) => {
44
45
  r && (m.value = {
45
46
  label: "basic_template",
46
- columnState: l(r),
47
+ columnState: f(r),
47
48
  key: q,
48
49
  size: n
49
50
  });
@@ -53,55 +54,55 @@ const ie = (t, e) => {
53
54
  function z(r) {
54
55
  return r.length ? r.map((n) => ({
55
56
  ...n,
56
- columnState: l(
57
+ columnState: f(
57
58
  i.value,
58
59
  n.columnState,
59
60
  !1
60
61
  )
61
62
  })) : [
62
63
  {
63
- label: "默认模版",
64
- key: k(),
64
+ label: I("ap.apTable.setting.defaultTemplate"),
65
+ key: t.getActiveKey?.("DEFAULT_TEMPLATE") ?? A(),
65
66
  size: o?.value,
66
- columnState: l(i?.value || [])
67
+ columnState: f(i?.value || [])
67
68
  }
68
69
  ];
69
70
  }
70
- function l(r, n = {}, a = !0) {
71
+ function f(r, n = {}, a = !0) {
71
72
  const d = y(
72
73
  {},
73
74
  a ? t.defaultValue || {} : {},
74
75
  n,
75
- I
76
+ k
76
77
  );
77
- function g(E, w, C) {
78
- return E.map((f) => {
79
- const v = w?.[f.key] || {}, s = {
80
- key: f.key,
81
- label: j(f.title) ? R(
82
- f,
83
- A("table-header", "title"),
78
+ function T(B, F, w) {
79
+ return B.map((u) => {
80
+ const g = F?.[u.key] || {}, s = {
81
+ key: u.key,
82
+ label: j(u.title) ? R(
83
+ u,
84
+ E("table-header", "title"),
84
85
  void 0,
85
86
  N.value.colorTextTertiary
86
- ) : f.title,
87
+ ) : u.title,
87
88
  show: !0,
88
89
  fixed: X(
89
- f,
90
+ u,
90
91
  void 0,
91
- a ? t.defaultValue?.[f.key] : void 0,
92
- C
92
+ a ? t.defaultValue?.[u.key] : void 0,
93
+ w
93
94
  ),
94
95
  disabled: !1,
95
- ...L(v, ["children", "fixed"])
96
+ ...M(g, ["children", "fixed"])
96
97
  };
97
- return s.children = f.children?.length ? g(
98
- f.children,
99
- v.children,
98
+ return s.children = u.children?.length ? T(
99
+ u.children,
100
+ g.children,
100
101
  s
101
102
  ) : void 0, s;
102
- }).sort(H);
103
+ }).sort(D);
103
104
  }
104
- return g(r || [], d);
105
+ return T(r || [], d);
105
106
  }
106
107
  function p(r) {
107
108
  if (c(e)) {
@@ -112,39 +113,39 @@ const ie = (t, e) => {
112
113
  localStorage.setItem(c(e), JSON.stringify(n));
113
114
  }
114
115
  }
115
- function O(r) {
116
- u.value.push(r);
116
+ function L(r) {
117
+ l.value.push(r);
117
118
  }
118
119
  function _(r) {
119
- const n = u.value.findIndex(
120
+ const n = l.value.findIndex(
120
121
  (a) => a.key === r
121
122
  );
122
- u.value.splice(n, 1);
123
+ l.value.splice(n, 1);
123
124
  }
124
- function B(r, n) {
125
- const a = u.value.findIndex(
125
+ function O(r, n) {
126
+ const a = l.value.findIndex(
126
127
  (d) => d.key === r
127
128
  );
128
- return u.value[a] = {
129
- ...u.value[a],
129
+ return l.value[a] = {
130
+ ...l.value[a],
130
131
  ...n
131
- }, u.value[a];
132
+ }, l.value[a];
132
133
  }
133
134
  return h(
134
- () => u.value,
135
+ () => l.value,
135
136
  (r) => {
136
137
  p(r);
137
138
  },
138
139
  { deep: !0, immediate: !0 }
139
140
  ), {
140
141
  basicTemplate: m,
141
- customizeTemplateList: u,
142
+ customizeTemplateList: l,
142
143
  syncTemplateListToStorage: p,
143
- addTemplate: O,
144
+ addTemplate: L,
144
145
  deleteTemplate: _,
145
- updateTemplate: B
146
+ updateTemplate: O
146
147
  };
147
148
  };
148
149
  export {
149
- ie as useTableTemplateStorage
150
+ ae as useTableTemplateStorage
150
151
  };
@@ -1,9 +1,9 @@
1
1
  import { default as _ApTable } from './ap-table.vue';
2
- import { default as ApTableSetting } from './components/setting/modal/index.vue';
2
+ import { default as ApTableSetting } from './components/setting';
3
3
  type ApTableMixedType = typeof _ApTable & {
4
4
  Setting: typeof ApTableSetting;
5
5
  };
6
6
  declare const ApTable: ApTableMixedType;
7
- export { ApTable };
7
+ export { ApTable, ApTableSetting };
8
8
  export * from './interface';
9
9
  export * from './hooks/use-table-paging';
@@ -1,12 +1,13 @@
1
1
  import "./ap-table.vue.mjs";
2
- import "./components/setting/modal/index.vue.mjs";
2
+ import "./components/setting/index.mjs";
3
3
  import "./interface.mjs";
4
4
  import { useTablePaging as s } from "./hooks/use-table-paging.mjs";
5
- import o from "./ap-table.vue2.mjs";
6
- import m from "./components/setting/modal/index.vue2.mjs";
7
- const r = o;
8
- r.Setting = m;
5
+ import t from "./ap-table.vue2.mjs";
6
+ import o from "./components/setting/modal/index.vue.mjs";
7
+ const i = t;
8
+ i.Setting = o;
9
9
  export {
10
- r as ApTable,
10
+ i as ApTable,
11
+ o as ApTableSetting,
11
12
  s as useTablePaging
12
13
  };
@@ -99,6 +99,22 @@ export type ApTableSettingType = {
99
99
  * @returns
100
100
  */
101
101
  onChange?: (val: ApColumnState[], template: ApColumnTemplate) => void;
102
+ /**
103
+ * 当前正在使用的模板变更回调
104
+ * @param key
105
+ * @returns
106
+ */
107
+ onActiveChange?: (key: string) => void;
108
+ /**
109
+ * 默认应用的模板
110
+ */
111
+ defaultActiveKey?: string;
112
+ /**
113
+ * 自定义模板key
114
+ * @param templateName 模板名称
115
+ * @returns
116
+ */
117
+ getActiveKey?: (templateName: string) => string;
102
118
  };
103
119
  export type ApTableSettingDefaultValueType = Recordable<Omit<ApColumnState, 'label' | 'key' | 'children'> & {
104
120
  children?: ApTableSettingDefaultValueType;
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as r, createBlock as i, openBlock as p, unref as e, normalizeProps as l, guardReactiveProps as t, withCtx as d, createVNode as n } from "vue";
2
2
  import { omit as m } from "lodash-unified";
3
- import { ApForm as s } from "../../ap-form/index.mjs";
4
- import u from "./ApSizeInput.mjs";
3
+ import { ApForm as u } from "../../ap-form/index.mjs";
4
+ import s from "./ApSizeInput.mjs";
5
5
  const _ = /* @__PURE__ */ r({
6
6
  name: "ApFormItemSizeInput",
7
7
  __name: "form-item",
@@ -48,13 +48,14 @@ const _ = /* @__PURE__ */ r({
48
48
  transform: {},
49
49
  description: {},
50
50
  customFilled: {},
51
- disabled: { type: Boolean }
51
+ disabled: { type: Boolean },
52
+ autoFocus: { type: Boolean }
52
53
  },
53
54
  setup(a) {
54
55
  const o = a;
55
- return (f, c) => (p(), i(e(s).FormItem, l(t(e(m)(o, ["field"]))), {
56
+ return (f, c) => (p(), i(e(u).FormItem, l(t(e(m)(o, ["field"]))), {
56
57
  default: d(() => [
57
- n(e(u), l(t(o.field || {})), null, 16)
58
+ n(e(s), l(t(o.field || {})), null, 16)
58
59
  ]),
59
60
  _: 1
60
61
  }, 16));
@@ -111,6 +111,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
111
111
  readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
112
112
  readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
113
113
  readonly syncToUrlPriority?: boolean | undefined;
114
+ readonly autoFocusFirstInput?: boolean | undefined;
114
115
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
115
116
  $attrs: {
116
117
  [x: string]: unknown;
@@ -836,6 +837,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
836
837
  }> & {} & ComponentCustomProperties & {} & {
837
838
  $slots: {
838
839
  default?(_: {}): any;
840
+ default?(_: {}): any;
839
841
  };
840
842
  }) | null;
841
843
  }, any>;
@@ -112,6 +112,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
112
112
  readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
113
113
  readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
114
114
  readonly syncToUrlPriority?: boolean | undefined;
115
+ readonly autoFocusFirstInput?: boolean | undefined;
115
116
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
116
117
  $attrs: {
117
118
  [x: string]: unknown;
@@ -837,6 +838,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
837
838
  }> & {} & ComponentCustomProperties & {} & {
838
839
  $slots: {
839
840
  default?(_: {}): any;
841
+ default?(_: {}): any;
840
842
  };
841
843
  }) | null;
842
844
  }, any>;
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as m, computed as a, createBlock as c, openBlock as v, mergeProps as o, unref as r, withCtx as y, createVNode as h } from "vue";
2
2
  import { isValid as i } from "@aplus-frontend/utils";
3
3
  import { omit as n } from "lodash-unified";
4
- import { useInjectForm as b } from "../../ap-form/context.mjs";
5
- import { getModelValue as B } from "../../ap-form/utils/get.mjs";
4
+ import { useInjectForm as B } from "../../ap-form/context.mjs";
5
+ import { getModelValue as b } from "../../ap-form/utils/get.mjs";
6
6
  import "../../ap-form/item/index.vue2.mjs";
7
7
  import "./index.vue2.mjs";
8
8
  import g from "../../ap-form/item/index.vue.mjs";
@@ -53,13 +53,14 @@ const P = /* @__PURE__ */ m({
53
53
  description: {},
54
54
  customFilled: {},
55
55
  disabled: { type: Boolean, default: void 0 },
56
+ autoFocus: { type: Boolean },
56
57
  field: { default: () => ({}) },
57
58
  placeholer: {},
58
59
  trim: { type: Boolean, default: !0 },
59
60
  defaultSelectedAllKey: { type: Boolean }
60
61
  },
61
- setup(d) {
62
- const e = d, { internalInstance: s } = b(), u = a(() => e?.transform || {
62
+ setup(s) {
63
+ const e = s, { internalInstance: u } = B(), d = a(() => e?.transform || {
63
64
  flat: !1,
64
65
  transformer: (l) => {
65
66
  if (l)
@@ -71,8 +72,8 @@ const P = /* @__PURE__ */ m({
71
72
  }), f = a(() => e.field?.style || "width:auto"), p = a(() => {
72
73
  if (e.initialValue)
73
74
  return e.initialValue;
74
- const l = s?.getInitialValues();
75
- if (!B(l, e.name))
75
+ const l = u?.getInitialValues();
76
+ if (!b(l, e.name))
76
77
  return e.field.hasAll === !1 ? {
77
78
  key: [e?.field?.options?.[0]?.value]
78
79
  } : {
@@ -89,7 +90,7 @@ const P = /* @__PURE__ */ m({
89
90
  ]),
90
91
  {
91
92
  "initial-value": p.value,
92
- transform: u.value,
93
+ transform: d.value,
93
94
  bordered: l.field?.options?.length ? !1 : l.bordered
94
95
  }
95
96
  ), {