savor-ui 0.13.1 → 0.14.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 +25 -0
- package/dist/es/components/src/collapse/collapse-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +21 -18
- package/dist/es/components/src/collapse/collapse.vue_vue_type_script_setup_true_vapor_true_lang.mjs +4 -1
- package/dist/es/components/src/form/form-item.d.ts +4 -0
- package/dist/es/components/src/form/form-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +40 -32
- package/dist/es/components/src/form/form.vue_vue_type_script_setup_true_vapor_true_lang.mjs +17 -13
- package/dist/es/components/src/form/index.d.ts +12 -0
- package/dist/es/components/src/form/types.d.ts +12 -0
- package/dist/es/components/src/radio/index.d.ts +2 -1
- package/dist/es/components/src/radio/radio-group.vue_vue_type_script_setup_true_vapor_true_lang.mjs +27 -22
- package/dist/es/components/src/radio/radio.vue_vue_type_script_setup_true_vapor_true_lang.mjs +5 -6
- package/dist/es/components/src/radio/types.d.ts +4 -2
- package/dist/es/components/src/tabs/index.d.ts +1 -0
- package/dist/es/components/src/tabs/tabs.vue_vue_type_script_setup_true_vapor_true_lang.mjs +16 -12
- package/dist/es/components/src/tabs/types.d.ts +2 -0
- package/dist/es/components/src/text/text.vue_vue_type_script_setup_true_vapor_true_lang.mjs +9 -1
- package/dist/es/theme/components/collapse.scss +12 -1
- package/dist/es/theme/components/date-picker.scss +4 -0
- package/dist/es/theme/components/datetime-picker.scss +4 -0
- package/dist/es/theme/components/form.scss +11 -19
- package/dist/es/theme/components/input-number.scss +4 -0
- package/dist/es/theme/components/input-tag.scss +4 -0
- package/dist/es/theme/components/radio.scss +40 -2
- package/dist/es/theme/components/tabs.scss +8 -3
- package/dist/es/theme/components/textarea.scss +4 -0
- package/dist/es/theme/mixins/mixins.scss +12 -0
- package/dist/json/vetur-attributes.json +24 -3
- package/dist/json/vetur-tags.json +11 -5
- package/dist/json/web-types.json +57 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
## [0.14.1](https://gitee.com/mach552/savor-ui/compare/v0.14.0...v0.14.1) (2026-07-26)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **form:** 修复子组件`labelPosition`无效问题 ([ff76534](https://gitee.com/mach552/savor-ui/commits/ff7653461d61cd7a2e116917dd3960dd05ede902))
|
|
11
|
+
* **radio-group:** 修复大小无效问题 ([a9a9a12](https://gitee.com/mach552/savor-ui/commits/a9a9a1222e9db825b2222ba99b04266dfbd07383))
|
|
12
|
+
|
|
13
|
+
# [0.14.0](https://gitee.com/mach552/savor-ui/compare/v0.13.1...v0.14.0) (2026-07-26)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* **collapse:** 修复border属性无效问题 ([244f173](https://gitee.com/mach552/savor-ui/commits/244f173944ee92dc1ce69efc4e0455f170f1d07a))
|
|
19
|
+
* **form:** 修复tooltip不居中问题 ([379a74e](https://gitee.com/mach552/savor-ui/commits/379a74e894ac04f5802e118c5dae74a701aca462))
|
|
20
|
+
* **tabs:** 修复单子组件时报错问题 ([14542d7](https://gitee.com/mach552/savor-ui/commits/14542d738b55dd79c148661e33fcc02e92937cac))
|
|
21
|
+
* **text:** 修复动态改变内容时tooltip显示时机问题 ([7a6779d](https://gitee.com/mach552/savor-ui/commits/7a6779d11762cee0c5b10069f728807d1a91b17e))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* **form:** 新增`requiredAlign`属性 ([4ff93e8](https://gitee.com/mach552/savor-ui/commits/4ff93e80e3572e5a24ca6f96a9d18c982c6b0a86))
|
|
27
|
+
* **radio-group:** 新增`block`属性 ([3e6f902](https://gitee.com/mach552/savor-ui/commits/3e6f902269459be76aa8220ff38d1f8f5eb4fbe1))
|
|
28
|
+
* **tabs:** 新增`block`属性 ([37577cc](https://gitee.com/mach552/savor-ui/commits/37577cc9ded99124907615168f53f30084de9f45))
|
|
29
|
+
|
|
5
30
|
## [0.13.1](https://gitee.com/mach552/savor-ui/compare/v0.13.0...v0.13.1) (2026-07-22)
|
|
6
31
|
|
|
7
32
|
|
|
@@ -4,11 +4,11 @@ import t from "../../../icons/src/right.vue.mjs";
|
|
|
4
4
|
import "../../../icons/index.mjs";
|
|
5
5
|
import { STransition as n } from "../transition/index.mjs";
|
|
6
6
|
import { collapseContextKey as r } from "./types.mjs";
|
|
7
|
-
import { applyVShow as i, child as a, computed as o, createComponent as s,
|
|
7
|
+
import { applyVShow as i, child as a, computed as o, createComponent as s, createIf as c, createInvoker as l, createSlot as u, defineVaporComponent as d, delegateEvents as f, inject as p, next as m, renderEffect as h, setClass as g, setInsertionState as _, setStyle as v, setText as y, template as b, toDisplayString as x, unref as S } from "vue";
|
|
8
8
|
//#region ../components/src/collapse/collapse-item.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
var
|
|
9
|
+
var C = b(" "), w = b("<span>"), T = b("<div>"), E = b("<div><div><span></span><span></span>", 1);
|
|
10
|
+
f("click");
|
|
11
|
+
var D = /*@__PURE__*/ d({
|
|
12
12
|
name: "SCollapseItem",
|
|
13
13
|
__name: "collapse-item",
|
|
14
14
|
props: {
|
|
@@ -16,21 +16,24 @@ var T = /*@__PURE__*/ u({
|
|
|
16
16
|
name: {},
|
|
17
17
|
disabled: { type: Boolean }
|
|
18
18
|
},
|
|
19
|
-
setup(
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
return
|
|
24
|
-
let e =
|
|
25
|
-
|
|
26
|
-
}),
|
|
27
|
-
let e = S();
|
|
28
|
-
return m(() => v(e, b(u.title))), e;
|
|
29
|
-
}), m(() => h(M, x(y).e("extra"))), g(M, null, 0), l("extra"), k.$evtclick = c(D), g(O, null, 1), s(x(n), { type: "height" }, () => {
|
|
19
|
+
setup(d, { slots: f }) {
|
|
20
|
+
let b = d, D = e("collapse"), O = p(r), k = o(() => !!O?.modelValue?.value?.includes(b.name)), A = () => {
|
|
21
|
+
b.disabled || O?.handleItemClick?.(b.name);
|
|
22
|
+
}, j = E(), M = a(j), N = a(M), P = m(N, 1);
|
|
23
|
+
return h(() => {
|
|
24
|
+
let e = S(D), t = k.value;
|
|
25
|
+
g(j, [e.e("item"), e.is("disabled", d.disabled)]), g(M, [e.e("header"), e.is("active", t)]), g(N, e.e("header-arrow")), v(N, { transform: t ? "rotate(90deg)" : "" });
|
|
26
|
+
}), _(N, null, 0), s(S(t)), h(() => g(P, S(D).e("header-title"))), _(P, null, 0), u("title", null, () => {
|
|
30
27
|
let e = C();
|
|
31
|
-
return
|
|
32
|
-
}),
|
|
28
|
+
return h(() => y(e, x(d.title))), e;
|
|
29
|
+
}), _(M, null, 2), c(() => f.extra, () => {
|
|
30
|
+
let e = w();
|
|
31
|
+
return h(() => g(e, S(D).e("extra"))), _(e, null, 0), u("extra"), e;
|
|
32
|
+
}), M.$evtclick = l(A), _(j, null, 1), s(S(n), { type: "height" }, () => {
|
|
33
|
+
let e = T();
|
|
34
|
+
return h(() => g(e, S(D).e("content"))), _(e, null, 0), u(), i(e, () => k.value), e;
|
|
35
|
+
}), j;
|
|
33
36
|
}
|
|
34
37
|
});
|
|
35
38
|
//#endregion
|
|
36
|
-
export {
|
|
39
|
+
export { D as default };
|
package/dist/es/components/src/collapse/collapse.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -31,7 +31,10 @@ var p = l("<div>", 1), m = /*@__PURE__*/ r({
|
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
33
|
let _ = p();
|
|
34
|
-
return o(() =>
|
|
34
|
+
return o(() => {
|
|
35
|
+
let e = u(h);
|
|
36
|
+
s(_, [e.b(), e.is("border", r.border)]);
|
|
37
|
+
}), c(_, null, 0), n(), _;
|
|
35
38
|
}
|
|
36
39
|
});
|
|
37
40
|
//#endregion
|
|
@@ -10,6 +10,10 @@ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup
|
|
|
10
10
|
label?: (props: {
|
|
11
11
|
label: string | undefined;
|
|
12
12
|
}) => any;
|
|
13
|
+
} & {
|
|
14
|
+
label?: (props: {
|
|
15
|
+
label: string | undefined;
|
|
16
|
+
}) => any;
|
|
13
17
|
} & {
|
|
14
18
|
default?: (props: {
|
|
15
19
|
validate: (trigger?: string) => Promise<true | void>;
|
package/dist/es/components/src/form/form-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -19,14 +19,16 @@ 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,
|
|
25
26
|
default: !0
|
|
26
|
-
}
|
|
27
|
+
},
|
|
28
|
+
requiredAlign: {}
|
|
27
29
|
},
|
|
28
30
|
setup(p, { expose: w }) {
|
|
29
|
-
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(() => {
|
|
30
32
|
let e = I?.model?.value;
|
|
31
33
|
return e && P.field && e[P.field] !== void 0 ? e[P.field] : null;
|
|
32
34
|
}), V = l(() => {
|
|
@@ -36,7 +38,7 @@ var k = w("<span>"), A = w(" "), j = w("<div><label>"), M = w("<div> "), N = w("
|
|
|
36
38
|
state: "init",
|
|
37
39
|
errorMsg: "",
|
|
38
40
|
loading: !1
|
|
39
|
-
}), 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), G = async (e) => {
|
|
41
|
+
}), 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) => {
|
|
40
42
|
let t = P.field, n = U(e);
|
|
41
43
|
if (n.length === 0) return !0;
|
|
42
44
|
if (t) {
|
|
@@ -53,54 +55,60 @@ var k = w("<span>"), A = w(" "), j = w("<div><label>"), M = w("<div> "), N = w("
|
|
|
53
55
|
H.value.loading = !1;
|
|
54
56
|
});
|
|
55
57
|
}
|
|
56
|
-
}, K = () => {
|
|
57
|
-
H.value.state = "init", H.value.errorMsg = "", H.value.loading = !1;
|
|
58
58
|
}, q = () => {
|
|
59
|
-
|
|
59
|
+
H.value.state = "init", H.value.errorMsg = "", H.value.loading = !1;
|
|
60
|
+
}, J = () => {
|
|
61
|
+
q();
|
|
60
62
|
let e = I?.model?.value;
|
|
61
63
|
e && P.field && (e[P.field] = z);
|
|
62
|
-
},
|
|
63
|
-
validate:
|
|
64
|
+
}, Y = l(() => H.value.state === "error"), X = {
|
|
65
|
+
validate: K,
|
|
64
66
|
field: P.field,
|
|
65
|
-
resetField:
|
|
66
|
-
clearValidate:
|
|
67
|
+
resetField: J,
|
|
68
|
+
clearValidate: q
|
|
67
69
|
};
|
|
68
|
-
_(a,
|
|
70
|
+
_(a, X), _(o, {
|
|
69
71
|
size: I?.size,
|
|
70
|
-
error:
|
|
72
|
+
error: Y
|
|
71
73
|
}), h(() => {
|
|
72
|
-
P.field && (I?.addField(
|
|
74
|
+
P.field && (I?.addField(X), z = I?.model?.value?.[P.field]);
|
|
73
75
|
}), g(() => {
|
|
74
|
-
P.field && I?.removeField(
|
|
76
|
+
P.field && I?.removeField(X);
|
|
75
77
|
}), w({
|
|
76
|
-
validate:
|
|
77
|
-
resetField:
|
|
78
|
-
clearValidate:
|
|
78
|
+
validate: K,
|
|
79
|
+
resetField: J,
|
|
80
|
+
clearValidate: q,
|
|
79
81
|
validateStatus: H
|
|
80
82
|
});
|
|
81
|
-
let
|
|
83
|
+
let Z = N(), Q = c(Z, 1), $ = c(Q);
|
|
82
84
|
return y(() => {
|
|
83
|
-
let e = D(F), t = H.value, n =
|
|
84
|
-
b(
|
|
85
|
+
let e = D(F), t = H.value, n = t.state;
|
|
86
|
+
b(Z, [
|
|
85
87
|
e.b(),
|
|
86
|
-
e.is("error",
|
|
87
|
-
e.is("success",
|
|
88
|
+
e.is("error", n === "error"),
|
|
89
|
+
e.is("success", n === "success"),
|
|
88
90
|
e.is("loading", t.loading),
|
|
89
|
-
e.is("top",
|
|
90
|
-
e.m(
|
|
91
|
+
e.is("top", L.value === "top"),
|
|
92
|
+
e.m(D(I)?.size?.value)
|
|
91
93
|
]);
|
|
92
|
-
}), x(
|
|
94
|
+
}), x(Z, 0, 0), d(() => W.value || p.label || p.tooltip, () => {
|
|
93
95
|
let t = j(), i = c(t);
|
|
94
96
|
return y(() => {
|
|
95
97
|
let n = D(F);
|
|
96
|
-
b(t, [n.e("label-wrapper")]), b(i, [n.e("label"), n.m("align-" + R.value)]), S(i, { width: D(e)(
|
|
97
|
-
}), x(i, null, 0), d(() => W.value, () => {
|
|
98
|
+
b(t, [n.e("label-wrapper")]), b(i, [n.e("label"), n.m("align-" + R.value)]), S(i, { width: D(e)(ee.value) });
|
|
99
|
+
}), x(i, null, 0), d(() => G.value === "left", () => [d(() => W.value, () => {
|
|
98
100
|
let e = k();
|
|
99
101
|
return y(() => b(e, [D(F).e("required")])), x(e, null, 0), u(D(n)), e;
|
|
100
|
-
}),
|
|
102
|
+
}), f("label", { label: () => p.label }, () => {
|
|
103
|
+
let e = A();
|
|
104
|
+
return y(() => C(e, T(p.label))), e;
|
|
105
|
+
})], () => d(() => G.value === "right", () => [f("label", { label: () => p.label }, () => {
|
|
101
106
|
let e = A();
|
|
102
107
|
return y(() => C(e, T(p.label))), e;
|
|
103
|
-
}),
|
|
108
|
+
}), d(() => W.value, () => {
|
|
109
|
+
let e = k();
|
|
110
|
+
return y(() => b(e, [D(F).e("required")])), x(e, null, 0), u(D(n)), e;
|
|
111
|
+
})], null, 2), 518), x(i, null, 1), d(() => p.tooltip, () => u(D(s), {
|
|
104
112
|
content: () => p.tooltip,
|
|
105
113
|
mini: ""
|
|
106
114
|
}, () => {
|
|
@@ -109,13 +117,13 @@ var k = w("<span>"), A = w(" "), j = w("<div><label>"), M = w("<div> "), N = w("
|
|
|
109
117
|
})), t;
|
|
110
118
|
}), y(() => {
|
|
111
119
|
let e = D(F);
|
|
112
|
-
b(
|
|
113
|
-
}), x(
|
|
120
|
+
b(Q, [e.e("content-wrapper")]), b($, [e.e("content")]);
|
|
121
|
+
}), x($, null, 0), f("default", { validate: () => K }), x(Q, null, 1), d(() => H.value.state === "error", () => {
|
|
114
122
|
let e = M(), t = E(e);
|
|
115
123
|
return y(() => {
|
|
116
124
|
b(e, [D(F).e("error-msg")]), C(t, T(H.value.errorMsg));
|
|
117
125
|
}), e;
|
|
118
|
-
}),
|
|
126
|
+
}), Z;
|
|
119
127
|
}
|
|
120
128
|
});
|
|
121
129
|
//#endregion
|
|
@@ -12,13 +12,15 @@ var g = f("<form>", 1), _ = /*@__PURE__*/ r({
|
|
|
12
12
|
size: {},
|
|
13
13
|
labelWidth: { default: "100px" },
|
|
14
14
|
labelPosition: { default: "left" },
|
|
15
|
-
labelAlign: {}
|
|
15
|
+
labelAlign: {},
|
|
16
|
+
showRequired: { type: Boolean },
|
|
17
|
+
requiredAlign: {}
|
|
16
18
|
},
|
|
17
19
|
emits: ["submit"],
|
|
18
20
|
setup(r, { expose: f, emit: _ }) {
|
|
19
|
-
let v = r, y = _, b = e("form"), { size: x, labelWidth: S, labelPosition: C, labelAlign: w, model: T, rules: E } = p(v),
|
|
21
|
+
let v = r, y = _, b = e("form"), { size: x, labelWidth: S, labelPosition: C, labelAlign: w, model: T, rules: E, showRequired: D, requiredAlign: O } = p(v), k = h("formRef"), A = (e) => {
|
|
20
22
|
e.preventDefault(), y("submit", e);
|
|
21
|
-
},
|
|
23
|
+
}, j = s([]);
|
|
22
24
|
o(t, {
|
|
23
25
|
model: T,
|
|
24
26
|
rules: E,
|
|
@@ -27,18 +29,20 @@ var g = f("<form>", 1), _ = /*@__PURE__*/ r({
|
|
|
27
29
|
labelPosition: C,
|
|
28
30
|
labelAlign: w,
|
|
29
31
|
addField: (e) => {
|
|
30
|
-
|
|
32
|
+
j.value.push(e);
|
|
31
33
|
},
|
|
32
34
|
removeField: (e) => {
|
|
33
|
-
e.field &&
|
|
34
|
-
}
|
|
35
|
+
e.field && j.value.splice(j.value.indexOf(e), 1);
|
|
36
|
+
},
|
|
37
|
+
showRequired: D,
|
|
38
|
+
requiredAlign: O
|
|
35
39
|
}), i(() => {
|
|
36
|
-
|
|
40
|
+
k.value?.addEventListener("submit", A);
|
|
37
41
|
}), a(() => {
|
|
38
|
-
|
|
42
|
+
k.value?.removeEventListener("submit", A);
|
|
39
43
|
}), f({
|
|
40
44
|
validate: async (e) => {
|
|
41
|
-
let t = e && e.length > 0 ?
|
|
45
|
+
let t = e && e.length > 0 ? j.value.filter((t) => e.includes(t.field || "")) : j.value, n = {};
|
|
42
46
|
for (let e of t) try {
|
|
43
47
|
await e.validate("");
|
|
44
48
|
} catch (e) {
|
|
@@ -51,16 +55,16 @@ var g = f("<form>", 1), _ = /*@__PURE__*/ r({
|
|
|
51
55
|
return Object.keys(n).length === 0 ? !0 : Promise.reject(n);
|
|
52
56
|
},
|
|
53
57
|
resetFields: (e) => {
|
|
54
|
-
let t = e && e.length > 0 ?
|
|
58
|
+
let t = e && e.length > 0 ? j.value.filter((t) => e.includes(t.field || "")) : j.value;
|
|
55
59
|
for (let e of t) e.resetField();
|
|
56
60
|
},
|
|
57
61
|
clearValidate: (e) => {
|
|
58
|
-
let t = e && e.length > 0 ?
|
|
62
|
+
let t = e && e.length > 0 ? j.value.filter((t) => e.includes(t.field || "")) : j.value;
|
|
59
63
|
for (let e of t) e.clearValidate();
|
|
60
64
|
}
|
|
61
65
|
});
|
|
62
|
-
let
|
|
63
|
-
return c(() => l(
|
|
66
|
+
let M = g();
|
|
67
|
+
return c(() => l(M, [m(b).b()])), u(M, null, 0), n(), d(M, k, null, "formRef"), M;
|
|
64
68
|
}
|
|
65
69
|
});
|
|
66
70
|
//#endregion
|
|
@@ -14,6 +14,8 @@ export declare const SForm: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setu
|
|
|
14
14
|
labelWidth?: string | number | undefined;
|
|
15
15
|
labelPosition?: "left" | "top" | undefined;
|
|
16
16
|
labelAlign?: "left" | "right" | undefined;
|
|
17
|
+
showRequired?: boolean | undefined;
|
|
18
|
+
requiredAlign?: "left" | "right" | undefined;
|
|
17
19
|
onSubmit?: ((e: Event) => any) | undefined;
|
|
18
20
|
} & (typeof globalThis extends {
|
|
19
21
|
__VLS_PROPS_FALLBACK: infer P;
|
|
@@ -33,6 +35,10 @@ export declare const SFormItem: ((__VLS_props: NonNullable<Awaited<typeof __VLS_
|
|
|
33
35
|
label?: (props: {
|
|
34
36
|
label: string | undefined;
|
|
35
37
|
}) => any;
|
|
38
|
+
} & {
|
|
39
|
+
label?: (props: {
|
|
40
|
+
label: string | undefined;
|
|
41
|
+
}) => any;
|
|
36
42
|
} & {
|
|
37
43
|
default?: (props: {
|
|
38
44
|
validate: (trigger?: string) => Promise<true | void>;
|
|
@@ -46,8 +52,10 @@ export declare const SFormItem: ((__VLS_props: NonNullable<Awaited<typeof __VLS_
|
|
|
46
52
|
rules?: FormItemRule[] | undefined;
|
|
47
53
|
labelWidth?: string | number | undefined;
|
|
48
54
|
tooltip?: string | undefined;
|
|
55
|
+
labelPosition?: "left" | "top" | undefined;
|
|
49
56
|
labelAlign?: "left" | "right" | undefined;
|
|
50
57
|
showRequired?: boolean | undefined;
|
|
58
|
+
requiredAlign?: "left" | "right" | undefined;
|
|
51
59
|
} & (typeof globalThis extends {
|
|
52
60
|
__VLS_PROPS_FALLBACK: infer P;
|
|
53
61
|
} ? P : {});
|
|
@@ -57,6 +65,10 @@ export declare const SFormItem: ((__VLS_props: NonNullable<Awaited<typeof __VLS_
|
|
|
57
65
|
label?: (props: {
|
|
58
66
|
label: string | undefined;
|
|
59
67
|
}) => any;
|
|
68
|
+
} & {
|
|
69
|
+
label?: (props: {
|
|
70
|
+
label: string | undefined;
|
|
71
|
+
}) => any;
|
|
60
72
|
} & {
|
|
61
73
|
default?: (props: {
|
|
62
74
|
validate: (trigger?: string) => Promise<true | void>;
|
|
@@ -17,6 +17,10 @@ export interface FormProps {
|
|
|
17
17
|
labelPosition?: "left" | "top";
|
|
18
18
|
/** 表单项标签对齐方式 */
|
|
19
19
|
labelAlign?: "left" | "right";
|
|
20
|
+
/** 是否显示必填标识 */
|
|
21
|
+
showRequired?: boolean;
|
|
22
|
+
/** 必填标识对齐方式 */
|
|
23
|
+
requiredAlign?: "left" | "right";
|
|
20
24
|
}
|
|
21
25
|
export interface FormEmits {
|
|
22
26
|
/** 表单提交时触发 */
|
|
@@ -41,10 +45,14 @@ export interface FormItemProps {
|
|
|
41
45
|
labelWidth?: string | number;
|
|
42
46
|
/** 表单项提示 */
|
|
43
47
|
tooltip?: string;
|
|
48
|
+
/** 表单项标签位置 */
|
|
49
|
+
labelPosition?: "left" | "top";
|
|
44
50
|
/** 表单项标签对齐方式 */
|
|
45
51
|
labelAlign?: "left" | "right";
|
|
46
52
|
/** 是否显示必填标识 */
|
|
47
53
|
showRequired?: boolean;
|
|
54
|
+
/** 必填标识对齐方式 */
|
|
55
|
+
requiredAlign?: "left" | "right";
|
|
48
56
|
}
|
|
49
57
|
export interface FormContext {
|
|
50
58
|
/** 表单模型 */
|
|
@@ -63,6 +71,10 @@ export interface FormContext {
|
|
|
63
71
|
labelPosition?: Ref<"left" | "top">;
|
|
64
72
|
/** 表单项标签对齐方式 */
|
|
65
73
|
labelAlign?: Ref<"left" | "right" | undefined>;
|
|
74
|
+
/** 是否显示必填标识 */
|
|
75
|
+
showRequired?: Ref<boolean>;
|
|
76
|
+
/** 必填标识对齐方式 */
|
|
77
|
+
requiredAlign?: Ref<"left" | "right" | undefined>;
|
|
66
78
|
}
|
|
67
79
|
export declare const formContextKey: InjectionKey<FormContext>;
|
|
68
80
|
export interface FormItemValidateStatus {
|
|
@@ -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;
|
|
@@ -33,6 +32,8 @@ export declare const SRadioGroup: ((__VLS_props: NonNullable<Awaited<typeof __VL
|
|
|
33
32
|
props: PublicProps & {
|
|
34
33
|
vertical?: boolean | undefined;
|
|
35
34
|
button?: boolean | undefined;
|
|
35
|
+
block?: boolean | undefined;
|
|
36
|
+
size?: "mini" | "small" | "medium" | "large" | undefined;
|
|
36
37
|
modelValue?: string | number | boolean | undefined;
|
|
37
38
|
onChange?: ((value: string | number | boolean) => any) | undefined;
|
|
38
39
|
"onUpdate:modelValue"?: ((value: string | number | boolean) => any) | undefined;
|
package/dist/es/components/src/radio/radio-group.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
|
|
2
2
|
import "../../../hooks/index.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useFormItem as t } from "../form/use-form-item.mjs";
|
|
4
|
+
import { radioGroupContextKey as n } from "./types.mjs";
|
|
5
|
+
import { createSlot as r, defineVaporComponent as i, mergeModels as a, provide as o, renderEffect as s, setClass as c, setInsertionState as l, template as u, toRefs as d, unref as f, useModel as p } from "vue";
|
|
5
6
|
//#region ../components/src/radio/radio-group.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
6
|
-
var
|
|
7
|
+
var m = u("<div>", 1), h = /*@__PURE__*/ i({
|
|
7
8
|
name: "SRadioGroup",
|
|
8
9
|
__name: "radio-group",
|
|
9
|
-
props: /*@__PURE__*/
|
|
10
|
+
props: /*@__PURE__*/ a({
|
|
10
11
|
vertical: { type: Boolean },
|
|
11
|
-
button: { type: Boolean }
|
|
12
|
+
button: { type: Boolean },
|
|
13
|
+
block: { type: Boolean },
|
|
14
|
+
size: { default: "medium" }
|
|
12
15
|
}, {
|
|
13
16
|
modelValue: {
|
|
14
17
|
type: [
|
|
@@ -20,26 +23,28 @@ var p = l("<div>", 1), m = /*@__PURE__*/ r({
|
|
|
20
23
|
},
|
|
21
24
|
modelModifiers: {}
|
|
22
25
|
}),
|
|
23
|
-
emits: /*@__PURE__*/
|
|
24
|
-
setup(
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
}, { button:
|
|
28
|
-
|
|
29
|
-
checked:
|
|
30
|
-
checkedValue:
|
|
31
|
-
button:
|
|
26
|
+
emits: /*@__PURE__*/ a(["change"], ["update:modelValue"]),
|
|
27
|
+
setup(i, { emit: a }) {
|
|
28
|
+
let u = i, h = a, g = e("radio-group"), _ = p(i, "modelValue"), { size: v } = d(u), { mergedSize: y } = t({ size: v }), b = (e) => {
|
|
29
|
+
_.value = e, h("change", _.value);
|
|
30
|
+
}, { button: x } = d(u);
|
|
31
|
+
o(n, {
|
|
32
|
+
checked: b,
|
|
33
|
+
checkedValue: _,
|
|
34
|
+
button: x
|
|
32
35
|
});
|
|
33
|
-
let
|
|
34
|
-
return
|
|
35
|
-
let e =
|
|
36
|
-
|
|
36
|
+
let S = m();
|
|
37
|
+
return s(() => {
|
|
38
|
+
let e = f(g);
|
|
39
|
+
c(S, [
|
|
37
40
|
e.b(),
|
|
38
|
-
e.is("vertical",
|
|
39
|
-
e.is("button",
|
|
41
|
+
e.is("vertical", i.vertical),
|
|
42
|
+
e.is("button", f(x)),
|
|
43
|
+
e.is("block", i.block),
|
|
44
|
+
e.m(f(y))
|
|
40
45
|
]);
|
|
41
|
-
}),
|
|
46
|
+
}), l(S, null, 0), r(), S;
|
|
42
47
|
}
|
|
43
48
|
});
|
|
44
49
|
//#endregion
|
|
45
|
-
export {
|
|
50
|
+
export { h as default };
|
package/dist/es/components/src/radio/radio.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -13,7 +13,6 @@ var b = g("<span></span>"), x = g(" "), S = g("<span>"), C = g("<label><input ty
|
|
|
13
13
|
Number,
|
|
14
14
|
Boolean
|
|
15
15
|
] },
|
|
16
|
-
size: { default: "medium" },
|
|
17
16
|
disabled: { type: Boolean }
|
|
18
17
|
}, {
|
|
19
18
|
modelValue: {
|
|
@@ -32,16 +31,16 @@ var b = g("<span></span>"), x = g(" "), S = g("<span>"), C = g("<label><input ty
|
|
|
32
31
|
e.target.checked && (k.value = w.value), D?.checked(k.value), T("change", k.value, e);
|
|
33
32
|
}, M = C(), N = n(M);
|
|
34
33
|
return l(N, "change", j), u(() => {
|
|
35
|
-
let e = v(E), t = A.value;
|
|
34
|
+
let e = v(E), t = A.value, n = o.disabled;
|
|
36
35
|
d(M, [
|
|
37
36
|
e.b(),
|
|
38
|
-
e.m(o.size),
|
|
39
37
|
e.is("checked", t),
|
|
40
|
-
e.is("button", O.value)
|
|
41
|
-
|
|
38
|
+
e.is("button", O.value),
|
|
39
|
+
e.is("disabled", n)
|
|
40
|
+
]), d(N, [e.e("input")]), h(N, o.value), p(N, "checked", t), p(N, "disabled", n);
|
|
42
41
|
}), f(M, null, 1), i(() => !g.check, () => {
|
|
43
42
|
let e = b();
|
|
44
|
-
return u(() => d(e, [v(E).e("inner")])), [e, i(() => o.label, () => {
|
|
43
|
+
return u(() => d(e, [v(E).e("inner")])), [e, i(() => o.label || g.default, () => {
|
|
45
44
|
let e = S();
|
|
46
45
|
return u(() => d(e, [v(E).e("label")])), f(e, null, 0), a("default", null, () => {
|
|
47
46
|
let e = x();
|
|
@@ -4,8 +4,6 @@ export interface RadioProps {
|
|
|
4
4
|
label?: string;
|
|
5
5
|
/** 单选框值 */
|
|
6
6
|
value: string | number | boolean;
|
|
7
|
-
/** 大小 */
|
|
8
|
-
size?: "mini" | "small" | "medium" | "large";
|
|
9
7
|
/** 是否禁用 */
|
|
10
8
|
disabled?: boolean;
|
|
11
9
|
}
|
|
@@ -26,6 +24,10 @@ export interface RadioGroupProps {
|
|
|
26
24
|
vertical?: boolean;
|
|
27
25
|
/** 是否按钮 */
|
|
28
26
|
button?: boolean;
|
|
27
|
+
/** 是否块级元素,占满父元素宽度 */
|
|
28
|
+
block?: boolean;
|
|
29
|
+
/** 大小 */
|
|
30
|
+
size?: "mini" | "small" | "medium" | "large";
|
|
29
31
|
}
|
|
30
32
|
export interface RadioGroupEmits {
|
|
31
33
|
/** 选中状态变化时触发 */
|
|
@@ -15,6 +15,7 @@ export declare const STabs: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setu
|
|
|
15
15
|
bordered?: boolean | undefined;
|
|
16
16
|
showArrow?: boolean | undefined;
|
|
17
17
|
showHeader?: boolean | undefined;
|
|
18
|
+
block?: boolean | undefined;
|
|
18
19
|
onChange?: ((value: string | number) => any) | undefined;
|
|
19
20
|
onRemove?: ((value: string | number) => any) | undefined;
|
|
20
21
|
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
@@ -24,7 +24,8 @@ var pe = 200, me = 40, A = /*@__PURE__*/ d({
|
|
|
24
24
|
showHeader: {
|
|
25
25
|
type: Boolean,
|
|
26
26
|
default: !0
|
|
27
|
-
}
|
|
27
|
+
},
|
|
28
|
+
block: { type: Boolean }
|
|
28
29
|
}, {
|
|
29
30
|
modelValue: { default: "" },
|
|
30
31
|
modelModifiers: {}
|
|
@@ -44,24 +45,26 @@ var pe = 200, me = 40, A = /*@__PURE__*/ d({
|
|
|
44
45
|
let n = H.get(e);
|
|
45
46
|
n && t.replaceChildren(n);
|
|
46
47
|
}, W = o(() => {
|
|
47
|
-
let e = he.default?.() || []
|
|
48
|
+
let e = [], t = he.default?.() || [];
|
|
49
|
+
e = Array.isArray(t) ? t : [t];
|
|
50
|
+
let n = [], r = /* @__PURE__ */ new Set();
|
|
48
51
|
return ((e) => {
|
|
49
52
|
e.forEach((e) => {
|
|
50
|
-
if (ge(e)) {
|
|
51
|
-
let
|
|
52
|
-
if (i == null ||
|
|
53
|
-
|
|
54
|
-
let a =
|
|
55
|
-
|
|
53
|
+
if (e.vapor && ge(e)) {
|
|
54
|
+
let t = e.rawProps || {}, i = t.name;
|
|
55
|
+
if (i == null || r.has(i)) return;
|
|
56
|
+
r.add(i);
|
|
57
|
+
let a = t.label, o = _e(e) ? "tab-pane" : "tab";
|
|
58
|
+
n.push({
|
|
56
59
|
name: i,
|
|
57
60
|
label: a,
|
|
58
|
-
disabled: !!
|
|
59
|
-
closeable:
|
|
61
|
+
disabled: !!t.disabled,
|
|
62
|
+
closeable: t.closeable,
|
|
60
63
|
type: o
|
|
61
64
|
});
|
|
62
65
|
}
|
|
63
66
|
});
|
|
64
|
-
})(e),
|
|
67
|
+
})(e), n;
|
|
65
68
|
}), be = o(() => W.value.some((e) => e.type === "tab-pane")), xe = o(() => ({
|
|
66
69
|
left: `${F.value}px`,
|
|
67
70
|
width: `${I.value}px`
|
|
@@ -162,7 +165,8 @@ var pe = 200, me = 40, A = /*@__PURE__*/ d({
|
|
|
162
165
|
b(n, [
|
|
163
166
|
t.e("item"),
|
|
164
167
|
t.is("active", M.value === r.name),
|
|
165
|
-
t.is("disabled", r.disabled)
|
|
168
|
+
t.is("disabled", r.disabled),
|
|
169
|
+
t.is("block", d.block)
|
|
166
170
|
]);
|
|
167
171
|
}), x(n, null, 0), c(() => e.value.label, () => {
|
|
168
172
|
let t = ue(), n = oe(t);
|
|
@@ -43,7 +43,15 @@ var I = /*@__PURE__*/ p({
|
|
|
43
43
|
if (!t || typeof ResizeObserver > "u") return;
|
|
44
44
|
z();
|
|
45
45
|
let n = new ResizeObserver(z);
|
|
46
|
-
n.observe(t)
|
|
46
|
+
n.observe(t);
|
|
47
|
+
let r = typeof MutationObserver < "u" ? new MutationObserver(z) : void 0;
|
|
48
|
+
r?.observe(t, {
|
|
49
|
+
characterData: !0,
|
|
50
|
+
childList: !0,
|
|
51
|
+
subtree: !0
|
|
52
|
+
}), e(() => {
|
|
53
|
+
n.disconnect(), r?.disconnect();
|
|
54
|
+
});
|
|
47
55
|
}), k(() => [
|
|
48
56
|
m.label,
|
|
49
57
|
m.ellipsis,
|
|
@@ -6,6 +6,17 @@
|
|
|
6
6
|
display: flex;
|
|
7
7
|
flex-direction: column;
|
|
8
8
|
width: 100%;
|
|
9
|
+
border-radius: getCssVar("radius", "medium");
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
|
|
12
|
+
@include when(border) {
|
|
13
|
+
border: 1px solid getCssVar("color", "fill-3");
|
|
14
|
+
@include be(collapse, item) {
|
|
15
|
+
&:last-child {
|
|
16
|
+
border-bottom: none;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
9
20
|
|
|
10
21
|
@include e(item) {
|
|
11
22
|
border-bottom: 1px solid getCssVar("color", "fill-3");
|
|
@@ -30,7 +41,7 @@
|
|
|
30
41
|
display: flex;
|
|
31
42
|
align-items: center;
|
|
32
43
|
justify-content: space-between;
|
|
33
|
-
padding: 12px
|
|
44
|
+
padding: 12px 16px;
|
|
34
45
|
cursor: pointer;
|
|
35
46
|
font-size: 14px;
|
|
36
47
|
color: getCssVar("color", "text-1");
|
|
@@ -32,6 +32,10 @@
|
|
|
32
32
|
background-color: getCssVar("color", "fill-2");
|
|
33
33
|
border-color: getCssVar("color", "fill-2");
|
|
34
34
|
cursor: not-allowed;
|
|
35
|
+
&:hover {
|
|
36
|
+
background-color: getCssVar("color", "fill-2");
|
|
37
|
+
border-color: getCssVar("color", "fill-2");
|
|
38
|
+
}
|
|
35
39
|
}
|
|
36
40
|
@include when(error) {
|
|
37
41
|
@include this-be(date-picker, wrapper) {
|
|
@@ -32,6 +32,10 @@
|
|
|
32
32
|
background-color: getCssVar("color", "fill-2");
|
|
33
33
|
border-color: getCssVar("color", "fill-2");
|
|
34
34
|
cursor: not-allowed;
|
|
35
|
+
&:hover {
|
|
36
|
+
background-color: getCssVar("color", "fill-2");
|
|
37
|
+
border-color: getCssVar("color", "fill-2");
|
|
38
|
+
}
|
|
35
39
|
}
|
|
36
40
|
@include when(error) {
|
|
37
41
|
@include this-be(datetime-picker, wrapper) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@use "../mixins/function.scss" as *;
|
|
2
2
|
@use "../mixins/mixins.scss" as *;
|
|
3
|
+
@use "../common/var.scss" as *;
|
|
3
4
|
|
|
4
5
|
@include b(form) {
|
|
5
6
|
width: 100%;
|
|
@@ -20,30 +21,18 @@
|
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
|
|
23
|
-
@
|
|
24
|
-
@include
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
@include m(small) {
|
|
30
|
-
@include be(form-item, label-wrapper) {
|
|
31
|
-
line-height: getCssVar("size", "small");
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
@include m(medium) {
|
|
35
|
-
@include be(form-item, label-wrapper) {
|
|
36
|
-
line-height: getCssVar("size", "medium");
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
@include m(large) {
|
|
40
|
-
@include be(form-item, label-wrapper) {
|
|
41
|
-
line-height: getCssVar("size", "large");
|
|
24
|
+
@each $size in $size-list {
|
|
25
|
+
@include m(#{$size}) {
|
|
26
|
+
@include be(form-item, label-wrapper) {
|
|
27
|
+
line-height: getCssVar("size", "#{$size}");
|
|
28
|
+
font-size: getCssVar("font-size", "#{$size}");
|
|
29
|
+
}
|
|
42
30
|
}
|
|
43
31
|
}
|
|
44
32
|
@include e(label-wrapper) {
|
|
45
33
|
display: flex;
|
|
46
34
|
align-items: flex-start;
|
|
35
|
+
line-height: getCssVar("size", "medium");
|
|
47
36
|
}
|
|
48
37
|
@include e(label) {
|
|
49
38
|
display: flex;
|
|
@@ -70,6 +59,9 @@
|
|
|
70
59
|
font-size: getCssVar("font-size", "medium");
|
|
71
60
|
height: 14px;
|
|
72
61
|
color: getCssVar("color", "text-3");
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
justify-content: center;
|
|
73
65
|
}
|
|
74
66
|
|
|
75
67
|
@include e(content-wrapper) {
|
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
background-color: getCssVar("color", "fill-2");
|
|
23
23
|
border-color: getCssVar("color", "fill-2");
|
|
24
24
|
cursor: not-allowed;
|
|
25
|
+
&:hover {
|
|
26
|
+
background-color: getCssVar("color", "fill-2");
|
|
27
|
+
border-color: getCssVar("color", "fill-2");
|
|
28
|
+
}
|
|
25
29
|
}
|
|
26
30
|
@include when(error) {
|
|
27
31
|
@include this-be(input-number, wrapper) {
|
|
@@ -25,6 +25,10 @@
|
|
|
25
25
|
background-color: getCssVar("color", "fill-2");
|
|
26
26
|
border-color: getCssVar("color", "fill-2");
|
|
27
27
|
cursor: not-allowed;
|
|
28
|
+
&:hover {
|
|
29
|
+
background-color: getCssVar("color", "fill-2");
|
|
30
|
+
border-color: getCssVar("color", "fill-2");
|
|
31
|
+
}
|
|
28
32
|
}
|
|
29
33
|
@include when(error) {
|
|
30
34
|
@include this-be(input-tag, wrapper) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
@use "../mixins/function.scss" as *;
|
|
2
2
|
@use "../mixins/mixins.scss" as *;
|
|
3
|
+
@use "../common/var.scss" as *;
|
|
3
4
|
|
|
4
5
|
@include b(radio) {
|
|
5
|
-
color: getCssVar("color", "text-1");
|
|
6
6
|
position: relative;
|
|
7
7
|
cursor: pointer;
|
|
8
8
|
display: inline-flex;
|
|
@@ -19,6 +19,19 @@
|
|
|
19
19
|
border-color: getCssVar("color", "primary-6");
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
+
@include when(disabled) {
|
|
23
|
+
cursor: not-allowed;
|
|
24
|
+
@include be(radio, inner) {
|
|
25
|
+
cursor: not-allowed;
|
|
26
|
+
border-color: getCssVar("color", "fill-2");
|
|
27
|
+
&:hover {
|
|
28
|
+
border-color: getCssVar("color", "fill-2");
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
@include be(radio, label) {
|
|
32
|
+
color: getCssVar("color", "text-2");
|
|
33
|
+
}
|
|
34
|
+
}
|
|
22
35
|
@include e(input) {
|
|
23
36
|
opacity: 0;
|
|
24
37
|
outline: none;
|
|
@@ -84,6 +97,7 @@
|
|
|
84
97
|
padding: 0 12px;
|
|
85
98
|
line-height: getCssVar("line-height", "medium");
|
|
86
99
|
border-radius: calc(getCssVar("radius", "medium") - 1px);
|
|
100
|
+
color: getCssVar("color", "text-1");
|
|
87
101
|
&:hover {
|
|
88
102
|
background-color: getCssVar("color", "bg-3");
|
|
89
103
|
}
|
|
@@ -109,8 +123,32 @@
|
|
|
109
123
|
@include when(button) {
|
|
110
124
|
background-color: getCssVar("color", "fill-2");
|
|
111
125
|
padding: 3px;
|
|
112
|
-
height: getCssVar("size", "medium");
|
|
113
126
|
gap: 3px;
|
|
114
127
|
border-radius: getCssVar("radius", "medium");
|
|
115
128
|
}
|
|
129
|
+
|
|
130
|
+
@include when(block) {
|
|
131
|
+
width: 100%;
|
|
132
|
+
|
|
133
|
+
@include child-b(radio) {
|
|
134
|
+
flex: 1;
|
|
135
|
+
justify-content: center;
|
|
136
|
+
@include be(radio, label) {
|
|
137
|
+
width: 100%;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@each $size in $size-list {
|
|
143
|
+
@include m(#{$size}) {
|
|
144
|
+
@include when(button) {
|
|
145
|
+
height: getCssVar("size", $size);
|
|
146
|
+
@include child-b(radio) {
|
|
147
|
+
@include be(radio, label) {
|
|
148
|
+
font-size: getCssVar("font-size", $size);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
116
154
|
}
|
|
@@ -9,17 +9,17 @@
|
|
|
9
9
|
flex-direction: column;
|
|
10
10
|
overflow: hidden;
|
|
11
11
|
@include m(small) {
|
|
12
|
-
@include be(tabs,
|
|
12
|
+
@include be(tabs, header) {
|
|
13
13
|
height: 32px;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
@include m(medium) {
|
|
17
|
-
@include be(tabs,
|
|
17
|
+
@include be(tabs, header) {
|
|
18
18
|
height: 36px;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
@include m(large) {
|
|
22
|
-
@include be(tabs,
|
|
22
|
+
@include be(tabs, header) {
|
|
23
23
|
height: 40px;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -108,6 +108,7 @@
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
@include e(item) {
|
|
111
|
+
height: 100%;
|
|
111
112
|
padding: 0 16px;
|
|
112
113
|
display: flex;
|
|
113
114
|
align-items: center;
|
|
@@ -136,6 +137,10 @@
|
|
|
136
137
|
color: getCssVar("color", "text-3");
|
|
137
138
|
}
|
|
138
139
|
}
|
|
140
|
+
|
|
141
|
+
@include when(block) {
|
|
142
|
+
flex: 1;
|
|
143
|
+
}
|
|
139
144
|
}
|
|
140
145
|
|
|
141
146
|
@include e(close-btn) {
|
|
@@ -31,6 +31,10 @@
|
|
|
31
31
|
background-color: getCssVar("color", "fill-2");
|
|
32
32
|
border-color: getCssVar("color", "fill-2");
|
|
33
33
|
cursor: not-allowed;
|
|
34
|
+
&:hover {
|
|
35
|
+
background-color: getCssVar("color", "fill-2");
|
|
36
|
+
border-color: getCssVar("color", "fill-2");
|
|
37
|
+
}
|
|
34
38
|
}
|
|
35
39
|
@include when(error) {
|
|
36
40
|
border-color: getCssVar("color", "danger-6");
|
|
@@ -12,6 +12,18 @@
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* 当前元素的直接子级 b
|
|
17
|
+
* @usage @include child-b(button) {}
|
|
18
|
+
* @output > .ns-button {}
|
|
19
|
+
*/
|
|
20
|
+
@mixin child-b($block) {
|
|
21
|
+
$sel: #{$namespace}#{$common-separator}#{$block};
|
|
22
|
+
> .#{$sel} {
|
|
23
|
+
@content;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
15
27
|
/**
|
|
16
28
|
* BEM 元素
|
|
17
29
|
* @param {String | List} $element 元素名称
|
|
@@ -788,6 +788,13 @@
|
|
|
788
788
|
"s-form/labelAlign": {
|
|
789
789
|
"description": "表单项标签对齐方式"
|
|
790
790
|
},
|
|
791
|
+
"s-form/showRequired": {
|
|
792
|
+
"description": "是否显示必填标识",
|
|
793
|
+
"type": "boolean"
|
|
794
|
+
},
|
|
795
|
+
"s-form/requiredAlign": {
|
|
796
|
+
"description": "必填标识对齐方式"
|
|
797
|
+
},
|
|
791
798
|
"s-form-item/label": {
|
|
792
799
|
"description": "表单项标签",
|
|
793
800
|
"type": "string"
|
|
@@ -807,6 +814,9 @@
|
|
|
807
814
|
"description": "表单项提示",
|
|
808
815
|
"type": "string"
|
|
809
816
|
},
|
|
817
|
+
"s-form-item/labelPosition": {
|
|
818
|
+
"description": "表单项标签位置"
|
|
819
|
+
},
|
|
810
820
|
"s-form-item/labelAlign": {
|
|
811
821
|
"description": "表单项标签对齐方式"
|
|
812
822
|
},
|
|
@@ -814,6 +824,9 @@
|
|
|
814
824
|
"description": "是否显示必填标识",
|
|
815
825
|
"type": "boolean"
|
|
816
826
|
},
|
|
827
|
+
"s-form-item/requiredAlign": {
|
|
828
|
+
"description": "必填标识对齐方式"
|
|
829
|
+
},
|
|
817
830
|
"s-galleria/modelValue": {
|
|
818
831
|
"description": "当前选中项索引(v-model)",
|
|
819
832
|
"type": "number"
|
|
@@ -1731,9 +1744,6 @@
|
|
|
1731
1744
|
"description": "单选框值",
|
|
1732
1745
|
"type": "string | number | boolean"
|
|
1733
1746
|
},
|
|
1734
|
-
"s-radio/size": {
|
|
1735
|
-
"description": "大小"
|
|
1736
|
-
},
|
|
1737
1747
|
"s-radio/disabled": {
|
|
1738
1748
|
"description": "是否禁用",
|
|
1739
1749
|
"type": "boolean"
|
|
@@ -1749,6 +1759,13 @@
|
|
|
1749
1759
|
"description": "是否按钮",
|
|
1750
1760
|
"type": "boolean"
|
|
1751
1761
|
},
|
|
1762
|
+
"s-radio-group/block": {
|
|
1763
|
+
"description": "是否块级元素,占满父元素宽度",
|
|
1764
|
+
"type": "boolean"
|
|
1765
|
+
},
|
|
1766
|
+
"s-radio-group/size": {
|
|
1767
|
+
"description": "大小"
|
|
1768
|
+
},
|
|
1752
1769
|
"s-scrollbar/scroll": {
|
|
1753
1770
|
"description": "滚动事件"
|
|
1754
1771
|
},
|
|
@@ -2299,6 +2316,10 @@
|
|
|
2299
2316
|
"description": "是否隐藏标题栏",
|
|
2300
2317
|
"type": "boolean"
|
|
2301
2318
|
},
|
|
2319
|
+
"s-tabs/block": {
|
|
2320
|
+
"description": "是否块级元素,占满父元素宽度",
|
|
2321
|
+
"type": "boolean"
|
|
2322
|
+
},
|
|
2302
2323
|
"s-tab-pane/name": {
|
|
2303
2324
|
"description": "选项卡名称",
|
|
2304
2325
|
"type": "string | number"
|
|
@@ -349,7 +349,9 @@
|
|
|
349
349
|
"size",
|
|
350
350
|
"labelWidth",
|
|
351
351
|
"labelPosition",
|
|
352
|
-
"labelAlign"
|
|
352
|
+
"labelAlign",
|
|
353
|
+
"showRequired",
|
|
354
|
+
"requiredAlign"
|
|
353
355
|
]
|
|
354
356
|
},
|
|
355
357
|
"s-form-item": {
|
|
@@ -359,8 +361,10 @@
|
|
|
359
361
|
"rules",
|
|
360
362
|
"labelWidth",
|
|
361
363
|
"tooltip",
|
|
364
|
+
"labelPosition",
|
|
362
365
|
"labelAlign",
|
|
363
|
-
"showRequired"
|
|
366
|
+
"showRequired",
|
|
367
|
+
"requiredAlign"
|
|
364
368
|
]
|
|
365
369
|
},
|
|
366
370
|
"s-galleria": {
|
|
@@ -735,7 +739,6 @@
|
|
|
735
739
|
"change",
|
|
736
740
|
"label",
|
|
737
741
|
"value",
|
|
738
|
-
"size",
|
|
739
742
|
"disabled"
|
|
740
743
|
]
|
|
741
744
|
},
|
|
@@ -743,7 +746,9 @@
|
|
|
743
746
|
"attributes": [
|
|
744
747
|
"change",
|
|
745
748
|
"vertical",
|
|
746
|
-
"button"
|
|
749
|
+
"button",
|
|
750
|
+
"block",
|
|
751
|
+
"size"
|
|
747
752
|
]
|
|
748
753
|
},
|
|
749
754
|
"s-scrollbar": {
|
|
@@ -957,7 +962,8 @@
|
|
|
957
962
|
"closeable",
|
|
958
963
|
"bordered",
|
|
959
964
|
"showArrow",
|
|
960
|
-
"showHeader"
|
|
965
|
+
"showHeader",
|
|
966
|
+
"block"
|
|
961
967
|
]
|
|
962
968
|
},
|
|
963
969
|
"s-tab-pane": {
|
package/dist/json/web-types.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
4
|
"name": "savor-ui",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.14.0",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"types-syntax": "typescript",
|
|
@@ -2129,6 +2129,22 @@
|
|
|
2129
2129
|
"type": "left | right",
|
|
2130
2130
|
"kind": "expression"
|
|
2131
2131
|
}
|
|
2132
|
+
},
|
|
2133
|
+
{
|
|
2134
|
+
"name": "showRequired",
|
|
2135
|
+
"description": "是否显示必填标识",
|
|
2136
|
+
"value": {
|
|
2137
|
+
"type": "boolean",
|
|
2138
|
+
"kind": "expression"
|
|
2139
|
+
}
|
|
2140
|
+
},
|
|
2141
|
+
{
|
|
2142
|
+
"name": "requiredAlign",
|
|
2143
|
+
"description": "必填标识对齐方式",
|
|
2144
|
+
"value": {
|
|
2145
|
+
"type": "left | right",
|
|
2146
|
+
"kind": "expression"
|
|
2147
|
+
}
|
|
2132
2148
|
}
|
|
2133
2149
|
],
|
|
2134
2150
|
"events": [
|
|
@@ -2182,6 +2198,14 @@
|
|
|
2182
2198
|
"kind": "expression"
|
|
2183
2199
|
}
|
|
2184
2200
|
},
|
|
2201
|
+
{
|
|
2202
|
+
"name": "labelPosition",
|
|
2203
|
+
"description": "表单项标签位置",
|
|
2204
|
+
"value": {
|
|
2205
|
+
"type": "left | top",
|
|
2206
|
+
"kind": "expression"
|
|
2207
|
+
}
|
|
2208
|
+
},
|
|
2185
2209
|
{
|
|
2186
2210
|
"name": "labelAlign",
|
|
2187
2211
|
"description": "表单项标签对齐方式",
|
|
@@ -2197,6 +2221,14 @@
|
|
|
2197
2221
|
"type": "boolean",
|
|
2198
2222
|
"kind": "expression"
|
|
2199
2223
|
}
|
|
2224
|
+
},
|
|
2225
|
+
{
|
|
2226
|
+
"name": "requiredAlign",
|
|
2227
|
+
"description": "必填标识对齐方式",
|
|
2228
|
+
"value": {
|
|
2229
|
+
"type": "left | right",
|
|
2230
|
+
"kind": "expression"
|
|
2231
|
+
}
|
|
2200
2232
|
}
|
|
2201
2233
|
],
|
|
2202
2234
|
"events": [],
|
|
@@ -4534,14 +4566,6 @@
|
|
|
4534
4566
|
"kind": "expression"
|
|
4535
4567
|
}
|
|
4536
4568
|
},
|
|
4537
|
-
{
|
|
4538
|
-
"name": "size",
|
|
4539
|
-
"description": "大小",
|
|
4540
|
-
"value": {
|
|
4541
|
-
"type": "mini | small | medium | large",
|
|
4542
|
-
"kind": "expression"
|
|
4543
|
-
}
|
|
4544
|
-
},
|
|
4545
4569
|
{
|
|
4546
4570
|
"name": "disabled",
|
|
4547
4571
|
"description": "是否禁用",
|
|
@@ -4586,6 +4610,22 @@
|
|
|
4586
4610
|
"type": "boolean",
|
|
4587
4611
|
"kind": "expression"
|
|
4588
4612
|
}
|
|
4613
|
+
},
|
|
4614
|
+
{
|
|
4615
|
+
"name": "block",
|
|
4616
|
+
"description": "是否块级元素,占满父元素宽度",
|
|
4617
|
+
"value": {
|
|
4618
|
+
"type": "boolean",
|
|
4619
|
+
"kind": "expression"
|
|
4620
|
+
}
|
|
4621
|
+
},
|
|
4622
|
+
{
|
|
4623
|
+
"name": "size",
|
|
4624
|
+
"description": "大小",
|
|
4625
|
+
"value": {
|
|
4626
|
+
"type": "mini | small | medium | large",
|
|
4627
|
+
"kind": "expression"
|
|
4628
|
+
}
|
|
4589
4629
|
}
|
|
4590
4630
|
],
|
|
4591
4631
|
"events": [
|
|
@@ -5907,6 +5947,14 @@
|
|
|
5907
5947
|
"type": "boolean",
|
|
5908
5948
|
"kind": "expression"
|
|
5909
5949
|
}
|
|
5950
|
+
},
|
|
5951
|
+
{
|
|
5952
|
+
"name": "block",
|
|
5953
|
+
"description": "是否块级元素,占满父元素宽度",
|
|
5954
|
+
"value": {
|
|
5955
|
+
"type": "boolean",
|
|
5956
|
+
"kind": "expression"
|
|
5957
|
+
}
|
|
5910
5958
|
}
|
|
5911
5959
|
],
|
|
5912
5960
|
"events": [
|