@aplus-frontend/ui 7.17.4 → 7.18.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 (101) hide show
  1. package/es/src/ag-grid/hooks/use-editable-form-item-api.mjs +1 -1
  2. package/es/src/ap-field/cascader/index.vue.mjs +9 -8
  3. package/es/src/ap-field/cascader/read.vue2.mjs +3 -2
  4. package/es/src/ap-field/checkbox/index.vue.mjs +12 -11
  5. package/es/src/ap-field/checkbox/read.vue2.mjs +5 -4
  6. package/es/src/ap-field/date/index.vue.mjs +83 -73
  7. package/es/src/ap-field/date/read.vue2.mjs +1 -0
  8. package/es/src/ap-field/date-range/index.vue.mjs +80 -70
  9. package/es/src/ap-field/date-range/read.vue2.mjs +3 -2
  10. package/es/src/ap-field/hooks/use-read-mode-render.d.ts +9 -0
  11. package/es/src/ap-field/hooks/use-read-mode-render.mjs +6 -0
  12. package/es/src/ap-field/interface.d.ts +8 -0
  13. package/es/src/ap-field/number/index.vue.mjs +57 -46
  14. package/es/src/ap-field/number/read.vue2.mjs +1 -0
  15. package/es/src/ap-field/radio/index.vue.mjs +17 -16
  16. package/es/src/ap-field/radio/read.vue2.mjs +1 -0
  17. package/es/src/ap-field/rate/index.vue.mjs +6 -5
  18. package/es/src/ap-field/second/index.vue.mjs +35 -20
  19. package/es/src/ap-field/second/read.vue2.mjs +1 -0
  20. package/es/src/ap-field/segmented/index.vue.mjs +15 -14
  21. package/es/src/ap-field/select/index.vue.mjs +53 -52
  22. package/es/src/ap-field/select/read.vue2.mjs +1 -0
  23. package/es/src/ap-field/slider/index.vue.mjs +11 -10
  24. package/es/src/ap-field/switch/index.vue.mjs +20 -19
  25. package/es/src/ap-field/switch/read.vue2.mjs +5 -4
  26. package/es/src/ap-field/text/index.vue2.mjs +35 -31
  27. package/es/src/ap-field/text/password.vue.d.ts +4 -4
  28. package/es/src/ap-field/text/password.vue.mjs +57 -48
  29. package/es/src/ap-field/text/read-password.vue2.mjs +6 -5
  30. package/es/src/ap-field/text/read.vue2.mjs +3 -2
  31. package/es/src/ap-field/text-area/index.vue.mjs +46 -36
  32. package/es/src/ap-field/text-area/read.vue2.mjs +1 -0
  33. package/es/src/ap-field/tree-select/index.vue.mjs +9 -8
  34. package/es/src/ap-field/tree-select/read.vue2.mjs +1 -0
  35. package/es/src/ap-form/items/cascader/index.vue.d.ts +3 -1
  36. package/es/src/ap-form/items/checkbox/index.vue.d.ts +3 -1
  37. package/es/src/ap-form/items/date/index.vue.d.ts +3 -1
  38. package/es/src/ap-form/items/date-range/index.vue.d.ts +3 -1
  39. package/es/src/ap-form/items/number/index.vue.d.ts +3 -1
  40. package/es/src/ap-form/items/select/index.vue.d.ts +3 -1
  41. package/es/src/ap-form/items/switch/index.vue.d.ts +3 -1
  42. package/es/src/ap-form/items/text/index.vue.d.ts +3 -1
  43. package/es/src/ap-form/items/text/password.vue.d.ts +3 -1
  44. package/es/src/ap-form/items/tree-select/index.vue.d.ts +3 -1
  45. package/es/src/ap-table/constants.d.ts +11 -1
  46. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +109 -98
  47. package/es/src/business/batch-input-group/index.vue.d.ts +2 -1
  48. package/es/src/business/batch-input-group/index.vue.mjs +11 -10
  49. package/es/src/version.d.ts +1 -1
  50. package/es/src/version.mjs +1 -1
  51. package/lib/src/ag-grid/hooks/use-editable-form-item-api.js +1 -1
  52. package/lib/src/ap-field/cascader/index.vue.js +1 -1
  53. package/lib/src/ap-field/cascader/read.vue2.js +1 -1
  54. package/lib/src/ap-field/checkbox/index.vue.js +1 -1
  55. package/lib/src/ap-field/checkbox/read.vue2.js +1 -1
  56. package/lib/src/ap-field/date/index.vue.js +1 -1
  57. package/lib/src/ap-field/date/read.vue2.js +1 -1
  58. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  59. package/lib/src/ap-field/date-range/read.vue2.js +1 -1
  60. package/lib/src/ap-field/hooks/use-read-mode-render.d.ts +9 -0
  61. package/lib/src/ap-field/hooks/use-read-mode-render.js +1 -0
  62. package/lib/src/ap-field/interface.d.ts +8 -0
  63. package/lib/src/ap-field/number/index.vue.js +1 -1
  64. package/lib/src/ap-field/number/read.vue2.js +1 -1
  65. package/lib/src/ap-field/radio/index.vue.js +1 -1
  66. package/lib/src/ap-field/radio/read.vue2.js +1 -1
  67. package/lib/src/ap-field/rate/index.vue.js +1 -1
  68. package/lib/src/ap-field/second/index.vue.js +1 -1
  69. package/lib/src/ap-field/second/read.vue2.js +1 -1
  70. package/lib/src/ap-field/segmented/index.vue.js +1 -1
  71. package/lib/src/ap-field/select/index.vue.js +1 -1
  72. package/lib/src/ap-field/select/read.vue2.js +1 -1
  73. package/lib/src/ap-field/slider/index.vue.js +1 -1
  74. package/lib/src/ap-field/switch/index.vue.js +1 -1
  75. package/lib/src/ap-field/switch/read.vue2.js +1 -1
  76. package/lib/src/ap-field/text/index.vue2.js +1 -1
  77. package/lib/src/ap-field/text/password.vue.d.ts +4 -4
  78. package/lib/src/ap-field/text/password.vue.js +1 -1
  79. package/lib/src/ap-field/text/read-password.vue2.js +1 -1
  80. package/lib/src/ap-field/text/read.vue2.js +1 -1
  81. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  82. package/lib/src/ap-field/text-area/read.vue2.js +1 -1
  83. package/lib/src/ap-field/tree-select/index.vue.js +1 -1
  84. package/lib/src/ap-field/tree-select/read.vue2.js +1 -1
  85. package/lib/src/ap-form/items/cascader/index.vue.d.ts +3 -1
  86. package/lib/src/ap-form/items/checkbox/index.vue.d.ts +3 -1
  87. package/lib/src/ap-form/items/date/index.vue.d.ts +3 -1
  88. package/lib/src/ap-form/items/date-range/index.vue.d.ts +3 -1
  89. package/lib/src/ap-form/items/number/index.vue.d.ts +3 -1
  90. package/lib/src/ap-form/items/select/index.vue.d.ts +3 -1
  91. package/lib/src/ap-form/items/switch/index.vue.d.ts +3 -1
  92. package/lib/src/ap-form/items/text/index.vue.d.ts +3 -1
  93. package/lib/src/ap-form/items/text/password.vue.d.ts +3 -1
  94. package/lib/src/ap-form/items/tree-select/index.vue.d.ts +3 -1
  95. package/lib/src/ap-table/constants.d.ts +11 -1
  96. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  97. package/lib/src/business/batch-input-group/index.vue.d.ts +2 -1
  98. package/lib/src/business/batch-input-group/index.vue.js +2 -2
  99. package/lib/src/version.d.ts +1 -1
  100. package/lib/src/version.js +1 -1
  101. package/package.json +3 -3
