@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.
- package/es/src/ag-grid/hooks/use-editable-form-item-api.mjs +1 -1
- package/es/src/ap-field/cascader/index.vue.mjs +9 -8
- package/es/src/ap-field/cascader/read.vue2.mjs +3 -2
- package/es/src/ap-field/checkbox/index.vue.mjs +12 -11
- package/es/src/ap-field/checkbox/read.vue2.mjs +5 -4
- package/es/src/ap-field/date/index.vue.mjs +83 -73
- package/es/src/ap-field/date/read.vue2.mjs +1 -0
- package/es/src/ap-field/date-range/index.vue.mjs +80 -70
- package/es/src/ap-field/date-range/read.vue2.mjs +3 -2
- package/es/src/ap-field/hooks/use-read-mode-render.d.ts +9 -0
- package/es/src/ap-field/hooks/use-read-mode-render.mjs +6 -0
- package/es/src/ap-field/interface.d.ts +8 -0
- package/es/src/ap-field/number/index.vue.mjs +57 -46
- package/es/src/ap-field/number/read.vue2.mjs +1 -0
- package/es/src/ap-field/radio/index.vue.mjs +17 -16
- package/es/src/ap-field/radio/read.vue2.mjs +1 -0
- package/es/src/ap-field/rate/index.vue.mjs +6 -5
- package/es/src/ap-field/second/index.vue.mjs +35 -20
- package/es/src/ap-field/second/read.vue2.mjs +1 -0
- package/es/src/ap-field/segmented/index.vue.mjs +15 -14
- package/es/src/ap-field/select/index.vue.mjs +53 -52
- package/es/src/ap-field/select/read.vue2.mjs +1 -0
- package/es/src/ap-field/slider/index.vue.mjs +11 -10
- package/es/src/ap-field/switch/index.vue.mjs +20 -19
- package/es/src/ap-field/switch/read.vue2.mjs +5 -4
- package/es/src/ap-field/text/index.vue2.mjs +35 -31
- package/es/src/ap-field/text/password.vue.d.ts +4 -4
- package/es/src/ap-field/text/password.vue.mjs +57 -48
- package/es/src/ap-field/text/read-password.vue2.mjs +6 -5
- package/es/src/ap-field/text/read.vue2.mjs +3 -2
- package/es/src/ap-field/text-area/index.vue.mjs +46 -36
- package/es/src/ap-field/text-area/read.vue2.mjs +1 -0
- package/es/src/ap-field/tree-select/index.vue.mjs +9 -8
- package/es/src/ap-field/tree-select/read.vue2.mjs +1 -0
- package/es/src/ap-form/items/cascader/index.vue.d.ts +3 -1
- package/es/src/ap-form/items/checkbox/index.vue.d.ts +3 -1
- package/es/src/ap-form/items/date/index.vue.d.ts +3 -1
- package/es/src/ap-form/items/date-range/index.vue.d.ts +3 -1
- package/es/src/ap-form/items/number/index.vue.d.ts +3 -1
- package/es/src/ap-form/items/select/index.vue.d.ts +3 -1
- package/es/src/ap-form/items/switch/index.vue.d.ts +3 -1
- package/es/src/ap-form/items/text/index.vue.d.ts +3 -1
- package/es/src/ap-form/items/text/password.vue.d.ts +3 -1
- package/es/src/ap-form/items/tree-select/index.vue.d.ts +3 -1
- package/es/src/ap-table/constants.d.ts +11 -1
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +109 -98
- package/es/src/business/batch-input-group/index.vue.d.ts +2 -1
- package/es/src/business/batch-input-group/index.vue.mjs +11 -10
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/hooks/use-editable-form-item-api.js +1 -1
- package/lib/src/ap-field/cascader/index.vue.js +1 -1
- package/lib/src/ap-field/cascader/read.vue2.js +1 -1
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/checkbox/read.vue2.js +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date/read.vue2.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/read.vue2.js +1 -1
- package/lib/src/ap-field/hooks/use-read-mode-render.d.ts +9 -0
- package/lib/src/ap-field/hooks/use-read-mode-render.js +1 -0
- package/lib/src/ap-field/interface.d.ts +8 -0
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-field/number/read.vue2.js +1 -1
- package/lib/src/ap-field/radio/index.vue.js +1 -1
- package/lib/src/ap-field/radio/read.vue2.js +1 -1
- package/lib/src/ap-field/rate/index.vue.js +1 -1
- package/lib/src/ap-field/second/index.vue.js +1 -1
- package/lib/src/ap-field/second/read.vue2.js +1 -1
- package/lib/src/ap-field/segmented/index.vue.js +1 -1
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/select/read.vue2.js +1 -1
- package/lib/src/ap-field/slider/index.vue.js +1 -1
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-field/switch/read.vue2.js +1 -1
- package/lib/src/ap-field/text/index.vue2.js +1 -1
- package/lib/src/ap-field/text/password.vue.d.ts +4 -4
- package/lib/src/ap-field/text/password.vue.js +1 -1
- package/lib/src/ap-field/text/read-password.vue2.js +1 -1
- package/lib/src/ap-field/text/read.vue2.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-field/text-area/read.vue2.js +1 -1
- package/lib/src/ap-field/tree-select/index.vue.js +1 -1
- package/lib/src/ap-field/tree-select/read.vue2.js +1 -1
- package/lib/src/ap-form/items/cascader/index.vue.d.ts +3 -1
- package/lib/src/ap-form/items/checkbox/index.vue.d.ts +3 -1
- package/lib/src/ap-form/items/date/index.vue.d.ts +3 -1
- package/lib/src/ap-form/items/date-range/index.vue.d.ts +3 -1
- package/lib/src/ap-form/items/number/index.vue.d.ts +3 -1
- package/lib/src/ap-form/items/select/index.vue.d.ts +3 -1
- package/lib/src/ap-form/items/switch/index.vue.d.ts +3 -1
- package/lib/src/ap-form/items/text/index.vue.d.ts +3 -1
- package/lib/src/ap-form/items/text/password.vue.d.ts +3 -1
- package/lib/src/ap-form/items/tree-select/index.vue.d.ts +3 -1
- package/lib/src/ap-table/constants.d.ts +11 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/business/batch-input-group/index.vue.d.ts +2 -1
- package/lib/src/business/batch-input-group/index.vue.js +2 -2
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as S, useSlots as P, computed as
|
|
2
|
-
import { Input as
|
|
3
|
-
import { omit as
|
|
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
|
|
7
|
-
import { useControllableValue as
|
|
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(
|
|
96
|
-
expose:
|
|
96
|
+
setup(c, {
|
|
97
|
+
expose: f,
|
|
97
98
|
emit: m
|
|
98
99
|
}) {
|
|
99
|
-
const r = P(), o =
|
|
100
|
-
value:
|
|
100
|
+
const r = P(), o = c, y = m, {
|
|
101
|
+
value: s,
|
|
101
102
|
updateValue: v
|
|
102
|
-
} =
|
|
103
|
-
t.
|
|
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
|
-
|
|
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
|
|
112
|
-
const
|
|
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
|
|
116
|
-
focus:
|
|
117
|
-
blur:
|
|
118
|
-
setSelectionRange:
|
|
119
|
-
select:
|
|
120
|
-
input:
|
|
121
|
-
}), (e,
|
|
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:
|
|
129
|
+
ref: n,
|
|
126
130
|
placeholder: u(x),
|
|
127
|
-
value: u(
|
|
128
|
-
onInput:
|
|
129
|
-
}),
|
|
131
|
+
value: u(s),
|
|
132
|
+
onInput: C
|
|
133
|
+
}), M({
|
|
130
134
|
_: 2
|
|
131
|
-
}, [
|
|
135
|
+
}, [T(e.$slots, (l, a) => ({
|
|
132
136
|
name: a,
|
|
133
|
-
fn:
|
|
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
|
|
2
|
-
import { EyeOutlined as
|
|
3
|
-
import { Input as
|
|
4
|
-
import { omit as
|
|
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
|
|
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
|
-
|
|
10
|
+
import G from "../../render/render.mjs";
|
|
11
|
+
const H = {
|
|
9
12
|
key: 0
|
|
10
|
-
},
|
|
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(
|
|
109
|
-
expose:
|
|
110
|
-
emit:
|
|
112
|
+
setup(y, {
|
|
113
|
+
expose: b,
|
|
114
|
+
emit: B
|
|
111
115
|
}) {
|
|
112
|
-
const h =
|
|
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:
|
|
118
|
-
} = v(
|
|
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
|
-
}),
|
|
121
|
-
return
|
|
126
|
+
}), k = _(() => j(o, ["mode", "emptyText", "value", "onUpdate:value", "visible", "onUpdate:visible"]));
|
|
127
|
+
return b({
|
|
122
128
|
focus: () => {
|
|
123
|
-
|
|
129
|
+
r.value?.focus();
|
|
124
130
|
},
|
|
125
131
|
blur: () => {
|
|
126
|
-
|
|
132
|
+
r.value?.blur();
|
|
127
133
|
}
|
|
128
|
-
}), (
|
|
134
|
+
}), (s, p) => s.mode === "edit" ? (t(), n(e(K).Password, E({
|
|
129
135
|
key: 0
|
|
130
|
-
},
|
|
136
|
+
}, k.value, {
|
|
131
137
|
ref_key: "inputRef",
|
|
132
|
-
ref:
|
|
133
|
-
placeholder: e(
|
|
134
|
-
value: e(
|
|
135
|
-
visible: e(
|
|
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(
|
|
138
|
-
}),
|
|
143
|
+
"onUpdate:visible": e(d)
|
|
144
|
+
}), T({
|
|
139
145
|
_: 2
|
|
140
|
-
}, [
|
|
141
|
-
name:
|
|
142
|
-
fn:
|
|
143
|
-
}))]), 1040, ["placeholder", "value", "visible", "onUpdate:value", "onUpdate:visible"])) : (
|
|
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
|
-
|
|
148
|
-
align: "center"
|
|
151
|
+
renderer: e(g)
|
|
149
152
|
}, {
|
|
150
|
-
default:
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
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
|
-
}
|
|
170
|
+
}, 8, ["renderer"]));
|
|
162
171
|
}
|
|
163
172
|
});
|
|
164
173
|
export {
|
|
165
|
-
|
|
174
|
+
re as default
|
|
166
175
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
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__ */
|
|
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(
|
|
64
|
-
const e =
|
|
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(),
|
|
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
|
|
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,
|
|
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
|
|
2
|
-
import { Input as
|
|
3
|
-
import { omit as
|
|
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
|
|
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
|
|
9
|
-
import { useControllableValue as
|
|
10
|
-
import { useNamespace as
|
|
11
|
-
|
|
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(
|
|
68
|
-
const
|
|
69
|
-
() =>
|
|
70
|
-
),
|
|
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
|
|
79
|
-
const u = t.target.value || "",
|
|
80
|
-
|
|
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
|
|
86
|
+
return v({
|
|
83
87
|
focus: (t) => {
|
|
84
|
-
|
|
88
|
+
l.value?.focus(t);
|
|
85
89
|
},
|
|
86
90
|
blur: () => {
|
|
87
|
-
|
|
91
|
+
l.value?.blur();
|
|
88
92
|
},
|
|
89
|
-
resizableTextArea: s(() =>
|
|
90
|
-
}), (t, u) => t.mode === "read" ? (
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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:
|
|
103
|
-
placeholder: e(
|
|
104
|
-
value: e(
|
|
105
|
-
class: [e(
|
|
106
|
-
onInput:
|
|
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
|
-
|
|
121
|
+
oe as default
|
|
112
122
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isVNode as _, defineComponent as E, computed as g, useSlots as K, shallowRef as
|
|
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 =
|
|
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
|
|
215
|
+
function R() {
|
|
215
216
|
p.value?.focus?.();
|
|
216
217
|
}
|
|
217
|
-
function
|
|
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:
|
|
226
|
-
blur:
|
|
227
|
-
}), (t, u) => t.mode === "read" ? (w(), S(
|
|
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),
|
|
230
|
+
})) : (w(), S(e(J), z({
|
|
230
231
|
key: 1
|
|
231
232
|
}, T.value, {
|
|
232
233
|
ref_key: "treeSelectRef",
|
|
@@ -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,
|
|
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,
|
|
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;
|