savor-ui 0.14.0 → 0.14.2
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 +20 -0
- package/dist/es/components/src/cascader/cascader.vue_vue_type_script_setup_true_vapor_true_lang.mjs +4 -1
- package/dist/es/components/src/drawer/drawer.vue_vue_type_script_setup_true_vapor_true_lang.mjs +80 -78
- package/dist/es/components/src/dropdown/doption.d.ts +4 -2
- package/dist/es/components/src/dropdown/doption.vue_vue_type_script_setup_true_vapor_true_lang.mjs +11 -10
- package/dist/es/components/src/dropdown/dsubmenu.d.ts +4 -2
- package/dist/es/components/src/dropdown/dsubmenu.vue_vue_type_script_setup_true_vapor_true_lang.mjs +12 -11
- package/dist/es/components/src/dropdown/index.d.ts +6 -4
- package/dist/es/components/src/dropdown/types.d.ts +8 -0
- package/dist/es/components/src/form/form-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +8 -7
- package/dist/es/components/src/form/index.d.ts +1 -0
- package/dist/es/components/src/form/types.d.ts +2 -0
- package/dist/es/components/src/input-number/input-number.vue_vue_type_script_setup_true_vapor_true_lang.mjs +5 -5
- package/dist/es/components/src/radio/index.d.ts +1 -1
- package/dist/es/components/src/radio/radio-group.vue_vue_type_script_setup_true_vapor_true_lang.mjs +26 -23
- package/dist/es/components/src/radio/radio.vue_vue_type_script_setup_true_vapor_true_lang.mjs +0 -2
- package/dist/es/components/src/radio/types.d.ts +2 -2
- package/dist/es/components/src/select/select.vue_vue_type_script_setup_true_vapor_true_lang.mjs +61 -59
- package/dist/es/theme/components/date-picker.scss +21 -5
- package/dist/es/theme/components/datetime-picker.scss +21 -5
- package/dist/es/theme/components/drawer.scss +1 -0
- package/dist/es/theme/components/input-number.scss +21 -8
- package/dist/es/theme/components/input-tag.scss +18 -5
- package/dist/es/theme/components/input.scss +9 -0
- package/dist/es/theme/components/radio.scss +14 -1
- package/dist/es/theme/components/select.scss +12 -3
- package/dist/es/theme/components/textarea.scss +18 -5
- package/dist/json/vetur-attributes.json +6 -3
- package/dist/json/vetur-tags.json +3 -2
- package/dist/json/web-types.json +17 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
## [0.14.2](https://gitee.com/mach552/savor-ui/compare/v0.14.1...v0.14.2) (2026-07-31)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **cascader:** 修复无法清空值的问题 ([90e7667](https://gitee.com/mach552/savor-ui/commits/90e76674b1e7c8978f86875e57fd6140a8ea1a51))
|
|
11
|
+
* **drawer:** 修复关闭时transition找不到节点的问题 ([21344b9](https://gitee.com/mach552/savor-ui/commits/21344b9a98828ebf9913bf8ac5f825e0843df411))
|
|
12
|
+
* **drawer:** 修复宽度无法动态修改问题 ([dc08354](https://gitee.com/mach552/savor-ui/commits/dc08354549121186c983dccc70b81ac542a61a3e))
|
|
13
|
+
* **drawer:** 修复无法拖拽宽度的问题 ([1a67ae5](https://gitee.com/mach552/savor-ui/commits/1a67ae5ff31953713a1e51ecce4e49ba6606c47c))
|
|
14
|
+
* **dropdown:** 修复某些清空下选项点击后弹窗不关闭问题 ([2fdce57](https://gitee.com/mach552/savor-ui/commits/2fdce570fe7b417ea7830f3d5b02875d4bd656cd))
|
|
15
|
+
* **select:** 修复多选模式下大小失效的问题 ([982838e](https://gitee.com/mach552/savor-ui/commits/982838e3992f32cf2d95962309b42c9c9bd40ae0))
|
|
16
|
+
|
|
17
|
+
## [0.14.1](https://gitee.com/mach552/savor-ui/compare/v0.14.0...v0.14.1) (2026-07-26)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **form:** 修复子组件`labelPosition`无效问题 ([ff76534](https://gitee.com/mach552/savor-ui/commits/ff7653461d61cd7a2e116917dd3960dd05ede902))
|
|
23
|
+
* **radio-group:** 修复大小无效问题 ([a9a9a12](https://gitee.com/mach552/savor-ui/commits/a9a9a1222e9db825b2222ba99b04266dfbd07383))
|
|
24
|
+
|
|
5
25
|
# [0.14.0](https://gitee.com/mach552/savor-ui/compare/v0.13.1...v0.14.0) (2026-07-26)
|
|
6
26
|
|
|
7
27
|
|
package/dist/es/components/src/cascader/cascader.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -101,7 +101,10 @@ var k = /*@__PURE__*/ p({
|
|
|
101
101
|
}
|
|
102
102
|
return n;
|
|
103
103
|
}, Z = () => {
|
|
104
|
-
if (A.value === void 0 || A.value === "")
|
|
104
|
+
if (A.value === void 0 || A.value === "") {
|
|
105
|
+
R.value = "", F.value = [], I.value = [], z.value = [];
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
105
108
|
if (h.multiple) {
|
|
106
109
|
z.value = (Array.isArray(A.value) ? A.value : []).map((e) => {
|
|
107
110
|
if (h.pathMode && typeof e == "string") {
|
package/dist/es/components/src/drawer/drawer.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -7,13 +7,13 @@ import "../../../hooks/index.mjs";
|
|
|
7
7
|
import i from "../../../icons/src/close.vue.mjs";
|
|
8
8
|
import "../../../icons/index.mjs";
|
|
9
9
|
import a from "../button/button.vue.mjs";
|
|
10
|
-
import
|
|
11
|
-
import { STransition as
|
|
12
|
-
import { VaporTeleport as
|
|
10
|
+
import ee from "../scrollbar/scrollbar.vue.mjs";
|
|
11
|
+
import { STransition as o } from "../transition/index.mjs";
|
|
12
|
+
import { VaporTeleport as te, applyVShow as s, child as c, computed as l, createComponent as u, createIf as d, createInvoker as f, createSlot as p, createTemplateRefSetter as m, defineVaporComponent as h, delegateEvents as g, mergeModels as _, nextTick as v, onMounted as ne, onUnmounted as re, ref as y, renderEffect as b, setClass as x, setInsertionState as S, setStyle as C, setText as w, template as T, toDisplayString as E, txt as D, unref as O, useModel as ie, watch as k, watchEffect as ae } from "vue";
|
|
13
13
|
//#region ../components/src/drawer/drawer.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
14
|
-
var
|
|
14
|
+
var A = T("<div>"), j = T("<div> "), M = T("<div><div><div></div>");
|
|
15
15
|
g("click", "mousedown");
|
|
16
|
-
var
|
|
16
|
+
var N = /*@__PURE__*/ h({
|
|
17
17
|
name: "SDrawer",
|
|
18
18
|
__name: "drawer",
|
|
19
19
|
props: /*@__PURE__*/ _({
|
|
@@ -74,42 +74,44 @@ var M = /*@__PURE__*/ h({
|
|
|
74
74
|
"closed"
|
|
75
75
|
], ["update:modelValue"]),
|
|
76
76
|
setup(h, { emit: g }) {
|
|
77
|
-
let _ = h,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
let _ = h, T = g, N = t("drawer"), { nextZIndex: P } = r(), F = y(0), { lockScroll: I, unlockScroll: L } = n(), R = ie(h, "modelValue"), z = y(!1), B = y(!1), V = y(!1), H = y(""), U = y("");
|
|
78
|
+
ae(() => {
|
|
79
|
+
H.value = e(_.width), U.value = e(_.height);
|
|
80
|
+
});
|
|
81
|
+
let oe = l(() => ({
|
|
82
|
+
zIndex: F.value,
|
|
81
83
|
position: _.to === "body" ? "fixed" : "absolute"
|
|
82
|
-
})), W =
|
|
84
|
+
})), W = l(() => {
|
|
83
85
|
let e = { ..._.drawerStyle };
|
|
84
|
-
return (_.placement === "left" || _.placement === "right") && (e.width =
|
|
85
|
-
}),
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
Z.value && (Z.value.style.transition = "", Z.value.style.transform = ""),
|
|
86
|
+
return (_.placement === "left" || _.placement === "right") && (e.width = H.value), (_.placement === "top" || _.placement === "bottom") && (e.height = U.value), e;
|
|
87
|
+
}), se = () => {
|
|
88
|
+
T("opened");
|
|
89
|
+
}, ce = () => {
|
|
90
|
+
B.value = !1, T("closed"), v(() => {
|
|
91
|
+
Z.value && (Z.value.style.transition = "", Z.value.style.transform = ""), L();
|
|
90
92
|
});
|
|
91
93
|
}, G = () => {
|
|
92
|
-
|
|
93
|
-
},
|
|
94
|
-
_.closeOnMask && (G(),
|
|
95
|
-
},
|
|
96
|
-
e.preventDefault(),
|
|
94
|
+
R.value = !1, T("close");
|
|
95
|
+
}, le = () => {
|
|
96
|
+
_.closeOnMask && (G(), T("maskClick"));
|
|
97
|
+
}, ue = (e) => {
|
|
98
|
+
e.preventDefault(), V.value = !0;
|
|
97
99
|
}, K = (e) => {
|
|
98
|
-
if (
|
|
99
|
-
if (_.placement === "right" && (
|
|
100
|
+
if (V.value) {
|
|
101
|
+
if (_.placement === "right" && (H.value = X(window.innerWidth - e.clientX, _.minWidth, _.maxWidth, !0), $(H.value, !0)), _.placement === "left") {
|
|
100
102
|
let t = e.clientX;
|
|
101
|
-
|
|
103
|
+
H.value = X(t, _.minWidth, _.maxWidth, !0), $(H.value, !0);
|
|
102
104
|
}
|
|
103
|
-
if (_.placement === "bottom" && (
|
|
105
|
+
if (_.placement === "bottom" && (U.value = X(window.innerHeight - e.clientY, _.minHeight, _.maxHeight, !1), $(U.value, !0)), _.placement === "top") {
|
|
104
106
|
let t = e.clientY;
|
|
105
|
-
|
|
107
|
+
U.value = X(t, _.minHeight, _.maxHeight, !1), $(U.value, !0);
|
|
106
108
|
}
|
|
107
109
|
}
|
|
108
110
|
}, q = () => {
|
|
109
|
-
|
|
111
|
+
V.value &&= !1;
|
|
110
112
|
}, J = (e) => {
|
|
111
|
-
e.key === "Escape" && _.closeOnEsc &&
|
|
112
|
-
},
|
|
113
|
+
e.key === "Escape" && _.closeOnEsc && R.value && (G(), T("esc"));
|
|
114
|
+
}, de = (e) => {
|
|
113
115
|
let t = String(e).trim().match(/^(\d*\.?\d+)(.*)$/);
|
|
114
116
|
return t ? {
|
|
115
117
|
num: parseFloat(t[1]),
|
|
@@ -119,7 +121,7 @@ var M = /*@__PURE__*/ h({
|
|
|
119
121
|
unit: "px"
|
|
120
122
|
};
|
|
121
123
|
}, Y = (e, t) => {
|
|
122
|
-
let { num: n, unit: r } =
|
|
124
|
+
let { num: n, unit: r } = de(e), i = t ? window.innerWidth : window.innerHeight;
|
|
123
125
|
switch (r) {
|
|
124
126
|
case "%":
|
|
125
127
|
case "vw":
|
|
@@ -130,76 +132,76 @@ var M = /*@__PURE__*/ h({
|
|
|
130
132
|
}, X = (e, t, n, r) => {
|
|
131
133
|
let i = Y(t, r), a = Y(n, r);
|
|
132
134
|
return Math.max(i, Math.min(e, a)) + "px";
|
|
133
|
-
}, Z =
|
|
135
|
+
}, Z = y(null), Q = () => {
|
|
134
136
|
_.to === "body" ? Z.value = document.querySelector("#app") : _.to instanceof HTMLElement ? Z.value = _.to : typeof _.to == "string" && (Z.value = document.querySelector(_.to));
|
|
135
137
|
}, $ = (e, t) => {
|
|
136
138
|
_.push && Z.value && (t ? (Z.value.style.transition = "transform 0.3s var(--s-bezier-out)", _.placement === "left" ? Z.value.style.transform = `translateX(${e})` : _.placement === "right" ? Z.value.style.transform = `translateX(-${e})` : _.placement === "top" ? Z.value.style.transform = `translateY(${e})` : _.placement === "bottom" && (Z.value.style.transform = `translateY(-${e})`)) : (Z.value.style.transition = "transform 0.3s var(--s-bezier-in)", Z.value.style.transform = "translate(0,0)"));
|
|
137
139
|
};
|
|
138
|
-
|
|
139
|
-
e ? (
|
|
140
|
-
|
|
141
|
-
})) : (
|
|
142
|
-
}, { immediate: !0 }),
|
|
140
|
+
k(() => _.to, Q), k(() => R.value, (e) => {
|
|
141
|
+
e ? (F.value = P(), I(), B.value = !0, v(() => {
|
|
142
|
+
z.value = !0, _.placement === "left" || _.placement === "right" ? $(W.value.width, !0) : (_.placement === "top" || _.placement === "bottom") && $(W.value.height, !0), _.closeOnEsc && (document.removeEventListener("keydown", J), document.addEventListener("keydown", J)), T("open");
|
|
143
|
+
})) : (z.value = !1, document.removeEventListener("keydown", J), $("0", !1));
|
|
144
|
+
}, { immediate: !0 }), k(() => _.resizable, (e) => {
|
|
143
145
|
e ? (window.addEventListener("mousemove", K), window.addEventListener("mouseup", q)) : (window.removeEventListener("mousemove", K), window.removeEventListener("mouseup", q));
|
|
144
|
-
}, { immediate: !0 }),
|
|
146
|
+
}, { immediate: !0 }), ne(() => {
|
|
145
147
|
Q();
|
|
146
|
-
}),
|
|
148
|
+
}), re(() => {
|
|
147
149
|
document.removeEventListener("keydown", J), window.removeEventListener("mousemove", K), window.removeEventListener("mouseup", q);
|
|
148
150
|
});
|
|
149
|
-
let
|
|
150
|
-
return
|
|
151
|
+
let fe = m();
|
|
152
|
+
return u(te, {
|
|
151
153
|
to: () => h.to,
|
|
152
154
|
defer: ""
|
|
153
155
|
}, () => {
|
|
154
|
-
let e =
|
|
155
|
-
return
|
|
156
|
-
|
|
157
|
-
}),
|
|
158
|
-
let e =
|
|
159
|
-
return e.$evtclick =
|
|
160
|
-
|
|
156
|
+
let e = A();
|
|
157
|
+
return b(() => {
|
|
158
|
+
x(e, [O(N).e("container")]), C(e, oe.value);
|
|
159
|
+
}), S(e, null, 0), u(O(o), { type: "opacity" }, () => d(() => h.mask, () => {
|
|
160
|
+
let e = A();
|
|
161
|
+
return s(e, () => z.value), e.$evtclick = f(le), b(() => {
|
|
162
|
+
x(e, [O(N).e("mask")]), C(e, h.maskStyle);
|
|
161
163
|
}), e;
|
|
162
|
-
}, null, 129)),
|
|
164
|
+
}, null, 129)), S(e, null, 1), u(O(o), {
|
|
163
165
|
type: "side",
|
|
164
166
|
placement: () => h.placement,
|
|
165
|
-
onAfterLeave: () =>
|
|
166
|
-
onAfterEnter: () =>
|
|
167
|
+
onAfterLeave: () => ce,
|
|
168
|
+
onAfterEnter: () => se
|
|
167
169
|
}, () => {
|
|
168
|
-
let e =
|
|
169
|
-
return
|
|
170
|
-
let t =
|
|
171
|
-
|
|
172
|
-
}),
|
|
173
|
-
let e =
|
|
174
|
-
return e.$evtmousedown =
|
|
175
|
-
let t =
|
|
176
|
-
|
|
170
|
+
let e = M(), t = c(e, 1), n = c(t, 1);
|
|
171
|
+
return b(() => {
|
|
172
|
+
let t = O(N);
|
|
173
|
+
x(e, [t.b(), t.m(h.placement)]), C(e, W.value);
|
|
174
|
+
}), S(e, 0, 0), d(() => h.resizable, () => {
|
|
175
|
+
let e = A();
|
|
176
|
+
return e.$evtmousedown = f(ue), b(() => {
|
|
177
|
+
let t = O(N);
|
|
178
|
+
x(e, [t.e("trigger"), t.is("dragging", V.value)]);
|
|
177
179
|
}), e;
|
|
178
|
-
}),
|
|
179
|
-
let e =
|
|
180
|
-
return
|
|
181
|
-
let e =
|
|
182
|
-
return
|
|
183
|
-
|
|
180
|
+
}), b(() => x(t, [O(N).e("wrapper")])), S(t, 0, 0), d(() => h.header, () => {
|
|
181
|
+
let e = A();
|
|
182
|
+
return b(() => x(e, [O(N).e("header")])), S(e, null, 0), p("header", null, () => {
|
|
183
|
+
let e = j(), t = D(e);
|
|
184
|
+
return b(() => {
|
|
185
|
+
x(e, [O(N).e("title")]), w(t, E(h.title));
|
|
184
186
|
}), e;
|
|
185
|
-
}),
|
|
187
|
+
}), S(e, null, 1), d(() => h.closable, () => u(a, {
|
|
186
188
|
circle: "",
|
|
187
189
|
text: "",
|
|
188
190
|
size: "small",
|
|
189
191
|
onClick: () => G
|
|
190
|
-
}, { icon: () =>
|
|
191
|
-
}),
|
|
192
|
-
let e =
|
|
193
|
-
return
|
|
194
|
-
|
|
195
|
-
}),
|
|
196
|
-
}, 1285),
|
|
197
|
-
let e =
|
|
198
|
-
return
|
|
199
|
-
}),
|
|
200
|
-
}),
|
|
192
|
+
}, { icon: () => u(O(i)) })), e;
|
|
193
|
+
}), b(() => x(n, [O(N).e("body")])), S(n, null, 0), d(() => h.scrollContent, () => u(ee, { $: [() => ({ ...h.scrollbarProps })] }, () => p("default", null, null, 4)), () => {
|
|
194
|
+
let e = A();
|
|
195
|
+
return b(() => {
|
|
196
|
+
x(e, [O(N).e("content")]), C(e, h.bodyStyle);
|
|
197
|
+
}), S(e, null, 0), p(), e;
|
|
198
|
+
}, 1285), S(t, null, 2), d(() => h.footer, () => {
|
|
199
|
+
let e = A();
|
|
200
|
+
return b(() => x(e, [O(N).e("footer")])), S(e, null, 0), p("footer"), e;
|
|
201
|
+
}), s(e, () => z.value), e;
|
|
202
|
+
}), s(e, () => B.value), fe(e, "drawerContainerRef"), e;
|
|
201
203
|
}, !0);
|
|
202
204
|
}
|
|
203
205
|
});
|
|
204
206
|
//#endregion
|
|
205
|
-
export {
|
|
207
|
+
export { N as default };
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { DroptionProps, DroptionSlots } from './types';
|
|
2
2
|
import { PublicProps, VNode } from 'vue';
|
|
3
3
|
declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
-
props: PublicProps & __VLS_PrettifyLocal<DroptionProps
|
|
4
|
+
props: PublicProps & __VLS_PrettifyLocal<DroptionProps & {
|
|
5
|
+
onClick?: (() => any) | undefined;
|
|
6
|
+
}> & (typeof globalThis extends {
|
|
5
7
|
__VLS_PROPS_FALLBACK: infer P;
|
|
6
8
|
} ? P : {});
|
|
7
9
|
expose: (exposed: {}) => void;
|
|
8
10
|
attrs: any;
|
|
9
11
|
slots: DroptionSlots;
|
|
10
|
-
emit:
|
|
12
|
+
emit: (evt: "click") => void;
|
|
11
13
|
}>) => VNode & {
|
|
12
14
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
13
15
|
};
|
package/dist/es/components/src/dropdown/doption.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -9,20 +9,21 @@ var y = /*@__PURE__*/ o({
|
|
|
9
9
|
name: "SDoption",
|
|
10
10
|
__name: "doption",
|
|
11
11
|
props: { title: {} },
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
emits: ["click"],
|
|
13
|
+
setup(o, { emit: s, slots: p }) {
|
|
14
|
+
let y = s, b = e("droption"), x = c(t, void 0), S = () => {
|
|
15
|
+
x?.itemClick?.(), y("click");
|
|
16
|
+
}, C = v(), w = n(C, 1);
|
|
17
|
+
return l(() => u(C, [h(b).b()])), d(C, 0, 0), r(() => p.icon, () => {
|
|
17
18
|
let e = g();
|
|
18
|
-
return l(() => u(e, [h(
|
|
19
|
-
}), l(() => u(
|
|
19
|
+
return l(() => u(e, [h(b).e("icon")])), d(e, null, 0), a("icon"), e;
|
|
20
|
+
}), l(() => u(w, [h(b).e("title")])), d(w, null, 0), a("default", null, () => {
|
|
20
21
|
let e = _();
|
|
21
22
|
return l(() => f(e, m(o.title))), e;
|
|
22
|
-
}), d(
|
|
23
|
+
}), d(C, null, 2), r(() => p.extra, () => {
|
|
23
24
|
let e = g();
|
|
24
|
-
return l(() => u(e, [h(
|
|
25
|
-
}),
|
|
25
|
+
return l(() => u(e, [h(b).e("extra")])), d(e, null, 0), a("extra"), e;
|
|
26
|
+
}), C.$evtclick = i(S), C;
|
|
26
27
|
}
|
|
27
28
|
});
|
|
28
29
|
//#endregion
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { DsubmenuProps, DsubmenuSlots } from './types';
|
|
2
2
|
import { PublicProps, VNode } from 'vue';
|
|
3
3
|
declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
-
props: PublicProps & __VLS_PrettifyLocal<DsubmenuProps
|
|
4
|
+
props: PublicProps & __VLS_PrettifyLocal<DsubmenuProps & {
|
|
5
|
+
onClick?: (() => any) | undefined;
|
|
6
|
+
}> & (typeof globalThis extends {
|
|
5
7
|
__VLS_PROPS_FALLBACK: infer P;
|
|
6
8
|
} ? P : {});
|
|
7
9
|
expose: (exposed: {}) => void;
|
|
8
10
|
attrs: any;
|
|
9
11
|
slots: DsubmenuSlots;
|
|
10
|
-
emit:
|
|
12
|
+
emit: (evt: "click") => void;
|
|
11
13
|
}>) => VNode & {
|
|
12
14
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
13
15
|
};
|
package/dist/es/components/src/dropdown/dsubmenu.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -15,11 +15,12 @@ var w = /*@__PURE__*/ l({
|
|
|
15
15
|
title: {},
|
|
16
16
|
popoverProps: {}
|
|
17
17
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
emits: ["click"],
|
|
19
|
+
setup(l, { emit: u, slots: _ }) {
|
|
20
|
+
let w = u, T = e("dsubmenu"), E = d(r, void 0), D = () => {
|
|
21
|
+
E?.itemClick?.(), w("click");
|
|
22
|
+
}, O = C();
|
|
23
|
+
return p(() => m(O, [y(T).b()])), h(O, null, 0), a(y(n), { $: [() => ({
|
|
23
24
|
teleportBody: !1,
|
|
24
25
|
trigger: "hover",
|
|
25
26
|
placement: "right-start",
|
|
@@ -27,19 +28,19 @@ var w = /*@__PURE__*/ l({
|
|
|
27
28
|
})] }, {
|
|
28
29
|
content: () => {
|
|
29
30
|
let e = b();
|
|
30
|
-
return p(() => m(e, y(
|
|
31
|
+
return p(() => m(e, y(T).e("list"))), h(e, null, 0), c("content"), e;
|
|
31
32
|
},
|
|
32
33
|
default: () => {
|
|
33
34
|
let e = S(), n = i(e, 1), r = f(n, 2);
|
|
34
|
-
return p(() => m(e, y(
|
|
35
|
+
return p(() => m(e, y(T).e("item"))), h(e, 0, 0), o(() => _.icon, () => {
|
|
35
36
|
let e = b();
|
|
36
|
-
return p(() => m(e, [y(
|
|
37
|
-
}), p(() => m(n, [y(
|
|
37
|
+
return p(() => m(e, [y(T).e("icon")])), h(e, null, 0), c("icon"), e;
|
|
38
|
+
}), p(() => m(n, [y(T).e("title")])), h(n, null, 0), c("title", null, () => {
|
|
38
39
|
let e = x();
|
|
39
40
|
return p(() => g(e, v(l.title))), e;
|
|
40
|
-
}), p(() => m(r, [y(
|
|
41
|
+
}), p(() => m(r, [y(T).e("arrow")])), h(r, null, 0), a(y(t)), e.$evtclick = s(D), e;
|
|
41
42
|
}
|
|
42
|
-
}),
|
|
43
|
+
}), O;
|
|
43
44
|
}
|
|
44
45
|
});
|
|
45
46
|
//#endregion
|
|
@@ -21,35 +21,37 @@ export declare const SDropdown: ((__VLS_props: NonNullable<Awaited<typeof __VLS_
|
|
|
21
21
|
export declare const SDoption: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
22
22
|
attrs: any;
|
|
23
23
|
slots: DroptionSlots;
|
|
24
|
-
emit:
|
|
24
|
+
emit: (evt: "click") => void;
|
|
25
25
|
}, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
26
26
|
props: PublicProps & {
|
|
27
27
|
title?: string | undefined;
|
|
28
|
+
onClick?: (() => any) | undefined;
|
|
28
29
|
} & (typeof globalThis extends {
|
|
29
30
|
__VLS_PROPS_FALLBACK: infer P;
|
|
30
31
|
} ? P : {});
|
|
31
32
|
expose: (exposed: {}) => void;
|
|
32
33
|
attrs: any;
|
|
33
34
|
slots: DroptionSlots;
|
|
34
|
-
emit:
|
|
35
|
+
emit: (evt: "click") => void;
|
|
35
36
|
}>) => VNode & {
|
|
36
37
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
37
38
|
}) & Plugin;
|
|
38
39
|
export declare const SDsubmenu: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
39
40
|
attrs: any;
|
|
40
41
|
slots: DsubmenuSlots;
|
|
41
|
-
emit:
|
|
42
|
+
emit: (evt: "click") => void;
|
|
42
43
|
}, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
43
44
|
props: PublicProps & {
|
|
44
45
|
title?: string | undefined;
|
|
45
46
|
popoverProps?: PopoverProps | undefined;
|
|
47
|
+
onClick?: (() => any) | undefined;
|
|
46
48
|
} & (typeof globalThis extends {
|
|
47
49
|
__VLS_PROPS_FALLBACK: infer P;
|
|
48
50
|
} ? P : {});
|
|
49
51
|
expose: (exposed: {}) => void;
|
|
50
52
|
attrs: any;
|
|
51
53
|
slots: DsubmenuSlots;
|
|
52
|
-
emit:
|
|
54
|
+
emit: (evt: "click") => void;
|
|
53
55
|
}>) => VNode & {
|
|
54
56
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
55
57
|
}) & Plugin;
|
|
@@ -22,6 +22,10 @@ export interface DroptionSlots {
|
|
|
22
22
|
/** 额外内容 */
|
|
23
23
|
extra?: () => any;
|
|
24
24
|
}
|
|
25
|
+
export interface DroptionEmits {
|
|
26
|
+
/** 点击 */
|
|
27
|
+
click: [];
|
|
28
|
+
}
|
|
25
29
|
export interface DsubmenuProps {
|
|
26
30
|
/** 标题 */
|
|
27
31
|
title?: string;
|
|
@@ -38,6 +42,10 @@ export interface DsubmenuSlots {
|
|
|
38
42
|
/** 内容 */
|
|
39
43
|
content?: () => any;
|
|
40
44
|
}
|
|
45
|
+
export interface DsubmenuEmits {
|
|
46
|
+
/** 点击 */
|
|
47
|
+
click: [];
|
|
48
|
+
}
|
|
41
49
|
export interface DropdownContext {
|
|
42
50
|
itemClick: () => void;
|
|
43
51
|
}
|
package/dist/es/components/src/form/form-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -19,6 +19,7 @@ var k = w("<span>"), A = w(" "), j = w("<div><label>"), M = w("<div> "), N = w("
|
|
|
19
19
|
rules: {},
|
|
20
20
|
labelWidth: {},
|
|
21
21
|
tooltip: {},
|
|
22
|
+
labelPosition: {},
|
|
22
23
|
labelAlign: {},
|
|
23
24
|
showRequired: {
|
|
24
25
|
type: Boolean,
|
|
@@ -27,7 +28,7 @@ var k = w("<span>"), A = w(" "), j = w("<div><label>"), M = w("<div> "), N = w("
|
|
|
27
28
|
requiredAlign: {}
|
|
28
29
|
},
|
|
29
30
|
setup(p, { expose: w }) {
|
|
30
|
-
let P = p, F = t("form-item"), I = m(i), L = 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 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
32
|
let e = I?.model?.value;
|
|
32
33
|
return e && P.field && e[P.field] !== void 0 ? e[P.field] : null;
|
|
33
34
|
}), V = l(() => {
|
|
@@ -81,20 +82,20 @@ var k = w("<span>"), A = w(" "), j = w("<div><label>"), M = w("<div> "), N = w("
|
|
|
81
82
|
});
|
|
82
83
|
let Z = N(), Q = c(Z, 1), $ = c(Q);
|
|
83
84
|
return y(() => {
|
|
84
|
-
let e = D(F), t = H.value, n =
|
|
85
|
+
let e = D(F), t = H.value, n = t.state;
|
|
85
86
|
b(Z, [
|
|
86
87
|
e.b(),
|
|
87
|
-
e.is("error",
|
|
88
|
-
e.is("success",
|
|
88
|
+
e.is("error", n === "error"),
|
|
89
|
+
e.is("success", n === "success"),
|
|
89
90
|
e.is("loading", t.loading),
|
|
90
|
-
e.is("top",
|
|
91
|
-
e.m(
|
|
91
|
+
e.is("top", L.value === "top"),
|
|
92
|
+
e.m(D(I)?.size?.value)
|
|
92
93
|
]);
|
|
93
94
|
}), x(Z, 0, 0), d(() => W.value || p.label || p.tooltip, () => {
|
|
94
95
|
let t = j(), i = c(t);
|
|
95
96
|
return y(() => {
|
|
96
97
|
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)(
|
|
98
|
+
b(t, [n.e("label-wrapper")]), b(i, [n.e("label"), n.m("align-" + R.value)]), S(i, { width: D(e)(ee.value) });
|
|
98
99
|
}), x(i, null, 0), d(() => G.value === "left", () => [d(() => W.value, () => {
|
|
99
100
|
let e = k();
|
|
100
101
|
return y(() => b(e, [D(F).e("required")])), x(e, null, 0), u(D(n)), e;
|
|
@@ -52,6 +52,7 @@ export declare const SFormItem: ((__VLS_props: NonNullable<Awaited<typeof __VLS_
|
|
|
52
52
|
rules?: FormItemRule[] | undefined;
|
|
53
53
|
labelWidth?: string | number | undefined;
|
|
54
54
|
tooltip?: string | undefined;
|
|
55
|
+
labelPosition?: "left" | "top" | undefined;
|
|
55
56
|
labelAlign?: "left" | "right" | undefined;
|
|
56
57
|
showRequired?: boolean | undefined;
|
|
57
58
|
requiredAlign?: "left" | "right" | undefined;
|
|
@@ -139,15 +139,15 @@ var N = /*@__PURE__*/ p({
|
|
|
139
139
|
let t = D(Y);
|
|
140
140
|
x(e, [t.e("button"), t.e("prepend-button")]);
|
|
141
141
|
}), S(e, null, 0), c(D(r)), v(e, "click", k(q, ["stop"])), e.$evtmousedown = A(() => {}, ["prevent"]), e;
|
|
142
|
-
}), b(() => x(Q, [D(Y).e("
|
|
142
|
+
}), b(() => x(Q, [D(Y).e("content")])), S(Q, 0, 0), l(() => T.prefix || p.prefix, () => {
|
|
143
143
|
let e = M();
|
|
144
144
|
return b(() => x(e, [D(Y).e("prefix")])), S(e, null, 0), d("prefix", null, () => {
|
|
145
145
|
let e = j();
|
|
146
146
|
return b(() => w(e, E(p.prefix))), e;
|
|
147
147
|
}), e;
|
|
148
148
|
}), v($, "blur", ve), v($, "change", G), v($, "focus", _e), $.$evtinput = u(he), $.$evtkeydown = u(ge), xe($, R, null, "inputRef"), b(() => {
|
|
149
|
-
C($, "autofocus", p.autofocus), x($, [D(Y).e("
|
|
150
|
-
}), S(Q, null, 2), l(() => V.value && !!P.value && p.clearable, () => {
|
|
149
|
+
C($, "autofocus", p.autofocus), x($, [D(Y).e("inner")]), C($, "disabled", p.disabled), C($, "maxlength", p.maxlength), C($, "minlength", p.minlength), C($, "name", p.name), C($, "placeholder", p.placeholder), C($, "readonly", p.readonly ? !0 : void 0), ie($, B.value);
|
|
150
|
+
}), S(Q, null, 2), l(() => V.value && !!P.value && p.clearable && !p.disabled, () => {
|
|
151
151
|
let e = M();
|
|
152
152
|
return b(() => x(e, D(Y).e("clear"))), S(e, null, 0), c(D(t)), v(e, "click", k(ye, ["stop"])), e.$evtmousedown = A(() => {}, ["prevent"]), e;
|
|
153
153
|
}), S(Q, null, 3), l(() => T.suffix || p.suffix, () => {
|
|
@@ -156,13 +156,13 @@ var N = /*@__PURE__*/ p({
|
|
|
156
156
|
let e = j();
|
|
157
157
|
return b(() => w(e, E(p.suffix))), e;
|
|
158
158
|
}), e;
|
|
159
|
-
}), S(Q, null, 4), l(() => p.controls && !p.showButton, () => {
|
|
159
|
+
}), S(Q, null, 4), l(() => p.controls && !p.showButton && !p.disabled, () => {
|
|
160
160
|
let e = se(), t = o(e), r = re(t, 1);
|
|
161
161
|
return b(() => {
|
|
162
162
|
let n = D(Y);
|
|
163
163
|
x(e, [n.e("controls")]), x(t, n.e("increase"));
|
|
164
164
|
}), S(t, null, 0), c(D(i)), v(t, "click", k(K, ["stop"])), t.$evtmousedown = A(() => {}, ["prevent"]), b(() => x(r, D(Y).e("decrease"))), S(r, null, 0), c(D(n)), v(r, "click", k(q, ["stop"])), r.$evtmousedown = A(() => {}, ["prevent"]), e;
|
|
165
|
-
}), S(Z, null, 3), l(() => p.showButton, () => {
|
|
165
|
+
}), S(Z, null, 3), l(() => p.showButton && !p.disabled, () => {
|
|
166
166
|
let e = M();
|
|
167
167
|
return b(() => {
|
|
168
168
|
let t = D(Y);
|
|
@@ -8,7 +8,6 @@ export declare const SRadio: ((__VLS_props: NonNullable<Awaited<typeof __VLS_set
|
|
|
8
8
|
props: PublicProps & {
|
|
9
9
|
label?: string | undefined;
|
|
10
10
|
value: string | number | boolean;
|
|
11
|
-
size?: "mini" | "small" | "medium" | "large" | undefined;
|
|
12
11
|
disabled?: boolean | undefined;
|
|
13
12
|
modelValue?: string | number | boolean | undefined;
|
|
14
13
|
onChange?: ((value: string | number | boolean, e: Event) => any) | undefined;
|
|
@@ -34,6 +33,7 @@ export declare const SRadioGroup: ((__VLS_props: NonNullable<Awaited<typeof __VL
|
|
|
34
33
|
vertical?: boolean | undefined;
|
|
35
34
|
button?: boolean | undefined;
|
|
36
35
|
block?: boolean | undefined;
|
|
36
|
+
size?: "mini" | "small" | "medium" | "large" | undefined;
|
|
37
37
|
modelValue?: string | number | boolean | undefined;
|
|
38
38
|
onChange?: ((value: string | number | boolean) => any) | undefined;
|
|
39
39
|
"onUpdate:modelValue"?: ((value: string | number | boolean) => any) | undefined;
|