@@ -1,10 +1,10 @@
1
- import { defineComponent as S, useSlots as P, computed as s, createVNode as _, shallowRef as k, createBlock as d, openBlock as i, unref as u, mergeProps as T, createSlots as V, renderList as z, withCtx as U, renderSlot as F, normalizeProps as M, guardReactiveProps as $ } from "vue";
2
- import { Input as A } from "@aplus-frontend/antdv";
3
- import { omit as E } from "lodash-unified";
1
+ import { defineComponent as S, useSlots as P, computed as p, createVNode as V, shallowRef as _, createBlock as d, openBlock as i, unref as u, mergeProps as k, createSlots as M, renderList as T, withCtx as z, renderSlot as U, normalizeProps as F, guardReactiveProps as N } from "vue";
2
+ import { Input as $ } from "@aplus-frontend/antdv";
3
+ import { omit as A } from "lodash-unified";
4
4
  import "../../render/index.mjs";
5
5
  import "../../hooks/index.mjs";
6
- import { useDefaultPlaceholder as K } from "../hooks/use-default-placeholder.mjs";
7
- import { useControllableValue as N } from "../../hooks/useControllableValue.mjs";
6
+ import { useDefaultPlaceholder as E } from "../hooks/use-default-placeholder.mjs";
7
+ import { useControllableValue as K } from "../../hooks/useControllableValue.mjs";
8
8
  import j from "../../render/render.mjs";
