savor-ui 0.23.0 → 0.23.1
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/CHANGELOG.md +9 -0
- package/dist/es/components/src/form/form-item.vue.mjs +62 -61
- package/dist/es/components/src/icon-select/icon-select.vue.mjs +66 -66
- package/dist/es/components/src/message/message.vue.mjs +33 -33
- package/dist/es/theme/components/form.scss +4 -1
- package/dist/es/theme/components/icon-select.scss +3 -0
- package/dist/json/web-types.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
## [0.23.1](https://gitee.com/mach552/savor-ui/compare/v0.23.0...v0.23.1) (2026-08-19)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **form:** 恢复必填星号为图标 ([f0bda18](https://gitee.com/mach552/savor-ui/commits/f0bda1848a5f6e52cfc2747dcc36b16b04dd00ac))
|
|
11
|
+
* **icon-select:** 修复搜索框无法输入的问题 ([69de908](https://gitee.com/mach552/savor-ui/commits/69de908dd8d165a27abeec04134b0ab76a738fb5))
|
|
12
|
+
* **message:** 修复图标失效问题 ([567bb51](https://gitee.com/mach552/savor-ui/commits/567bb51daadb3c6302d0592bab5b867a0c170a1e))
|
|
13
|
+
|
|
5
14
|
# [0.23.0](https://gitee.com/mach552/savor-ui/compare/v0.22.0...v0.23.0) (2026-08-18)
|
|
6
15
|
|
|
7
16
|
|
|
@@ -2,13 +2,14 @@ import { getSize as e } from "../../../utils/src/tool.mjs";
|
|
|
2
2
|
import "../../../utils/index.mjs";
|
|
3
3
|
import { useNamespace as t } from "../../../hooks/src/use-namespace.mjs";
|
|
4
4
|
import "../../../hooks/index.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import E from "
|
|
5
|
+
import { AsteriskLine as n } from "../../../icons/src/svg/editor/index.mjs";
|
|
6
|
+
import { QuestionLine as r } from "../../../icons/src/svg/system/index.mjs";
|
|
7
|
+
import { formContextKey as i, formItemContextKey as a, formItemStatusContextKey as o } from "./types.mjs";
|
|
8
|
+
import { STooltip as s } from "../tooltip/index.mjs";
|
|
9
|
+
import { child as c, computed as l, createComponent as u, createIf as d, createSlot as f, defineVaporComponent as p, inject as m, onMounted as h, onUnmounted as g, provide as _, ref as v, renderEffect as y, setClass as b, setInsertionState as x, setStyle as S, setText as C, template as w, toDisplayString as T, txt as E, unref as D } from "vue";
|
|
10
|
+
import O from "async-validator";
|
|
10
11
|
//#region ../components/src/form/form-item.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
11
|
-
var
|
|
12
|
+
var k = w("<span>"), A = w(" "), j = w("<div><label>"), M = w("<div> "), N = w("<div><div><div></div>", 1), P = /*@__PURE__*/ p({
|
|
12
13
|
name: "SFormItem",
|
|
13
14
|
__name: "form-item",
|
|
14
15
|
props: {
|
|
@@ -25,25 +26,25 @@ var D = S("<span>*"), O = S(" "), k = S("<span>"), A = S("<div><label>"), j = S(
|
|
|
25
26
|
},
|
|
26
27
|
requiredAlign: {}
|
|
27
28
|
},
|
|
28
|
-
setup(
|
|
29
|
-
let
|
|
30
|
-
let e =
|
|
31
|
-
return e &&
|
|
32
|
-
}), V =
|
|
33
|
-
let e =
|
|
34
|
-
return e &&
|
|
35
|
-
}), H =
|
|
29
|
+
setup(p, { expose: w }) {
|
|
30
|
+
let P = p, F = t("form-item"), I = m(i), L = l(() => P.labelPosition ? P.labelPosition : I?.labelPosition?.value ? I?.labelPosition?.value : "left"), ee = l(() => I?.labelPosition?.value === "top" ? "" : P.labelWidth || I?.labelWidth?.value), R = l(() => P.labelAlign ? P.labelAlign : I?.labelAlign?.value ? I?.labelAlign?.value : I?.labelPosition?.value === "top" ? "left" : "right"), z = null, B = l(() => {
|
|
31
|
+
let e = I?.model?.value;
|
|
32
|
+
return e && P.field && e[P.field] !== void 0 ? e[P.field] : null;
|
|
33
|
+
}), V = l(() => {
|
|
34
|
+
let e = I?.rules?.value;
|
|
35
|
+
return e && P.field && e[P.field] ? e[P.field] : P.rules && P.rules.length > 0 ? P.rules : [];
|
|
36
|
+
}), H = v({
|
|
36
37
|
state: "init",
|
|
37
38
|
errorMsg: "",
|
|
38
39
|
loading: !1
|
|
39
|
-
}), U = (e) => V.value ? V.value.filter((t) => !t.trigger || !e ? !0 : t.trigger && t.trigger === e) : [], W =
|
|
40
|
-
let t =
|
|
40
|
+
}), U = (e) => V.value ? V.value.filter((t) => !t.trigger || !e ? !0 : t.trigger && t.trigger === e) : [], W = l(() => V.value.some((e) => e.required) && (P.showRequired || I?.showRequired?.value)), G = l(() => P.requiredAlign ? P.requiredAlign : I?.requiredAlign?.value ? I?.requiredAlign?.value : "left"), K = async (e) => {
|
|
41
|
+
let t = P.field, n = U(e);
|
|
41
42
|
if (n.length === 0) return !0;
|
|
42
43
|
if (t) {
|
|
43
44
|
let e = B.value, r = Array.isArray(e) ? "array" : e != null && typeof e != "string" ? typeof e : void 0, i = r ? n.map((e) => e.type ? e : {
|
|
44
45
|
...e,
|
|
45
46
|
type: r
|
|
46
|
-
}) : n, a = new
|
|
47
|
+
}) : n, a = new O({ [t]: i });
|
|
47
48
|
return H.value.loading = !0, a.validate({ [t]: e }).then(() => {
|
|
48
49
|
H.value.state = "success", H.value.errorMsg = "";
|
|
49
50
|
}).catch((e) => {
|
|
@@ -57,72 +58,72 @@ var D = S("<span>*"), O = S(" "), k = S("<span>"), A = S("<div><label>"), j = S(
|
|
|
57
58
|
H.value.state = "init", H.value.errorMsg = "", H.value.loading = !1;
|
|
58
59
|
}, J = () => {
|
|
59
60
|
q();
|
|
60
|
-
let e =
|
|
61
|
-
e &&
|
|
62
|
-
}, Y =
|
|
61
|
+
let e = I?.model?.value;
|
|
62
|
+
e && P.field && (e[P.field] = z);
|
|
63
|
+
}, Y = l(() => H.value.state === "error"), X = {
|
|
63
64
|
validate: K,
|
|
64
|
-
field:
|
|
65
|
+
field: P.field,
|
|
65
66
|
resetField: J,
|
|
66
67
|
clearValidate: q
|
|
67
68
|
};
|
|
68
|
-
|
|
69
|
-
size:
|
|
69
|
+
_(a, X), _(o, {
|
|
70
|
+
size: I?.size,
|
|
70
71
|
error: Y
|
|
71
|
-
}), m(() => {
|
|
72
|
-
N.field && (F?.addField(X), z = F?.model?.value?.[N.field]);
|
|
73
72
|
}), h(() => {
|
|
74
|
-
|
|
75
|
-
}),
|
|
73
|
+
P.field && (I?.addField(X), z = I?.model?.value?.[P.field]);
|
|
74
|
+
}), g(() => {
|
|
75
|
+
P.field && I?.removeField(X);
|
|
76
|
+
}), w({
|
|
76
77
|
validate: K,
|
|
77
78
|
resetField: J,
|
|
78
79
|
clearValidate: q,
|
|
79
80
|
validateStatus: H
|
|
80
81
|
});
|
|
81
|
-
let Z =
|
|
82
|
-
return
|
|
83
|
-
let e =
|
|
84
|
-
|
|
82
|
+
let Z = N(), Q = c(Z, 1), $ = c(Q);
|
|
83
|
+
return y(() => {
|
|
84
|
+
let e = D(F), t = H.value, n = t.state;
|
|
85
|
+
b(Z, [
|
|
85
86
|
e.b(),
|
|
86
87
|
e.is("error", n === "error"),
|
|
87
88
|
e.is("success", n === "success"),
|
|
88
89
|
e.is("loading", t.loading),
|
|
89
|
-
e.is("top",
|
|
90
|
-
e.m(
|
|
90
|
+
e.is("top", L.value === "top"),
|
|
91
|
+
e.m(D(I)?.size?.value)
|
|
91
92
|
]);
|
|
92
|
-
}),
|
|
93
|
-
let t =
|
|
94
|
-
return
|
|
95
|
-
let n =
|
|
96
|
-
|
|
97
|
-
}),
|
|
98
|
-
let e =
|
|
99
|
-
return
|
|
100
|
-
}),
|
|
101
|
-
let e =
|
|
102
|
-
return
|
|
103
|
-
})], () =>
|
|
104
|
-
let e =
|
|
105
|
-
return
|
|
106
|
-
}),
|
|
107
|
-
let e =
|
|
108
|
-
return
|
|
109
|
-
})], null, 2), 518),
|
|
110
|
-
content: () =>
|
|
93
|
+
}), x(Z, 0, 0), d(() => W.value || p.label || p.tooltip, () => {
|
|
94
|
+
let t = j(), i = c(t);
|
|
95
|
+
return y(() => {
|
|
96
|
+
let n = D(F);
|
|
97
|
+
b(t, [n.e("label-wrapper")]), b(i, [n.e("label"), n.m("align-" + R.value)]), S(i, { width: D(e)(ee.value) });
|
|
98
|
+
}), x(i, null, 0), d(() => G.value === "left", () => [d(() => W.value, () => {
|
|
99
|
+
let e = k();
|
|
100
|
+
return y(() => b(e, [D(F).e("required")])), x(e, null, 0), u(D(n)), e;
|
|
101
|
+
}), f("label", { label: () => p.label }, () => {
|
|
102
|
+
let e = A();
|
|
103
|
+
return y(() => C(e, T(p.label))), e;
|
|
104
|
+
})], () => d(() => G.value === "right", () => [f("label", { label: () => p.label }, () => {
|
|
105
|
+
let e = A();
|
|
106
|
+
return y(() => C(e, T(p.label))), e;
|
|
107
|
+
}), d(() => W.value, () => {
|
|
108
|
+
let e = k();
|
|
109
|
+
return y(() => b(e, [D(F).e("required")])), x(e, null, 0), u(D(n)), e;
|
|
110
|
+
})], null, 2), 518), x(i, null, 1), d(() => p.tooltip, () => u(D(s), {
|
|
111
|
+
content: () => p.tooltip,
|
|
111
112
|
mini: ""
|
|
112
113
|
}, () => {
|
|
113
114
|
let e = k();
|
|
114
|
-
return
|
|
115
|
+
return y(() => b(e, [D(F).e("tooltip")])), x(e, null, 0), u(D(r)), e;
|
|
115
116
|
})), t;
|
|
116
|
-
}),
|
|
117
|
-
let e =
|
|
118
|
-
|
|
119
|
-
}),
|
|
120
|
-
let e =
|
|
121
|
-
return
|
|
122
|
-
|
|
117
|
+
}), y(() => {
|
|
118
|
+
let e = D(F);
|
|
119
|
+
b(Q, [e.e("content-wrapper")]), b($, [e.e("content")]);
|
|
120
|
+
}), x($, null, 0), f("default", { validate: () => K }), x(Q, null, 1), d(() => H.value.state === "error", () => {
|
|
121
|
+
let e = M(), t = E(e);
|
|
122
|
+
return y(() => {
|
|
123
|
+
b(e, [D(F).e("error-msg")]), C(t, T(H.value.errorMsg));
|
|
123
124
|
}), e;
|
|
124
125
|
}), Z;
|
|
125
126
|
}
|
|
126
127
|
});
|
|
127
128
|
//#endregion
|
|
128
|
-
export {
|
|
129
|
+
export { P as default };
|
|
@@ -9,13 +9,13 @@ import "../config-provider/index.mjs";
|
|
|
9
9
|
import { SPopover as te } from "../popover/index.mjs";
|
|
10
10
|
import "../form/index.mjs";
|
|
11
11
|
import { SInput as ne } from "../input/index.mjs";
|
|
12
|
-
import { SScrollbar as
|
|
13
|
-
import { STabPane as
|
|
14
|
-
import { child as o, computed as s, createComponent as c, createDynamicComponent as l, createFor as u, createIf as d, createInvoker as ae, defineVaporComponent as f, delegateEvents as p, inject as m, markRaw as oe, mergeModels as h, next as g, on as _, reactive as se, ref as v, renderEffect as y, setClass as b, setInsertionState as x, setProp as S, setStaticTemplateRef as
|
|
12
|
+
import { SScrollbar as a } from "../scrollbar/index.mjs";
|
|
13
|
+
import { STabPane as re, STabs as ie } from "../tabs/index.mjs";
|
|
14
|
+
import { child as o, computed as s, createComponent as c, createDynamicComponent as l, createFor as u, createIf as d, createInvoker as ae, defineVaporComponent as f, delegateEvents as p, inject as m, markRaw as oe, mergeModels as h, next as g, on as _, reactive as se, ref as v, renderEffect as y, setClass as b, setInsertionState as x, setProp as S, setStaticTemplateRef as C, setText as w, setValue as ce, template as T, toDisplayString as E, toRefs as le, txt as D, unref as O, useModel as ue, useTemplateRef as k, watch as A, withModifiers as j } from "vue";
|
|
15
15
|
//#region ../components/src/icon-select/icon-select.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
16
|
-
var M =
|
|
17
|
-
p("
|
|
18
|
-
var
|
|
16
|
+
var M = T("<div>"), de = T("<div><div></div><div><input readonly></div></div>"), fe = T("<span> </span>"), pe = T("<span> "), me = T("<div><div></div><div>"), he = T("<div>", 1);
|
|
17
|
+
p("click");
|
|
18
|
+
var N = /*@__PURE__*/ f({
|
|
19
19
|
name: "SIconSelect",
|
|
20
20
|
__name: "icon-select",
|
|
21
21
|
props: /*@__PURE__*/ h({
|
|
@@ -38,122 +38,122 @@ var P = /*@__PURE__*/ f({
|
|
|
38
38
|
}),
|
|
39
39
|
emits: /*@__PURE__*/ h(["change"], ["update:modelValue"]),
|
|
40
40
|
setup(f, { emit: p }) {
|
|
41
|
-
let h = f,
|
|
42
|
-
size:
|
|
43
|
-
error:
|
|
44
|
-
}), _e = m(ee, void 0),
|
|
41
|
+
let h = f, T = p, N = ue(f, "modelValue"), P = e("icon-select"), { size: F, error: I } = le(h), { mergedSize: L, mergedError: ge } = i({
|
|
42
|
+
size: F,
|
|
43
|
+
error: I
|
|
44
|
+
}), _e = m(ee, void 0), R = s(() => _e?.inputFilled?.value || h.filled), ve = (e) => e.replace(/(Fill|Line)$/, "").replace(/([A-Z])/g, "-$1").replace(/^-/, "").toLowerCase(), z = Object.entries(n).map(([e, t]) => ({
|
|
45
45
|
name: e,
|
|
46
46
|
icons: t.map((e) => ({
|
|
47
47
|
name: e,
|
|
48
48
|
displayName: ve(e)
|
|
49
49
|
}))
|
|
50
|
-
})),
|
|
51
|
-
|
|
52
|
-
}),
|
|
50
|
+
})), B = null, V = null, ye = () => (V ??= import("../icon/icon-loaders.mjs").then((e) => {
|
|
51
|
+
B = e.nameToLoaderMap;
|
|
52
|
+
}), V), H = se(/* @__PURE__ */ new Map()), U = (e) => {
|
|
53
53
|
e.length !== 0 && ye().then(() => {
|
|
54
|
-
for (let { name: t } of e)
|
|
55
|
-
|
|
54
|
+
for (let { name: t } of e) H.has(t) || !B.has(t) || B.get(t)().then((e) => {
|
|
55
|
+
H.set(t, oe(e.default));
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
|
-
},
|
|
59
|
-
let e =
|
|
58
|
+
}, W = v(""), G = v(z[0].name), be = s(() => z), K = s(() => {
|
|
59
|
+
let e = W.value.trim().toLowerCase(), t = e ? z.flatMap((e) => e.icons) : z.find((e) => e.name === G.value)?.icons ?? [];
|
|
60
60
|
return e ? t.filter((t) => t.name.toLowerCase().includes(e) || t.displayName.includes(e)) : t;
|
|
61
|
-
}),
|
|
62
|
-
h.disabled || (
|
|
61
|
+
}), q = k("popoverRef"), J = k("gridRef"), Y = v(!1), xe = () => {
|
|
62
|
+
h.disabled || (Y.value ? X() : Se());
|
|
63
63
|
}, Se = () => {
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
|
|
64
|
+
q.value?.show(), Y.value = !0;
|
|
65
|
+
}, X = () => {
|
|
66
|
+
q.value?.hide(), Y.value = !1;
|
|
67
67
|
}, Ce = (e) => {
|
|
68
|
-
|
|
68
|
+
N.value = e, T("change", e), X();
|
|
69
69
|
}, we = () => {
|
|
70
|
-
|
|
70
|
+
N.value = "", T("change", "");
|
|
71
71
|
};
|
|
72
|
-
A(
|
|
73
|
-
e &&
|
|
72
|
+
A(N, (e) => {
|
|
73
|
+
e && U([{
|
|
74
74
|
name: e,
|
|
75
75
|
displayName: ""
|
|
76
76
|
}]);
|
|
77
77
|
}, { immediate: !0 });
|
|
78
|
-
let
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
|
|
78
|
+
let Z = () => {
|
|
79
|
+
U(K.value), J.value && (J.value.scrollTop = 0);
|
|
80
|
+
}, Q = () => {
|
|
81
|
+
Z();
|
|
82
82
|
};
|
|
83
|
-
A(
|
|
84
|
-
e &&
|
|
83
|
+
A(G, Z), A(Y, (e) => {
|
|
84
|
+
e && Z();
|
|
85
85
|
});
|
|
86
|
-
let
|
|
87
|
-
|
|
88
|
-
}, $ =
|
|
86
|
+
let Te = m(r, null), Ee = (e) => {
|
|
87
|
+
Te?.validate(e).catch(() => {});
|
|
88
|
+
}, $ = he();
|
|
89
89
|
return y(() => {
|
|
90
|
-
let e = O(
|
|
91
|
-
b($, [e.b(), e.m(O(
|
|
92
|
-
}), x($, null, 0),
|
|
90
|
+
let e = O(P);
|
|
91
|
+
b($, [e.b(), e.m(O(L))]);
|
|
92
|
+
}), x($, null, 0), C(c(O(te), { $: [() => ({
|
|
93
93
|
placement: "bottom-start",
|
|
94
94
|
offset: [0, 4],
|
|
95
95
|
...f.popoverProps,
|
|
96
96
|
manual: !0
|
|
97
|
-
}), { onClickOutside: () =>
|
|
97
|
+
}), { onClickOutside: () => X }] }, {
|
|
98
98
|
content: () => {
|
|
99
|
-
let e =
|
|
99
|
+
let e = me(), t = o(e), n = g(t, 1);
|
|
100
100
|
return y(() => {
|
|
101
|
-
let n = O(
|
|
101
|
+
let n = O(P);
|
|
102
102
|
b(e, [n.e("panel")]), b(t, [n.e("panel-header")]);
|
|
103
103
|
}), x(t, null, 0), c(O(ne), {
|
|
104
|
-
modelValue: () =>
|
|
105
|
-
"onUpdate:modelValue": () => (e) =>
|
|
104
|
+
modelValue: () => W.value,
|
|
105
|
+
"onUpdate:modelValue": () => (e) => W.value = e,
|
|
106
106
|
style: "width: 100%",
|
|
107
107
|
placeholder: "搜索图标名称",
|
|
108
108
|
clearable: "",
|
|
109
109
|
filled: "",
|
|
110
|
-
onChange: () =>
|
|
111
|
-
}), y(() => b(n, [O(
|
|
112
|
-
modelValue: () =>
|
|
113
|
-
"onUpdate:modelValue": () => (e) =>
|
|
114
|
-
}, () => u(() => be.value, (e) => c(O(
|
|
110
|
+
onChange: () => Q
|
|
111
|
+
}), y(() => b(n, [O(P).e("panel-body")])), x(n, null, 0), c(O(ie), {
|
|
112
|
+
modelValue: () => G.value,
|
|
113
|
+
"onUpdate:modelValue": () => (e) => G.value = e
|
|
114
|
+
}, () => u(() => be.value, (e) => c(O(re), {
|
|
115
115
|
name: () => e.value.name,
|
|
116
116
|
label: () => e.value.name
|
|
117
117
|
}, {
|
|
118
118
|
label: () => {
|
|
119
|
-
let t =
|
|
119
|
+
let t = fe(), n = pe(), r = D(t), i = D(n);
|
|
120
120
|
return y(() => {
|
|
121
121
|
let t = e.value;
|
|
122
|
-
|
|
122
|
+
w(r, E(t.name)), b(n, [O(P).e("category-count")]), w(i, E(t.icons.length));
|
|
123
123
|
}), [t, n];
|
|
124
124
|
},
|
|
125
|
-
default: () => c(O(
|
|
125
|
+
default: () => c(O(a), { padding: "12px 0 0 0" }, () => {
|
|
126
126
|
let e = M();
|
|
127
|
-
return y(() => b(e, [O(
|
|
127
|
+
return y(() => b(e, [O(P).e("panel-list")])), x(e, null, 0), u(() => K.value, (e) => {
|
|
128
128
|
let t = M();
|
|
129
129
|
return y(() => {
|
|
130
|
-
let n = O(
|
|
131
|
-
b(t, [n.e("panel-item"), n.is("selected", e.value.name ===
|
|
132
|
-
}), x(t, null, 0), d(() =>
|
|
130
|
+
let n = O(P);
|
|
131
|
+
b(t, [n.e("panel-item"), n.is("selected", e.value.name === N.value)]);
|
|
132
|
+
}), x(t, null, 0), d(() => H.get(e.value.name), () => l(() => H.get(e.value.name), { class: () => [O(P).e("panel-icon")] })), _(t, "click", j(() => Ce(e.value.name), ["stop"])), S(t, "title", e.value.name), t;
|
|
133
133
|
}, (e) => e.name, 9), e;
|
|
134
134
|
})
|
|
135
|
-
}), (e) => e.name, 34)), e
|
|
135
|
+
}), (e) => e.name, 34)), e;
|
|
136
136
|
},
|
|
137
137
|
default: () => {
|
|
138
|
-
let e =
|
|
138
|
+
let e = de(), n = o(e), r = g(n, 1), i = o(r);
|
|
139
139
|
return y(() => {
|
|
140
|
-
let t = O(
|
|
140
|
+
let t = O(P);
|
|
141
141
|
b(e, [
|
|
142
142
|
t.e("wrapper"),
|
|
143
143
|
t.is("disabled", f.disabled),
|
|
144
144
|
t.is("error", O(ge)),
|
|
145
|
-
t.is("filled",
|
|
145
|
+
t.is("filled", R.value)
|
|
146
146
|
]), b(n, [t.e("icon")]);
|
|
147
|
-
}), x(n, null, 0), d(() =>
|
|
148
|
-
let e = O(
|
|
149
|
-
b(r, [e.e("label")]), b(i, [e.e("inner")]),
|
|
150
|
-
}), x(r, null, 1), d(() => f.clearable && !f.disabled &&
|
|
147
|
+
}), x(n, null, 0), d(() => N.value && H.get(N.value), () => l(() => H.get(N.value || ""))), _(i, "blur", () => Ee("blur")), y(() => {
|
|
148
|
+
let e = O(P);
|
|
149
|
+
b(r, [e.e("label")]), b(i, [e.e("inner")]), ce(i, N.value), S(i, "disabled", f.disabled), S(i, "placeholder", f.placeholder), S(i, "filled", R.value);
|
|
150
|
+
}), x(r, null, 1), d(() => f.clearable && !f.disabled && N.value, () => {
|
|
151
151
|
let e = M();
|
|
152
|
-
return y(() => b(e, [O(
|
|
152
|
+
return y(() => b(e, [O(P).e("clear")])), x(e, null, 0), c(O(t)), _(e, "click", j(we, ["stop"])), e;
|
|
153
153
|
}), e.$evtclick = ae(xe), e;
|
|
154
154
|
}
|
|
155
|
-
}),
|
|
155
|
+
}), q, null, "popoverRef"), $;
|
|
156
156
|
}
|
|
157
157
|
});
|
|
158
158
|
//#endregion
|
|
159
|
-
export {
|
|
159
|
+
export { N as default };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
|
|
2
2
|
import "../../../hooks/index.mjs";
|
|
3
|
-
import { CheckCircleLine as t, CloseCircleLine as n,
|
|
4
|
-
import { child as
|
|
3
|
+
import { CheckCircleLine as t, CloseCircleLine as n, CloseLine as r, InformationLine as i, WarningLine as a } from "../../../icons/src/svg/system/index.mjs";
|
|
4
|
+
import { child as o, createComponent as s, createIf as c, createInvoker as l, defineVaporComponent as u, delegateEvents as d, on as f, onMounted as p, onUnmounted as m, ref as h, renderEffect as g, setClass as _, setInsertionState as v, setText as y, template as b, toDisplayString as x, txt as S, unref as C, watch as w } from "vue";
|
|
5
5
|
//#region ../components/src/message/message.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
6
|
-
var
|
|
6
|
+
var T = b("<div>"), E = b("<div><span> "), D = b("<div><div> </div>", 1);
|
|
7
7
|
d("click");
|
|
8
|
-
var
|
|
8
|
+
var O = /*@__PURE__*/ u({
|
|
9
9
|
__name: "message",
|
|
10
10
|
props: {
|
|
11
11
|
destroy: {},
|
|
@@ -29,47 +29,47 @@ var k = /*@__PURE__*/ u({
|
|
|
29
29
|
},
|
|
30
30
|
emits: ["close"],
|
|
31
31
|
setup(u, { emit: d }) {
|
|
32
|
-
let
|
|
33
|
-
|
|
32
|
+
let b = u, O = e("message"), k = d, A = h(null), j = h(!1), M = () => {
|
|
33
|
+
k("close", b.id);
|
|
34
|
+
}, N = () => {
|
|
35
|
+
A.value &&= (clearTimeout(A.value), null);
|
|
34
36
|
}, P = () => {
|
|
35
|
-
j.value
|
|
37
|
+
N(), b.duration !== 0 && !j.value && (A.value = window.setTimeout(() => {
|
|
38
|
+
k("close", b.id);
|
|
39
|
+
}, b.duration));
|
|
36
40
|
}, F = () => {
|
|
37
|
-
|
|
38
|
-
A("close", x.id);
|
|
39
|
-
}, x.duration));
|
|
41
|
+
b.hover && (j.value = !0, N());
|
|
40
42
|
}, I = () => {
|
|
41
|
-
|
|
42
|
-
}, L = () => {
|
|
43
|
-
x.hover && (M.value = !1, F());
|
|
43
|
+
b.hover && (j.value = !1, P());
|
|
44
44
|
};
|
|
45
45
|
p(() => {
|
|
46
|
-
F();
|
|
47
|
-
}), m(() => {
|
|
48
46
|
P();
|
|
49
|
-
}),
|
|
50
|
-
|
|
47
|
+
}), m(() => {
|
|
48
|
+
N();
|
|
49
|
+
}), w(() => b.count, (e, t) => {
|
|
50
|
+
e > (t || 0) && P();
|
|
51
51
|
});
|
|
52
|
-
let
|
|
52
|
+
let L = D(), R = o(L, 1);
|
|
53
53
|
g(() => {
|
|
54
|
-
let e =
|
|
55
|
-
|
|
56
|
-
}),
|
|
57
|
-
let e =
|
|
58
|
-
return g(() =>
|
|
54
|
+
let e = C(O);
|
|
55
|
+
_(L, [e.b(), e.m(u.type)]);
|
|
56
|
+
}), v(L, 0, 0), c(() => u.showIcon, () => {
|
|
57
|
+
let e = T();
|
|
58
|
+
return g(() => _(e, [C(O).e("icon")])), v(e, null, 0), c(() => u.type === "warning", () => s(C(a)), () => c(() => u.type === "primary", () => s(C(i)), () => c(() => u.type === "info", () => s(C(i)), () => c(() => u.type === "success", () => s(C(t)), () => c(() => u.type === "danger", () => s(C(n))), 1029), 773), 517), 261), e;
|
|
59
59
|
});
|
|
60
|
-
let
|
|
60
|
+
let z = S(R);
|
|
61
61
|
return g(() => {
|
|
62
|
-
|
|
63
|
-
}),
|
|
64
|
-
let e =
|
|
65
|
-
return g(() =>
|
|
66
|
-
}),
|
|
67
|
-
let e =
|
|
62
|
+
_(R, [C(O).e("content")]), y(z, x(u.message));
|
|
63
|
+
}), v(L, null, 2), c(() => u.showClose, () => {
|
|
64
|
+
let e = T();
|
|
65
|
+
return g(() => _(e, [C(O).e("close")])), v(e, null, 0), s(C(r)), e.$evtclick = l(M), e;
|
|
66
|
+
}), v(L, null, 3), c(() => u.grouping && u.count, () => {
|
|
67
|
+
let e = E(), t = S(o(e));
|
|
68
68
|
return g(() => {
|
|
69
|
-
|
|
69
|
+
_(e, [C(O).e("grouping")]), y(t, x(u.count));
|
|
70
70
|
}), e;
|
|
71
|
-
}), f(
|
|
71
|
+
}), f(L, "mouseenter", F), f(L, "mouseleave", I), L;
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
//#endregion
|
|
75
|
-
export {
|
|
75
|
+
export { O as default };
|
|
@@ -95,6 +95,7 @@
|
|
|
95
95
|
display: flex;
|
|
96
96
|
align-items: center;
|
|
97
97
|
justify-content: center;
|
|
98
|
+
flex-shrink: 0;
|
|
98
99
|
border-right: 1px solid getCssVar("color", "fill-3");
|
|
99
100
|
svg {
|
|
100
101
|
height: 18px;
|
|
@@ -103,6 +104,7 @@
|
|
|
103
104
|
}
|
|
104
105
|
|
|
105
106
|
@include e(label) {
|
|
107
|
+
flex: 1;
|
|
106
108
|
height: 100%;
|
|
107
109
|
padding: 0 12px;
|
|
108
110
|
display: flex;
|
|
@@ -135,6 +137,7 @@
|
|
|
135
137
|
display: flex;
|
|
136
138
|
align-items: center;
|
|
137
139
|
justify-content: center;
|
|
140
|
+
flex-shrink: 0;
|
|
138
141
|
cursor: pointer;
|
|
139
142
|
&:hover {
|
|
140
143
|
background-color: getCssVar("color", "fill-3");
|
package/dist/json/web-types.json
CHANGED