adverich-kun-ui 0.1.421 → 0.1.423
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/dist/components/KunAutocomplete/src/composables/useAutocomplete.js +1 -1
- package/dist/components/KunDialog/src/components/KunDialogContent.vue.js +17 -14
- package/dist/components/KunTextField/src/components/KunTextField.vue.js +1 -1
- package/dist/components/KunTextField/src/composables/useKunTextFieldComposable.js +2 -2
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref as o, computed as M, watch as H, nextTick as F } from "vue";
|
|
2
2
|
import { isArray as x, isObject as O, fullCopy as L } from "../../../../utils/utils.js";
|
|
3
3
|
function U(n, h, i, s) {
|
|
4
|
-
const l = o(null), d = o(null), y = o(null), f = o(!1), v = o(""), N = (e, t) => t.split(".").reduce((u, r) => u && u[r] !== void 0 ? u[r] : null, e), B = M(() => l.value ? x(l.value) ? l.value.length ? j(l.value, n.itemTitle, "hasDefault") : n.placeholderText : O(l.value) ? j(l.value, n.itemTitle, "hasDefault") : l.value.toString() : s.value.length ? n.placeholderText : n.textNoItems), R = M(() => n.itemText.includes(",") ? n.itemText.split(",") : n.itemText);
|
|
4
|
+
const l = o(null), d = o(null), y = o(null), f = o(!1), v = o(""), N = (e, t) => t.split(".").reduce((u, r) => u && u[r] !== void 0 ? u[r] : null, e), B = M(() => l.value !== null && l.value !== void 0 ? x(l.value) ? l.value.length ? j(l.value, n.itemTitle, "hasDefault") : n.placeholderText : O(l.value) ? j(l.value, n.itemTitle, "hasDefault") : l.value.toString() : s.value.length ? n.placeholderText : n.textNoItems), R = M(() => n.itemText.includes(",") ? n.itemText.split(",") : n.itemText);
|
|
5
5
|
function j(e, t, u) {
|
|
6
6
|
var r;
|
|
7
7
|
if (O(e)) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed as
|
|
1
|
+
import { computed as t, createElementBlock as a, openBlock as i, normalizeClass as c, renderSlot as d } from "vue";
|
|
2
2
|
const u = {
|
|
3
3
|
__name: "KunDialogContent",
|
|
4
4
|
props: {
|
|
@@ -12,19 +12,22 @@ const u = {
|
|
|
12
12
|
height: String,
|
|
13
13
|
maxHeight: String
|
|
14
14
|
},
|
|
15
|
-
setup(
|
|
16
|
-
const e =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
15
|
+
setup(s) {
|
|
16
|
+
const e = s, n = t(() => e.fullscreen ? `fixed inset-0 w-screen h-screen rounded-none shadow-none overflow-visible ${e.scrollable ? "overflow-y-auto" : "overflow-visible"}` : `relative rounded-xl shadow-xl transition-all ${e.scrollable ? "overflow-y-auto" : "overflow-visible"}`), r = t(() => {
|
|
17
|
+
var o, l;
|
|
18
|
+
return [
|
|
19
|
+
n.value,
|
|
20
|
+
...((o = e.bgColor) == null ? void 0 : o.split(" ")) || [],
|
|
21
|
+
...((l = e.contentClass) == null ? void 0 : l.split(" ")) || [],
|
|
22
|
+
e.minWidth,
|
|
23
|
+
e.width,
|
|
24
|
+
e.maxWidth,
|
|
25
|
+
e.height,
|
|
26
|
+
e.maxHeight
|
|
27
|
+
];
|
|
28
|
+
});
|
|
29
|
+
return (o, l) => (i(), a("div", {
|
|
30
|
+
class: c(r.value)
|
|
28
31
|
}, [
|
|
29
32
|
d(o.$slots, "default")
|
|
30
33
|
], 2));
|
|
@@ -59,7 +59,7 @@ const Y = {
|
|
|
59
59
|
return (e = c.value) == null ? void 0 : e.focus();
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
|
-
const m = `input-${U().uid}`, T = d(() => b.value ||
|
|
62
|
+
const m = `input-${U().uid}`, T = d(() => b.value || f.value !== "" || a.dirty), x = H(), N = d(() => !!x["prepend-inner"]), O = d(() => !!x["append-inner"]), v = q(!1), z = d(() => v.value ? P.eyeOffOutline : P.eyeOutline);
|
|
63
63
|
function A() {
|
|
64
64
|
v.value = !v.value;
|
|
65
65
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref as a, inject as V, computed as E, watch as F, onUnmounted as T } from "vue";
|
|
2
2
|
import { debounce as j } from "../../../../utils/utils.js";
|
|
3
3
|
function R(u, r) {
|
|
4
|
-
const l = a(u.modelValue), o = a(!1), t = a(""), n = a(!1), g = a(null), h = a(null), s = a(!1), d = V("registerField", null), v = V("unregisterField", null), y = E(() => u.error || !!t.value && n.value), c = async () => {
|
|
4
|
+
const l = a(u.modelValue ?? ""), o = a(!1), t = a(""), n = a(!1), g = a(null), h = a(null), s = a(!1), d = V("registerField", null), v = V("unregisterField", null), y = E(() => u.error || !!t.value && n.value), c = async () => {
|
|
5
5
|
for (const e of u.rules) {
|
|
6
6
|
const m = await Promise.resolve(e(l.value));
|
|
7
7
|
if (m !== !0) return m;
|
|
@@ -12,7 +12,7 @@ function R(u, r) {
|
|
|
12
12
|
t.value = e === !0 ? "" : e;
|
|
13
13
|
}, u.debounce ?? 300);
|
|
14
14
|
F(() => u.modelValue, (e) => {
|
|
15
|
-
e !== l.value && (s.value = !0, l.value = e);
|
|
15
|
+
e !== l.value && (s.value = !0, l.value = e ?? "");
|
|
16
16
|
}), F(l, () => {
|
|
17
17
|
if (s.value) {
|
|
18
18
|
s.value = !1;
|