9
9
  const W = /* @__PURE__ */ S({
10
10
  name: "ApFieldText",
@@ -18,6 +18,7 @@ const W = /* @__PURE__ */ S({
18
18
  emptyText: {
19
19
  default: "--"
20
20
  },
21
+ customReadMode: {},
21
22
  variant: {},
22
23
  size: {},
23
24
  value: {},
@@ -92,45 +93,48 @@ const W = /* @__PURE__ */ S({
92
93
  beforeInput: {}
93
94
  },
94
95
  emits: ["update:value"],
95
- setup(f, {
96
- expose: c,
96
+ setup(c, {
97
+ expose: f,
97
98
  emit: m
98
99
  }) {
99
- const r = P(), o = f, y = m, {
100
- value: p,
100
+ const r = P(), o = c, y = m, {
101
+ value: s,
101
102
  updateValue: v
102
- } = N(o, y), x = K("Text", o), h = s(() => E(o, ["mode", "emptyText", "value", "onUpdate:value", "beforeInput"])), B = () => _("span", null, [o.prefix || r.prefix?.(), p.value || o.emptyText, o.suffix || r.suffix?.()]), t = k(), I = (e) => {
103
- t.value?.focus(e);
103
+ } = K(o, y), x = E("Text", o), h = p(() => A(o, ["mode", "emptyText", "value", "onUpdate:value", "beforeInput"])), B = () => {
104
+ const e = s.value || o.emptyText, t = V("span", null, [o.prefix || r.prefix?.(), e, o.suffix || r.suffix?.()]);
105
+ return o.customReadMode?.(e, t) ?? t;
106
+ }, n = _(), g = (e) => {
107
+ n.value?.focus(e);
108
+ }, I = () => {
109
+ n.value?.blur();
110
+ }, R = (e, t, l) => {
111
+ n.value?.setSelectionRange(e, t, l);
104
112
  }, b = () => {
105
- t.value?.blur();
106
- }, g = (e, n, l) => {
107
- t.value?.setSelectionRange(e, n, l);
108
- }, C = () => {
109
- t.value?.select();
113
+ n.value?.select();
110
114
  };
111
- function R(e) {
112
- const n = e.target.value || "", l = o.beforeInput ? o.beforeInput?.(n) : n, a = t.value?.$el?.querySelector("input");
115
+ function C(e) {
116
+ const t = e.target.value || "", l = o.beforeInput ? o.beforeInput?.(t) : t, a = n.value?.$el?.querySelector("input");
113
117
  a && (a.value = l), v(l);
114
118
  }
115
- return c({
116
- focus: I,
117
- blur: b,
118
- setSelectionRange: g,
119
- select: C,
120
- input: s(() => t.value?.input)
121
- }), (e, n) => e.mode === "edit" ? (i(), d(u(A), T({
119
+ return f({
120
+ focus: g,
121
+ blur: I,
122
+ setSelectionRange: R,
123
+ select: b,
124
+ input: p(() => n.value?.input)
125
+ }), (e, t) => e.mode === "edit" ? (i(), d(u($), k({
122
126
  key: 0
123
127
  }, h.value, {
124
128
  ref_key: "inputRef",
125
- ref: t,
129
+ ref: n,
126
130
  placeholder: u(x),
127
- value: u(p),
128
- onInput: R
129
- }), V({
131
+ value: u(s),
132
+ onInput: C
133
+ }), M({
130
134
  _: 2
131
- }, [z(e.$slots, (l, a) => ({
135
+ }, [T(e.$slots, (l, a) => ({
132
136
  name: a,
133
- fn: U((w) => [F(e.$slots, a, M($(w || {})))])
137
+ fn: z((w) => [U(e.$slots, a, F(N(w || {})))])
134
138
  }))]), 1040, ["placeholder", "value"])) : (i(), d(u(j), {
135
139
  key: 1,
136
140
  node: B()
@@ -122,7 +122,7 @@ declare function __VLS_template(): {
122
122
  handleReset: PropType<MouseEventHandler>;
123
123
  addonBefore: VueTypeValidableDef<any>;
124
124
  addonAfter: VueTypeValidableDef<any>;
125
- prefix: VueTypeValidableDef<any>;
125
+ prefix: ** @type { [typeof __VLS_components.Flex, typeof __VLS_components.Flex, ] } */).VueTypeValidableDef<any>;
126
126
  suffix: VueTypeValidableDef<any>;
127
127
  clearIcon: VueTypeValidableDef<any>;
128
128
  allowClear: {
@@ -260,7 +260,7 @@ declare function __VLS_template(): {
260
260
  handleReset: PropType<MouseEventHandler>;
261
261
  addonBefore: VueTypeValidableDef<any>;
262
262
  addonAfter: VueTypeValidableDef<any>;
263
- prefix: VueTypeValidableDef<any>;
263
+ prefix: ** @type { [typeof __VLS_components.Flex, typeof __VLS_components.Flex, ] } */).VueTypeValidableDef<any>;
264
264
  suffix: VueTypeValidableDef<any>;
265
265
  clearIcon: VueTypeValidableDef<any>;
266
266
  allowClear: {
@@ -417,7 +417,7 @@ declare const __VLS_component: DefineComponent<ApFieldTextPasswordProps, {
417
417
  handleReset: PropType<MouseEventHandler>;
418
418
  addonBefore: VueTypeValidableDef<any>;
419
419
  addonAfter: VueTypeValidableDef<any>;
420
- prefix: VueTypeValidableDef<any>;
420
+ prefix: ** @type { [typeof __VLS_components.Flex, typeof __VLS_components.Flex, ] } */).VueTypeValidableDef<any>;
421
421
  suffix: VueTypeValidableDef<any>;
422
422
  clearIcon: VueTypeValidableDef<any>;
423
423
  allowClear: {
@@ -555,7 +555,7 @@ declare const __VLS_component: DefineComponent<ApFieldTextPasswordProps, {
555
555
  handleReset: PropType<MouseEventHandler>;
556
556
  addonBefore: VueTypeValidableDef<any>;
557
557
  addonAfter: VueTypeValidableDef<any>;
558
- prefix: VueTypeValidableDef<any>;
558
+ prefix: ** @type { [typeof __VLS_components.Flex, typeof __VLS_components.Flex, ] } */).VueTypeValidableDef<any>;
559
559
  suffix: VueTypeValidableDef<any>;
560
560
  clearIcon: VueTypeValidableDef<any>;
561
561
  allowClear: {
@@ -1,13 +1,16 @@
1
- import { defineComponent as U, useSlots as _, shallowRef as E, computed as R, createBlock as a, createElementBlock as f, openBlock as o, unref as e, mergeProps as T, createSlots as V, renderList as F, withCtx as c, renderSlot as I, normalizeProps as S, guardReactiveProps as z, Fragment as M, toDisplayString as m, createElementVNode as y } from "vue";
2
- import { EyeOutlined as O, EyeInvisibleOutlined as A } from "@ant-design/icons-vue";
3
- import { Input as D, Flex as K } from "@aplus-frontend/antdv";
4
- import { omit as N } from "lodash-unified";
1
+ import { defineComponent as R, useSlots as U, shallowRef as V, computed as _, createBlock as n, openBlock as t, unref as e, mergeProps as E, createSlots as T, renderList as I, withCtx as u, renderSlot as M, normalizeProps as S, guardReactiveProps as z, createElementBlock as F, createCommentVNode as N, createVNode as O, toDisplayString as f, createElementVNode as c } from "vue";
2
+ import { EyeOutlined as A, EyeInvisibleOutlined as D } from "@ant-design/icons-vue";
3
+ import { Input as K, Flex as $ } from "@aplus-frontend/antdv";
4
+ import { omit as j } from "lodash-unified";
5
+ import "../../render/index.mjs";
5
6
  import "../../hooks/index.mjs";
6
- import { useDefaultPlaceholder as $ } from "../hooks/use-default-placeholder.mjs";
7
+ import { useDefaultPlaceholder as L } from "../hooks/use-default-placeholder.mjs";
8
+ import { useReadModeRender as q } from "../hooks/use-read-mode-render.mjs";
7
9
  import { useControllableValue as v } from "../../hooks/useControllableValue.mjs";
8
- const j = {
10
+ import G from "../../render/render.mjs";
11
+ const H = {
9
12
  key: 0
10
- }, Z = /* @__PURE__ */ U({
13
+ }, re = /* @__PURE__ */ R({
11
14
  name: "ApFieldTextPassword",
12
15
  __name: "password",
13
16
  props: {
@@ -19,6 +22,7 @@ const j = {
19
22
  emptyText: {
20
23
  default: "--"
21
24
  },
25
+ customReadMode: {},
22
26
  variant: {},
23
27
  size: {},
24
28
  value: {},
@@ -105,62 +109,67 @@ const j = {
105
109
  "onUpdate:visible": {}
106
110
  },
107
111
  emits: ["update:value", "update:visible"],
108
- setup(b, {
109
- expose: B,
110
- emit: g
112
+ setup(y, {
113
+ expose: b,
114
+ emit: B
111
115
  }) {
112
- const h = _(), i = g, t = b, n = E(), {
113
- value: s,
114
- updateValue: x
115
- } = v(t, i), k = $("TextPassword", t), {
116
+ const h = U(), i = B, o = y, r = V(), {
116
117
  value: l,
117
- updateValue: r
118
- } = v(t, i, {
118
+ updateValue: x
119
+ } = v(o, i), {
120
+ renderer: g
121
+ } = q(o, l), C = L("TextPassword", o), {
122
+ value: a,
123
+ updateValue: d
124
+ } = v(o, i, {
119
125
  valuePropName: "visible"
120
- }), w = R(() => N(t, ["mode", "emptyText", "value", "onUpdate:value", "visible", "onUpdate:visible"]));
121
- return B({
126
+ }), k = _(() => j(o, ["mode", "emptyText", "value", "onUpdate:value", "visible", "onUpdate:visible"]));
127
+ return b({
122
128
  focus: () => {
123
- n.value?.focus();
129
+ r.value?.focus();
124
130
  },
125
131
  blur: () => {
126
- n.value?.blur();
132
+ r.value?.blur();
127
133
  }
128
- }), (u, p) => u.mode === "edit" ? (o(), a(e(D).Password, T({
134
+ }), (s, p) => s.mode === "edit" ? (t(), n(e(K).Password, E({
129
135
  key: 0
130
- }, w.value, {
136
+ }, k.value, {
131
137
  ref_key: "inputRef",
132
- ref: n,
133
- placeholder: e(k),
134
- value: e(s),
135
- visible: e(l),
138
+ ref: r,
139
+ placeholder: e(C),
140
+ value: e(l),
141
+ visible: e(a),
136
142
  "onUpdate:value": e(x),
137
- "onUpdate:visible": e(r)
138
- }), V({
143
+ "onUpdate:visible": e(d)
144
+ }), T({
139
145
  _: 2
140
- }, [F(h, (C, d) => ({
141
- name: d,
142
- fn: c((P) => [I(u.$slots, d, S(z(P || {})))])
143
- }))]), 1040, ["placeholder", "value", "visible", "onUpdate:value", "onUpdate:visible"])) : (o(), f(M, {
144
- key: 1
145
- }, [e(s) ? (o(), a(e(K), {
146
+ }, [I(h, (w, m) => ({
147
+ name: m,
148
+ fn: u((P) => [M(s.$slots, m, S(z(P || {})))])
149
+ }))]), 1040, ["placeholder", "value", "visible", "onUpdate:value", "onUpdate:visible"])) : (t(), n(e(G), {
146
150
  key: 1,
147
- gap: 8,
148
- align: "center"
151
+ renderer: e(g)
149
152
  }, {
150
- default: c(() => [y("span", null, m(e(l) ? e(s) : "********"), 1), y("span", {
151
- style: {
152
- cursor: "pointer"
153
- },
154
- onClick: p[0] || (p[0] = (C) => e(r)(!e(l)))
155
- }, [e(l) ? (o(), a(e(O), {
156
- key: 0
157
- })) : (o(), a(e(A), {
158
- key: 1
159
- }))])]),
153
+ default: u(() => [e(l) ? N("", !0) : (t(), F("span", H, f(s.emptyText), 1)), O(e($), {
154
+ gap: 8,
155
+ align: "center"
156
+ }, {
157
+ default: u(() => [c("span", null, f(e(a) ? e(l) : "********"), 1), c("span", {
158
+ style: {
159
+ cursor: "pointer"
160
+ },
161
+ onClick: p[0] || (p[0] = (w) => e(d)(!e(a)))
162
+ }, [e(a) ? (t(), n(e(A), {
163
+ key: 0
164
+ })) : (t(), n(e(D), {
165
+ key: 1
166
+ }))])]),
167
+ _: 1
168
+ })]),
160
169
  _: 1
161
- })) : (o(), f("span", j, m(u.emptyText), 1))], 64));
170
+ }, 8, ["renderer"]));
162
171
  }
163
172
  });
164
173
  export {
165
- Z as default
174
+ re as default
166
175
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as d, ref as p, createElementBlock as s, createBlock as a, openBlock as o, Fragment as f, createTextVNode as y, toDisplayString as u, unref as l, withCtx as c, createElementVNode as i } from "vue";
1
+ import { defineComponent as r, ref as s, createElementBlock as p, createBlock as a, openBlock as o, Fragment as f, createTextVNode as y, toDisplayString as u, unref as l, withCtx as c, createElementVNode as i } from "vue";
2
2
  import { EyeOutlined as m, EyeInvisibleOutlined as v } from "@ant-design/icons-vue";
3
3
  import { Space as B } from "@aplus-frontend/antdv";
4
- const k = /* @__PURE__ */ d({
4
+ const k = /* @__PURE__ */ r({
5
5
  name: "ApFieldTextPasswordRead",
6
6
  __name: "read-password",
7
7
  props: {
@@ -9,6 +9,7 @@ const k = /* @__PURE__ */ d({
9
9
  class: {},
10
10
  style: {},
11
11
  emptyText: { default: "--" },
12
+ customReadMode: {},
12
13
  variant: {},
13
14
  size: {},
14
15
  value: {},
@@ -60,8 +61,8 @@ const k = /* @__PURE__ */ d({
60
61
  visible: { type: Boolean, default: void 0 },
61
62
  "onUpdate:visible": {}
62
63
  },
63
- setup(r) {
64
- const e = p(r.visible);
64
+ setup(d) {
65
+ const e = s(d.visible);
65
66
  return (t, n) => t.value ? (o(), a(l(B), { key: 1 }, {
66
67
  default: c(() => [
67
68
  i("span", null, u(e.value ? t.value : "********"), 1),
@@ -73,7 +74,7 @@ const k = /* @__PURE__ */ d({
73
74
  ])
74
75
  ]),
75
76
  _: 1
76
- })) : (o(), s(f, { key: 0 }, [
77
+ })) : (o(), p(f, { key: 0 }, [
77
78
  y(u(t.emptyText), 1)
78
79
  ], 64));
79
80
  }
@@ -1,4 +1,4 @@
1
- import { defineComponent as a, createElementBlock as l, openBlock as p, toDisplayString as o } from "vue";
1
+ import { defineComponent as a, createElementBlock as l, openBlock as u, toDisplayString as o } from "vue";
2
2
  const r = /* @__PURE__ */ a({
3
3
  name: "ApFieldTextRead",
4
4
  __name: "read",
@@ -7,6 +7,7 @@ const r = /* @__PURE__ */ a({
7
7
  class: {},
8
8
  style: {},
9
9
  emptyText: { default: "--" },
10
+ customReadMode: {},
10
11
  variant: {},
11
12
  size: {},
12
13
  value: {},
@@ -56,7 +57,7 @@ const r = /* @__PURE__ */ a({
56
57
  },
57
58
  setup(t) {
58
59
  const e = t;
59
- return (n, u) => (p(), l("span", null, o(e.prefix) + " " + o(n.value || e.emptyText) + " " + o(e.suffix), 1));
60
+ return (n, d) => (u(), l("span", null, o(e.prefix) + " " + o(n.value || e.emptyText) + " " + o(e.suffix), 1));
60
61
  }
61
62
  });
62
63
  export {
@@ -1,14 +1,17 @@
1
- import { defineComponent as k, shallowRef as z, computed as s, createElementBlock as p, createBlock as T, openBlock as n, Fragment as w, normalizeClass as m, unref as e, toDisplayString as f, createElementVNode as R, mergeProps as F } from "vue";
2
- import { Input as S } from "@aplus-frontend/antdv";
3
- import { omit as V, isNil as E } from "lodash-unified";
1
+ import { defineComponent as w, shallowRef as z, computed as s, createBlock as c, openBlock as r, unref as e, withCtx as T, createElementBlock as m, normalizeClass as f, toDisplayString as y, createElementVNode as M, mergeProps as S } from "vue";
2
+ import { Input as V } from "@aplus-frontend/antdv";
3
+ import { omit as _, isNil as E } from "lodash-unified";
4
+ import "../../render/index.mjs";
4
5
  import "../../config-provider/index.mjs";
5
6
  import "../../hooks/index.mjs";
6
- import { useDefaultPlaceholder as P } from "../hooks/use-default-placeholder.mjs";
7
+ import { useDefaultPlaceholder as F } from "../hooks/use-default-placeholder.mjs";
8
+ import { useReadModeRender as P } from "../hooks/use-read-mode-render.mjs";
7
9
  import U from "../style/index.mjs";
8
- import { languageFormat as _ } from "./utils.mjs";
9
- import { useControllableValue as j } from "../../hooks/useControllableValue.mjs";
10
- import { useNamespace as M } from "../../config-provider/hooks/use-namespace.mjs";
11
- const Q = /* @__PURE__ */ k({
10
+ import { languageFormat as j } from "./utils.mjs";
11
+ import { useControllableValue as N } from "../../hooks/useControllableValue.mjs";
12
+ import { useNamespace as O } from "../../config-provider/hooks/use-namespace.mjs";
13
+ import D from "../../render/render.mjs";
14
+ const oe = /* @__PURE__ */ w({
12
15
  name: "ApFieldTextArea",
13
16
  __name: "index",
14
17
  props: {
@@ -16,6 +19,7 @@ const Q = /* @__PURE__ */ k({
16
19
  class: {},
17
20
  style: {},
18
21
  emptyText: { default: "--" },
22
+ customReadMode: {},
19
23
  rows: {},
20
24
  autoSize: { type: [Boolean, Object] },
21
25
  onResize: {},
@@ -64,10 +68,10 @@ const Q = /* @__PURE__ */ k({
64
68
  code: { type: [Boolean, Object], default: !1 }
65
69
  },
66
70
  emits: ["update:value"],
67
- setup(y, { expose: g, emit: v }) {
68
- const a = z(), o = y, x = s(
69
- () => V(o, ["onUpdate:value", "value", "beforeInput", "emptyText"])
70
- ), h = v, { value: l, updateValue: B } = j(o, h), { b, m: d } = M("field-textarea"), r = U("field"), I = P("TextArea", o), C = s(() => {
71
+ setup(g, { expose: v, emit: x }) {
72
+ const l = z(), o = g, h = s(
73
+ () => _(o, ["onUpdate:value", "value", "beforeInput", "emptyText"])
74
+ ), B = x, { value: a, updateValue: b } = N(o, B), { renderer: C } = P(o, a), { b: I, m: p } = O("field-textarea"), n = U("field"), R = F("TextArea", o), A = s(() => {
71
75
  if (o.code)
72
76
  return o.code === !0 ? {
73
77
  language: "text"
@@ -75,38 +79,44 @@ const Q = /* @__PURE__ */ k({
75
79
  language: o.code?.language ?? "text"
76
80
  };
77
81
  });
78
- function A(t) {
79
- const u = t.target.value || "", i = o.beforeInput ? o.beforeInput?.(u) : u, c = a.value?.$el?.querySelector("textarea");
80
- c && (c.value = i), B(i);
82
+ function k(t) {
83
+ const u = t.target.value || "", d = o.beforeInput ? o.beforeInput?.(u) : u, i = l.value?.$el?.querySelector("textarea");
84
+ i && (i.value = d), b(d);
81
85
  }
82
- return g({
86
+ return v({
83
87
  focus: (t) => {
84
- a.value?.focus(t);
88
+ l.value?.focus(t);
85
89
  },
86
90
  blur: () => {
87
- a.value?.blur();
91
+ l.value?.blur();
88
92
  },
89
- resizableTextArea: s(() => a.value?.resizableTextArea)
90
- }), (t, u) => t.mode === "read" ? (n(), p(w, { key: 0 }, [
91
- t.code ? (n(), p("pre", {
92
- key: 1,
93
- class: m([e(d)("code"), e(r)])
94
- }, [
95
- R("code", null, f(e(_)(e(l), C.value.language)), 1)
96
- ], 2)) : (n(), p("span", {
97
- key: 0,
98
- class: m([e(d)("read"), e(r)])
99
- }, f(e(E)(e(l)) || e(l) === "" ? t.emptyText : e(l)), 3))
100
- ], 64)) : (n(), T(e(S).TextArea, F({ key: 1 }, x.value, {
93
+ resizableTextArea: s(() => l.value?.resizableTextArea)
94
+ }), (t, u) => t.mode === "read" ? (r(), c(e(D), {
95
+ key: 0,
96
+ renderer: e(C)
97
+ }, {
98
+ default: T(() => [
99
+ t.code ? (r(), m("pre", {
100
+ key: 1,
101
+ class: f([e(p)("code"), e(n)])
102
+ }, [
103
+ M("code", null, y(e(j)(e(a), A.value.language)), 1)
104
+ ], 2)) : (r(), m("span", {
105
+ key: 0,
106
+ class: f([e(p)("read"), e(n)])
107
+ }, y(e(E)(e(a)) || e(a) === "" ? t.emptyText : e(a)), 3))
108
+ ]),
109
+ _: 1
110
+ }, 8, ["renderer"])) : (r(), c(e(V).TextArea, S({ key: 1 }, h.value, {
101
111
  ref_key: "textAreaRef",
102
- ref: a,
103
- placeholder: e(I),
104
- value: e(l),
105
- class: [e(b)(), e(r)],
106
- onInput: A
112
+ ref: l,
113
+ placeholder: e(R),
114
+ value: e(a),
115
+ class: [e(I)(), e(n)],
116
+ onInput: k
107
117
  }), null, 16, ["placeholder", "value", "class"]));
108
118
  }
109
119
  });
110
120
  export {
111
- Q as default
121
+ oe as default
112
122
  };
@@ -19,6 +19,7 @@ const h = {
19
19
  class: {},
20
20
  style: {},
21
21
  emptyText: { default: "--" },
22
+ customReadMode: {},
22
23
  rows: {},
23
24
  autoSize: { type: [Boolean, Object] },
24
25
  onResize: {},
@@ -1,4 +1,4 @@
1
- import { isVNode as _, defineComponent as E, computed as g, useSlots as K, shallowRef as U, unref as e, createVNode as r, Fragment as v, createBlock as S, openBlock as w, resolveDynamicComponent as z, mergeProps as M, createSlots as j, renderList as q, withCtx as B, renderSlot as O, normalizeProps as $, guardReactiveProps as H } from "vue";
1
+ import { isVNode as _, defineComponent as E, computed as g, useSlots as K, shallowRef as M, unref as e, createVNode as r, Fragment as v, createBlock as S, openBlock as w, resolveDynamicComponent as U, mergeProps as z, createSlots as j, renderList as q, withCtx as B, renderSlot as O, normalizeProps as $, guardReactiveProps as H } from "vue";
2
2
  import { Space as W, Tag as G, TreeSelect as J, Spin as Q } from "@aplus-frontend/antdv";
3
3
  import { omit as X, isArray as Y } from "lodash-unified";
4
4
  import "../../hooks/index.mjs";
@@ -20,6 +20,7 @@ const pe = /* @__PURE__ */ E({
20
20
  emptyText: {
21
21
  default: "--"
22
22
  },
23
+ customReadMode: {},
23
24
  suffixIcon: {},
24
25
  size: {},
25
26
  bordered: {
@@ -178,7 +179,7 @@ const pe = /* @__PURE__ */ E({
178
179
  expose: x,
179
180
  emit: N
180
181
  }) {
181
- const n = d, T = g(() => X(n, ["onUpdate:value", "value", "treeData", "loadData"])), b = K(), D = N, p = U(), {
182
+ const n = d, T = g(() => X(n, ["onUpdate:value", "value", "treeData", "loadData"])), b = K(), D = N, p = M(), {
182
183
  value: c,
183
184
  updateValue: V
184
185
  } = te(n, D), k = Z("TreeSelect", n), {
@@ -211,10 +212,10 @@ const pe = /* @__PURE__ */ E({
211
212
  default: () => [t]
212
213
  }) : r(v, null, [n.emptyText]);
213
214
  });
214
- function I() {
215
+ function R() {
215
216
  p.value?.focus?.();
216
217
  }
217
- function R() {
218
+ function I() {
218
219
  p.value?.blur?.();
219
220
  }
220
221
  function L(t) {
@@ -222,11 +223,11 @@ const pe = /* @__PURE__ */ E({
222
223
  }
223
224
  return x({
224
225
  request: y,
225
- focus: I,
226
- blur: R
227
- }), (t, u) => t.mode === "read" ? (w(), S(z(P.value), {
226
+ focus: R,
227
+ blur: I
228
+ }), (t, u) => t.mode === "read" ? (w(), S(U(P.value), {
228
229
  key: 0
229
- })) : (w(), S(e(J), M({
230
+ })) : (w(), S(e(J), z({
230
231
  key: 1
231
232
  }, T.value, {
232
233
  ref_key: "treeSelectRef",
@@ -16,6 +16,7 @@ const I = /* @__PURE__ */ g({
16
16
  emptyText: {
17
17
  default: "--"
18
18
  },
19
+ customReadMode: {},
19
20
  suffixIcon: {},
20
21
  size: {},
21
22
  bordered: {
@@ -1,7 +1,7 @@
1
1
  import { DefaultOptionType } from '@aplus-frontend/antdv/es/cascader/interface';
2
2
  import { ApFormItemSlots } from '../../interface';
3
3
  import { ApFormItemCascaderProps } from '../interface';
4
- import { ComponentInternalInstance, CSSProperties, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ComponentOptionsMixin, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent, PublicProps } from 'vue';
4
+ import { ComponentInternalInstance, VNode, CSSProperties, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ComponentOptionsMixin, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent, PublicProps } from 'vue';
5
5
  import { FieldMode, ApFieldCascaderProps } from '../../../ap-field';
6
6
  import { ButtonSize } from '@aplus-frontend/antdv/es/button';
7
7
  import { ValueType, ShowCheckedStrategy } from '@aplus-frontend/antdv/es/vc-cascader/Cascader';
@@ -48,6 +48,7 @@ declare function __VLS_template(): {
48
48
  readonly class?: unknown;
49
49
  readonly style?: unknown;
50
50
  readonly emptyText?: string | undefined;
51
+ readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
51
52
  readonly size?: ButtonSize;
52
53
  readonly onBlur?: ((e: FocusEvent) => void) | undefined;
53
54
  readonly onChange?: ((value: ValueType, selectOptions: DefaultOptionType[] | DefaultOptionType[][]) => void) | undefined;
@@ -249,6 +250,7 @@ declare const __VLS_component: DefineComponent<ApFormItemCascaderProps, {
249
250
  readonly class?: unknown;
250
251
  readonly style?: unknown;
251
252
  readonly emptyText?: string | undefined;
253
+ readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
252
254
  readonly size?: ButtonSize;
253
255
  readonly onBlur?: ((e: FocusEvent) => void) | undefined;
254
256
  readonly onChange?: ((value: ValueType, selectOptions: DefaultOptionType[] | DefaultOptionType[][]) => void) | undefined;
@@ -1,6 +1,6 @@
1
1
  import { ApFormItemSlots } from '../../interface';
2
2
  import { ApFormItemCheckboxProps } from '../interface';
3
- import { ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ComponentOptionsMixin, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent, PublicProps } from 'vue';
3
+ import { ComponentInternalInstance, VNode, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ComponentOptionsMixin, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent, PublicProps } from 'vue';
4
4
  import { FieldMode, ApFieldCheckboxProps } from '../../..';
5
5
  import { CheckboxValueType } from '@aplus-frontend/antdv/es/checkbox/interface';
6
6
  import { CheckboxOptionType, CheckboxGroupProps } from '@aplus-frontend/antdv';
@@ -18,6 +18,7 @@ declare function __VLS_template(): {
18
18
  readonly class?: unknown;
19
19
  readonly style?: unknown;
20
20
  readonly emptyText?: string | undefined;
21
+ readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
21
22
  readonly onChange?: ((checkedValue: Array< CheckboxValueType>) => void) | undefined;
22
23
  readonly value?: CheckboxValueType[] | undefined;
23
24
  readonly disabled?: boolean | undefined;
@@ -116,6 +117,7 @@ declare const __VLS_component: DefineComponent<ApFormItemCheckboxProps, {
116
117
  readonly class?: unknown;
117
118
  readonly style?: unknown;
118
119
  readonly emptyText?: string | undefined;
120
+ readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
119
121
  readonly onChange?: ((checkedValue: Array< CheckboxValueType>) => void) | undefined;
120
122
  readonly value?: CheckboxValueType[] | undefined;
121
123
  readonly disabled?: boolean | undefined;
@@ -1,6 +1,6 @@
1
1
  import { ApFormItemSlots } from '../../interface';
2
2
  import { ApFormItemDateProps } from '../interface';
3
- import { ComponentInternalInstance, CSSProperties, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, VNode, RendererNode, RendererElement, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent } from 'vue';
3
+ import { ComponentInternalInstance, VNode, CSSProperties, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, RendererNode, RendererElement, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent } from 'vue';
4
4
  import { FieldMode, ApFieldDateProps } from '../../../ap-field';
5
5
  import { ButtonSize, SizeType } from '@aplus-frontend/antdv/es/button';
6
6
  import { FocusEventHandler, MouseEventHandler } from '@aplus-frontend/antdv/es/_util/EventInterface';
@@ -53,6 +53,7 @@ declare function __VLS_template(): {
53
53
  readonly class?: unknown;
54
54
  readonly style?: unknown;
55
55
  readonly emptyText?: string | undefined;
56
+ readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
56
57
  readonly size?: ButtonSize;
57
58
  readonly onBlur?: FocusEventHandler | undefined;
58
59
  readonly onClick?: MouseEventHandler | undefined;
@@ -805,6 +806,7 @@ declare const __VLS_component: DefineComponent<ApFormItemDateProps, {
805
806
  readonly class?: unknown;
806
807
  readonly style?: unknown;
807
808
  readonly emptyText?: string | undefined;
809
+ readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
808
810
  readonly size?: ButtonSize;
809
811
  readonly onBlur?: FocusEventHandler | undefined;
810
812
  readonly onClick?: MouseEventHandler | undefined;
@@ -1,6 +1,6 @@
1
1
  import { ApFormItemSlots } from '../../interface';
2
2
  import { ApFormItemDateRangeProps } from '../interface';
3
- import { ComponentInternalInstance, CSSProperties, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, VNode, RendererNode, RendererElement, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent } from 'vue';
3
+ import { ComponentInternalInstance, VNode, CSSProperties, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, RendererNode, RendererElement, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent } from 'vue';
4
4
  import { FieldMode, ApFieldDateRangeProps } from '../../..';
5
5
  import { ButtonSize, SizeType } from '@aplus-frontend/antdv/es/button';
6
6
  import { FocusEventHandler, MouseEventHandler } from '@aplus-frontend/antdv/es/_util/EventInterface';
@@ -51,6 +51,7 @@ declare function __VLS_template(): {
51
51
  readonly class?: unknown;
52
52
  readonly style?: unknown;
53
53
  readonly emptyText?: string | undefined;
54
+ readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
54
55
  readonly size?: ButtonSize;
55
56
  readonly onBlur?: FocusEventHandler | undefined;
56
57
  readonly onClick?: MouseEventHandler | undefined;
@@ -858,6 +859,7 @@ declare const __VLS_component: DefineComponent<ApFormItemDateRangeProps, {
858
859
  readonly class?: unknown;
859
860
  readonly style?: unknown;
860
861
  readonly emptyText?: string | undefined;
862
+ readonly customReadMode?: ((originalNode: any, val?: any) => VNode) | undefined;
861
863
  readonly size?: ButtonSize;
862
864
  readonly onBlur?: FocusEventHandler | undefined;
863
865
  readonly onClick?: MouseEventHandler | undefined;