savor-ui 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/es/components/src/button/button.vue_vue_type_script_setup_true_vapor_true_lang.mjs +4 -2
- package/dist/es/components/src/button/index.d.ts +1 -0
- package/dist/es/components/src/button/types.d.ts +2 -0
- package/dist/es/components/src/form/form-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +2 -2
- package/dist/es/components/src/segmented/segmented.vue_vue_type_script_setup_true_vapor_true_lang.mjs +8 -1
- package/dist/es/components/src/switch/switch.vue_vue_type_script_setup_true_vapor_true_lang.mjs +9 -9
- package/dist/es/components/src/table/table-body.vue_vue_type_script_setup_true_vapor_true_lang.mjs +68 -70
- package/dist/es/theme/components/button.scss +3 -0
- package/dist/es/theme/components/switch.scss +8 -9
- package/dist/es/theme/components/table.scss +1 -0
- package/dist/es/theme/components/tag.scss +1 -0
- package/dist/es/theme/components/tree.scss +1 -0
- package/dist/es/utils/src/theme/themeMap.mjs +5 -5
- package/dist/es/utils/src/tool.d.ts +7 -0
- package/dist/es/utils/src/tool.mjs +11 -2
- package/dist/json/vetur-attributes.json +4 -0
- package/dist/json/vetur-tags.json +2 -1
- package/dist/json/web-types.json +9 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
# [0.10.0](https://gitee.com/mach552/savor-ui/compare/v0.9.0...v0.10.0) (2026-07-09)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **form:** 修复某些情况下无法重置的问题 ([c66f3ea](https://gitee.com/mach552/savor-ui/commits/c66f3ea835e89e68ce85875403561ba844215d6c))
|
|
11
|
+
* **segmented:** 修复默认激活条偶发宽度不足问题 ([0b3dab9](https://gitee.com/mach552/savor-ui/commits/0b3dab94b93b3a79a94066367bb8822e1cfa9613))
|
|
12
|
+
* **segmented:** 修复无默认值问题 ([33bd3c6](https://gitee.com/mach552/savor-ui/commits/33bd3c6d8c6f5a7c8e3c66a4660f2b00aa803127))
|
|
13
|
+
* **switch:** 修复大小与其他组件不一致问题 ([a805e12](https://gitee.com/mach552/savor-ui/commits/a805e122f1fb2b20c38af0d50575aba1694c290d))
|
|
14
|
+
* **switch:** 修复默认值是undefined问题 ([81b963c](https://gitee.com/mach552/savor-ui/commits/81b963c5f17224d4fcc99da9d37f30e69b3dc0a4))
|
|
15
|
+
* **table:** 修复列字段无法读取嵌套对象值的问题 ([2a8842c](https://gitee.com/mach552/savor-ui/commits/2a8842c0b2a17aa8c6683368bb094e61d19f642b))
|
|
16
|
+
* **table:** 修复某些场景下表头比弹层层级高的问题 ([81c836a](https://gitee.com/mach552/savor-ui/commits/81c836a97146017e469f4b79f1857a2c9dc67a06))
|
|
17
|
+
* **tag:** 修复文字换行问题 ([a1c0d94](https://gitee.com/mach552/savor-ui/commits/a1c0d94984fe7d92f5e93534b2071f89b25065aa))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **button:** 新增圆角按钮 ([75d5c6e](https://gitee.com/mach552/savor-ui/commits/75d5c6e96a0b7bef6b30a30edd8be02b608947cb))
|
|
23
|
+
|
|
5
24
|
# [0.9.0](https://gitee.com/mach552/savor-ui/compare/v0.8.0...v0.9.0) (2026-07-07)
|
|
6
25
|
|
|
7
26
|
|
package/dist/es/components/src/button/button.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -21,7 +21,8 @@ var y = g("<div>"), b = g(" "), x = g("<button>", 1), S = /*@__PURE__*/ c({
|
|
|
21
21
|
text: { type: Boolean },
|
|
22
22
|
link: { type: Boolean },
|
|
23
23
|
secondary: { type: Boolean },
|
|
24
|
-
outline: { type: Boolean }
|
|
24
|
+
outline: { type: Boolean },
|
|
25
|
+
round: { type: Boolean }
|
|
25
26
|
},
|
|
26
27
|
setup(c, { slots: g }) {
|
|
27
28
|
let S = c, C = e("button"), w = l(n, void 0), T = r(() => w?.size?.value || S.size), E = x();
|
|
@@ -39,7 +40,8 @@ var y = g("<div>"), b = g(" "), x = g("<button>", 1), S = /*@__PURE__*/ c({
|
|
|
39
40
|
e.is("disabled", t),
|
|
40
41
|
e.is("loading", n),
|
|
41
42
|
e.is("only-icon", !g.default && !c.label),
|
|
42
|
-
e.is("outline", c.outline)
|
|
43
|
+
e.is("outline", c.outline),
|
|
44
|
+
e.is("round", c.round)
|
|
43
45
|
]), m(E, "disabled", t || n), d(E, "html-type", c.htmlType);
|
|
44
46
|
}), p(E, null, 0), o(() => (g.icon || c.icon) && !c.loading, () => {
|
|
45
47
|
let e = y();
|
|
@@ -19,6 +19,7 @@ export declare const SButton: ((__VLS_props: NonNullable<Awaited<typeof __VLS_se
|
|
|
19
19
|
link?: boolean | undefined;
|
|
20
20
|
secondary?: boolean | undefined;
|
|
21
21
|
outline?: boolean | undefined;
|
|
22
|
+
round?: boolean | undefined;
|
|
22
23
|
} & (typeof globalThis extends {
|
|
23
24
|
__VLS_PROPS_FALLBACK: infer P;
|
|
24
25
|
} ? P : {});
|
package/dist/es/components/src/form/form-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -58,7 +58,7 @@ var k = w("<span>"), A = w(" "), j = w("<div><label>"), M = w("<div> "), N = w("
|
|
|
58
58
|
}, q = () => {
|
|
59
59
|
K();
|
|
60
60
|
let e = I?.model?.value;
|
|
61
|
-
e && P.field &&
|
|
61
|
+
e && P.field && (e[P.field] = z);
|
|
62
62
|
}, J = l(() => H.value.state === "error"), Y = {
|
|
63
63
|
validate: G,
|
|
64
64
|
field: P.field,
|
|
@@ -69,7 +69,7 @@ var k = w("<span>"), A = w(" "), j = w("<div><label>"), M = w("<div> "), N = w("
|
|
|
69
69
|
size: I?.size,
|
|
70
70
|
error: J
|
|
71
71
|
}), h(() => {
|
|
72
|
-
P.field && (I?.addField(Y), z =
|
|
72
|
+
P.field && (I?.addField(Y), z = I?.model?.value?.[P.field]);
|
|
73
73
|
}), g(() => {
|
|
74
74
|
P.field && I?.removeField(Y);
|
|
75
75
|
}), w({
|
|
@@ -45,8 +45,15 @@ var O = /*@__PURE__*/ c({
|
|
|
45
45
|
}
|
|
46
46
|
}), t(F, () => {
|
|
47
47
|
requestAnimationFrame(L);
|
|
48
|
+
}), w((e) => {
|
|
49
|
+
let t = j.value[M.value];
|
|
50
|
+
if (!t) return;
|
|
51
|
+
let n = new ResizeObserver(() => {
|
|
52
|
+
requestAnimationFrame(L);
|
|
53
|
+
});
|
|
54
|
+
n.observe(t), e(() => n.disconnect());
|
|
48
55
|
}), d(() => {
|
|
49
|
-
requestAnimationFrame(L);
|
|
56
|
+
A.value === void 0 && y.options.length > 0 && (A.value = y.options[0][y.fieldNames.value]), requestAnimationFrame(L);
|
|
50
57
|
});
|
|
51
58
|
let z = s(), B = D(), V = n(B);
|
|
52
59
|
return p(() => {
|
package/dist/es/components/src/switch/switch.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -52,10 +52,10 @@ var M = /*@__PURE__*/ c({
|
|
|
52
52
|
}),
|
|
53
53
|
emits: /*@__PURE__*/ u(["change"], ["update:modelValue"]),
|
|
54
54
|
setup(c, { emit: l }) {
|
|
55
|
-
let u = c, x = l, { size:
|
|
56
|
-
size:
|
|
57
|
-
error:
|
|
58
|
-
}),
|
|
55
|
+
let u = c, x = l, M = e("switch"), { size: N, error: P } = C(u), { mergedSize: F, mergedError: I } = t({
|
|
56
|
+
size: N,
|
|
57
|
+
error: P
|
|
58
|
+
}), L = E(c, "modelValue"), R = D("inputRef"), z = m(!1), B = r(() => L.value === u.activeValue), V = async () => {
|
|
59
59
|
if (u.disabled) return;
|
|
60
60
|
let e = B.value ? u.inactiveValue : u.activeValue;
|
|
61
61
|
if (u.beforeChange) try {
|
|
@@ -66,20 +66,20 @@ var M = /*@__PURE__*/ c({
|
|
|
66
66
|
z.value = !z.value, L.value = e, x("change", e);
|
|
67
67
|
};
|
|
68
68
|
p(() => {
|
|
69
|
-
R.value.checked = B.value, z.value = B.value;
|
|
69
|
+
L.value === void 0 && (L.value = u.inactiveValue), R.value.checked = B.value, z.value = B.value;
|
|
70
70
|
}), O(B, (e) => {
|
|
71
71
|
R.value.checked = e;
|
|
72
72
|
});
|
|
73
73
|
let H = s(), U = j(), W = n(U), G = d(W, 1), K = n(G), q = d(K, 1);
|
|
74
74
|
return f(W, "keypress", k(V, ["enter"])), H(W, R, null, "inputRef"), h(() => {
|
|
75
|
-
let e = T(
|
|
75
|
+
let e = T(M), t = B.value, n = c.disabled, r = c.activeColor, i = c.inactiveColor;
|
|
76
76
|
g(U, [
|
|
77
77
|
e.b(),
|
|
78
|
-
e.m(T(
|
|
78
|
+
e.m(T(F)),
|
|
79
79
|
e.is("checked", t),
|
|
80
80
|
e.is("disabled", n),
|
|
81
81
|
e.is("circle", c.circle),
|
|
82
|
-
e.is("error", T(
|
|
82
|
+
e.is("error", T(I))
|
|
83
83
|
]), g(W, [e.e("inner")]), v(W, "disabled", n), g(G, [e.e("core")]), y(G, {
|
|
84
84
|
backgroundColor: t ? r : i,
|
|
85
85
|
borderColor: t ? r : i
|
|
@@ -87,7 +87,7 @@ var M = /*@__PURE__*/ c({
|
|
|
87
87
|
}), _(K, null, 0), i(() => c.activeText || c.inactiveText, () => {
|
|
88
88
|
let e = A(), t = w(e);
|
|
89
89
|
return h(() => b(t, S(B.value ? c.activeText : c.inactiveText))), e;
|
|
90
|
-
}), h(() => g(q, [T(
|
|
90
|
+
}), h(() => g(q, [T(M).e("core-action")])), _(q, null, 0), i(() => B.value, () => o("active-icon"), () => o("inactive-icon"), 517), U.$evtclick = a(V), U;
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
93
|
//#endregion
|
package/dist/es/components/src/table/table-body.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { checkEllipsisVisible as e } from "../../../utils/src/tool.mjs";
|
|
1
|
+
import { checkEllipsisVisible as e, getValueByPath as t } from "../../../utils/src/tool.mjs";
|
|
2
2
|
import "../../../utils/index.mjs";
|
|
3
|
-
import { useNamespace as
|
|
3
|
+
import { useNamespace as n } from "../../../hooks/src/use-namespace.mjs";
|
|
4
4
|
import "../../../hooks/index.mjs";
|
|
5
|
-
import
|
|
5
|
+
import r from "../../../icons/src/right.vue.mjs";
|
|
6
6
|
import "../../../icons/index.mjs";
|
|
7
|
-
import { STooltip as
|
|
8
|
-
import { tableContextKey as
|
|
9
|
-
import { child as
|
|
7
|
+
import { STooltip as i } from "../tooltip/index.mjs";
|
|
8
|
+
import { tableContextKey as a } from "./types.mjs";
|
|
9
|
+
import { child as o, computed as s, createComponent as c, createComponentWithFallback as l, createFor as u, createIf as d, createInvoker as f, createSlot as ee, createTemplateRefSetter as p, defineVaporComponent as m, delegateEvents as h, inject as g, nextTick as _, ref as v, renderEffect as y, resolveComponent as b, setClass as x, setInsertionState as S, setProp as C, setStyle as w, setText as T, template as E, toDisplayString as D, txt as O, unref as k, watch as A } from "vue";
|
|
10
10
|
//#region ../components/src/table/table-body.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
11
|
-
var j = E("<td><div>"), M = E("<span>"), N = E("<div><div> </div>"), P = E("<div><div> "), F = E("<td>"),
|
|
11
|
+
var j = E("<td><div>"), M = E("<span>"), N = E("<div><div> </div>"), P = E("<div><div> "), F = E("<td>"), I = E("<tr>"), te = E("<tbody>", 1);
|
|
12
12
|
h("click");
|
|
13
13
|
var L = /*@__PURE__*/ m({
|
|
14
14
|
__name: "table-body",
|
|
@@ -19,7 +19,7 @@ var L = /*@__PURE__*/ m({
|
|
|
19
19
|
"expandedRow"
|
|
20
20
|
],
|
|
21
21
|
setup(m, { emit: h }) {
|
|
22
|
-
let E = m, L = h, R =
|
|
22
|
+
let E = m, L = h, R = n("table"), z = g(a, void 0), B = v({}), V = v({}), H = (e, t) => {
|
|
23
23
|
e instanceof HTMLElement && (V.value[t] = e);
|
|
24
24
|
}, U = async () => {
|
|
25
25
|
await _(), requestAnimationFrame(() => {
|
|
@@ -38,13 +38,13 @@ var L = /*@__PURE__*/ m({
|
|
|
38
38
|
});
|
|
39
39
|
let W = (e, t) => {
|
|
40
40
|
L("expandedRow", e, t);
|
|
41
|
-
}, G =
|
|
41
|
+
}, G = (e, n) => t(e, n), K = s(() => z?.flatColumns.value || []), q = s(() => z?.props.stripe ?? !1), J = s(() => z?.isScrollAtLeft.value ?? !0), Y = s(() => z?.isScrollAtRight.value ?? !1), X = (e) => {
|
|
42
42
|
let t = {};
|
|
43
43
|
return e.width === "auto" && (t.whiteSpace = "nowrap"), e.fixed && e.fixedOffset !== void 0 && (t.position = "sticky", t[e.fixed] = `${e.fixedOffset}px`, t.zIndex = 1), t;
|
|
44
|
-
},
|
|
44
|
+
}, Z = s(() => {
|
|
45
45
|
let e = z?.checked.value ?? [];
|
|
46
46
|
return new Set(e.map((e) => e._id));
|
|
47
|
-
}),
|
|
47
|
+
}), Q = (e) => Z.value.has(e._id), ne = (e, t, n) => {
|
|
48
48
|
let r = z?.checked.value ?? [], i;
|
|
49
49
|
if (z?.props?.multiple) {
|
|
50
50
|
let n = r.findIndex((e) => e._id === t._id);
|
|
@@ -55,97 +55,95 @@ var L = /*@__PURE__*/ m({
|
|
|
55
55
|
else i = n === -1 ? [...r] : r.toSpliced(n, 1);
|
|
56
56
|
} else i = e ? [E.data.find((e) => e._id === t._id)] : [];
|
|
57
57
|
L("checkRow", t, n, i);
|
|
58
|
-
},
|
|
58
|
+
}, re = (e) => {
|
|
59
59
|
let t = z?.selected.value;
|
|
60
60
|
return t && t._id === e._id;
|
|
61
|
-
},
|
|
61
|
+
}, ie = (e) => {
|
|
62
62
|
if (!z?.props?.rowSelection) return;
|
|
63
63
|
let t = z?.selected.value;
|
|
64
64
|
L("selectRow", t && t._id === e._id ? {} : e, E.data.indexOf(e));
|
|
65
|
-
},
|
|
66
|
-
return S($, null, 0),
|
|
67
|
-
let
|
|
65
|
+
}, ae = p(), oe = b("s-checkbox"), $ = te();
|
|
66
|
+
return S($, null, 0), u(() => E.data, (e, t) => {
|
|
67
|
+
let n = I();
|
|
68
68
|
return y(() => {
|
|
69
|
-
let
|
|
70
|
-
x(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
let r = k(R), i = e.value;
|
|
70
|
+
x(n, [
|
|
71
|
+
r.e("body-row"),
|
|
72
|
+
r.is("stripe", q.value && t.value % 2 == 1),
|
|
73
|
+
r.is("selected", re(i) || Q(i)),
|
|
74
|
+
r.is("selection", k(z)?.props?.rowSelection)
|
|
75
75
|
]);
|
|
76
|
-
}), S(
|
|
77
|
-
let
|
|
76
|
+
}), S(n, null, 0), u(() => K.value, (n, a) => d(() => n.value.type === "select", () => {
|
|
77
|
+
let r = j(), i = o(r);
|
|
78
78
|
y(() => {
|
|
79
|
-
let e = k(R), t =
|
|
80
|
-
x(
|
|
79
|
+
let e = k(R), t = n.value, a = t.fixed;
|
|
80
|
+
x(r, [
|
|
81
81
|
e.e("body-cell"),
|
|
82
82
|
a ? e.m("body-cell", "fixed") : "",
|
|
83
83
|
a ? e.m("body-cell", "fixed", t.fixed) : "",
|
|
84
|
-
e.is("shadow", a === "left" && !
|
|
85
|
-
e.is("shadow", a === "right" && !
|
|
84
|
+
e.is("shadow", a === "left" && !J.value),
|
|
85
|
+
e.is("shadow", a === "right" && !Y.value),
|
|
86
86
|
{ [e.m("body-cell", "align", t.align)]: t.align }
|
|
87
|
-
]), w(
|
|
88
|
-
}), S(
|
|
89
|
-
let
|
|
90
|
-
return
|
|
91
|
-
"model-value": () =>
|
|
92
|
-
onChange: () =>
|
|
93
|
-
}),
|
|
87
|
+
]), w(r, X(t)), x(i, [e.e("body-cell-content")]);
|
|
88
|
+
}), S(i, null, 0);
|
|
89
|
+
let a = (n) => ne(n, e.value, t.value);
|
|
90
|
+
return l(oe, {
|
|
91
|
+
"model-value": () => Q(e.value),
|
|
92
|
+
onChange: () => a
|
|
93
|
+
}), r;
|
|
94
94
|
}, () => {
|
|
95
|
-
let
|
|
95
|
+
let s = F();
|
|
96
96
|
return y(() => {
|
|
97
|
-
let e = k(R), t =
|
|
98
|
-
x(
|
|
97
|
+
let e = k(R), t = n.value, r = t.fixed;
|
|
98
|
+
x(s, [
|
|
99
99
|
e.e("body-cell"),
|
|
100
100
|
e.is("ellipsis", t.ellipsis || t.ellipsisTooltip),
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
e.is("shadow",
|
|
104
|
-
e.is("shadow",
|
|
101
|
+
r ? e.m("body-cell", "fixed") : "",
|
|
102
|
+
r ? e.m("body-cell", "fixed", t.fixed) : "",
|
|
103
|
+
e.is("shadow", r === "left" && !J.value),
|
|
104
|
+
e.is("shadow", r === "right" && !Y.value),
|
|
105
105
|
{ [e.m("body-cell", "align", t.align)]: t.align }
|
|
106
|
-
]), w(
|
|
107
|
-
}), S(
|
|
108
|
-
column: () =>
|
|
106
|
+
]), w(s, X(t));
|
|
107
|
+
}), S(s, null, 0), d(() => n.value.slot, () => ee(() => n.value.slot, {
|
|
108
|
+
column: () => n.value,
|
|
109
109
|
index: () => t.value,
|
|
110
110
|
row: () => e.value
|
|
111
|
-
}), () =>
|
|
112
|
-
content: () => e.value
|
|
111
|
+
}), () => d(() => n.value.ellipsisTooltip, () => c(k(i), {
|
|
112
|
+
content: () => G(e.value, n.value.field),
|
|
113
113
|
mini: "",
|
|
114
|
-
disabled: () => B.value[t.value + "_" +
|
|
114
|
+
disabled: () => B.value[t.value + "_" + a.value] !== !0
|
|
115
115
|
}, () => {
|
|
116
|
-
let
|
|
116
|
+
let i = N(), s = o(i, 1);
|
|
117
117
|
y(() => {
|
|
118
|
-
x(
|
|
119
|
-
}), S(
|
|
120
|
-
let
|
|
118
|
+
x(i, [k(R).e("body-cell-content")]), w(i, { paddingLeft: n.value.treeNode ? (e.value._level || 0) * 24 + "px" : "0px" });
|
|
119
|
+
}), S(i, 0, 0), d(() => e.value._hasChildren && n.value.treeNode, () => {
|
|
120
|
+
let n = M();
|
|
121
121
|
return y(() => {
|
|
122
122
|
let t = k(R);
|
|
123
|
-
x(
|
|
124
|
-
}), S(
|
|
123
|
+
x(n, [t.e("tree-node-arrow"), t.is("expanded", e.value._expanded)]);
|
|
124
|
+
}), S(n, null, 0), c(k(r)), n.$evtclick = f(() => W(e.value, t.value)), n;
|
|
125
125
|
});
|
|
126
|
-
let l = O(
|
|
126
|
+
let l = O(s);
|
|
127
127
|
return y(() => {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}), r;
|
|
128
|
+
x(s, k(R).e("body-cell-text")), T(l, D(G(e.value, n.value.field))), ae(s, (e) => H(e, t.value + "_" + a.value), !0);
|
|
129
|
+
}), i;
|
|
131
130
|
}), () => {
|
|
132
|
-
let
|
|
131
|
+
let i = P(), a = o(i, 1);
|
|
133
132
|
y(() => {
|
|
134
|
-
x(
|
|
135
|
-
}), S(
|
|
136
|
-
let
|
|
133
|
+
x(i, [k(R).e("body-cell-content")]), w(i, { paddingLeft: n.value.treeNode ? (e.value._level || 0) * 24 + "px" : "0px" });
|
|
134
|
+
}), S(i, 0, 0), d(() => e.value._hasChildren && n.value.treeNode, () => {
|
|
135
|
+
let n = M();
|
|
137
136
|
return y(() => {
|
|
138
137
|
let t = k(R);
|
|
139
|
-
x(
|
|
140
|
-
}), S(
|
|
138
|
+
x(n, [t.e("tree-node-arrow"), t.is("expanded", e.value._expanded)]);
|
|
139
|
+
}), S(n, null, 0), c(k(r)), n.$evtclick = f(() => W(e.value, t.value)), n;
|
|
141
140
|
});
|
|
142
|
-
let
|
|
141
|
+
let s = O(a);
|
|
143
142
|
return y(() => {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}, 266), (e, t) => t, 17), i.$evtclick = d(() => ne(e.value)), i;
|
|
143
|
+
x(a, k(R).e("body-cell-text")), T(s, D(G(e.value, n.value.field)));
|
|
144
|
+
}), i;
|
|
145
|
+
}, 1029), 517), s;
|
|
146
|
+
}, 266), (e, t) => t, 17), n.$evtclick = f(() => ie(e.value)), n;
|
|
149
147
|
}, (e, t) => t, 9), C($, "tabindex", -1), $;
|
|
150
148
|
}
|
|
151
149
|
});
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
display: inline-flex;
|
|
7
7
|
align-items: center;
|
|
8
8
|
font-size: getCssVar("font-size", "medium");
|
|
9
|
-
line-height: 1.5715;
|
|
10
9
|
|
|
11
10
|
@include when(disabled) {
|
|
12
11
|
@include be(switch, core) {
|
|
@@ -26,10 +25,10 @@
|
|
|
26
25
|
@each $size in $size-list {
|
|
27
26
|
@include this-bm(switch, #{$size}) {
|
|
28
27
|
@include be(switch, core-action) {
|
|
29
|
-
left: calc(100% - (getCssVar("size", $size) -
|
|
28
|
+
left: calc(100% - (getCssVar("size", $size) - 8px + 3px));
|
|
30
29
|
}
|
|
31
30
|
@include be(switch, core-label) {
|
|
32
|
-
padding: 0
|
|
31
|
+
padding: 0 getCssVar("size", $size) 0 8px;
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
34
|
}
|
|
@@ -92,21 +91,21 @@
|
|
|
92
91
|
|
|
93
92
|
@each $size in $size-list {
|
|
94
93
|
@include m(#{$size}) {
|
|
95
|
-
height:
|
|
96
|
-
min-width: calc(
|
|
94
|
+
height: getCssVar("size", $size);
|
|
95
|
+
min-width: calc(getCssVar("size", $size) * 2);
|
|
97
96
|
@include be(switch, core-action) {
|
|
98
|
-
height: calc(getCssVar("size", $size) -
|
|
99
|
-
width: calc(getCssVar("size", $size) -
|
|
97
|
+
height: calc(getCssVar("size", $size) - 8px);
|
|
98
|
+
width: calc(getCssVar("size", $size) - 8px);
|
|
100
99
|
}
|
|
101
100
|
@include be(switch, core-label) {
|
|
102
|
-
padding: 0 8px 0
|
|
101
|
+
padding: 0 8px 0 getCssVar("size", $size);
|
|
103
102
|
}
|
|
104
103
|
}
|
|
105
104
|
}
|
|
106
105
|
|
|
107
106
|
@include when(circle) {
|
|
108
107
|
@include be(switch, core) {
|
|
109
|
-
border-radius:
|
|
108
|
+
border-radius: getCssVar("radius", "round");
|
|
110
109
|
}
|
|
111
110
|
|
|
112
111
|
@include be(switch, core-action) {
|
|
@@ -52,11 +52,11 @@ var t = "s", n = [
|
|
|
52
52
|
lineHeightLarge: "24px",
|
|
53
53
|
lineHeightLarger: "28px",
|
|
54
54
|
radiusMini: "2px",
|
|
55
|
-
radiusSmall: "
|
|
56
|
-
radiusMedium: "
|
|
57
|
-
radiusLarge: "
|
|
58
|
-
radiusLarger: "
|
|
59
|
-
radiusRound: "
|
|
55
|
+
radiusSmall: "4px",
|
|
56
|
+
radiusMedium: "6px",
|
|
57
|
+
radiusLarge: "8px",
|
|
58
|
+
radiusLarger: "12px",
|
|
59
|
+
radiusRound: "9999px",
|
|
60
60
|
radiusCircle: "100%",
|
|
61
61
|
bezier1: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
62
62
|
bezierIn: "cubic-bezier(0.4, 0, 1, 1)",
|
|
@@ -27,3 +27,10 @@ export declare const addGroupSeparator: (numStr: string) => string;
|
|
|
27
27
|
* 判断元素文字是否溢出并展示省略号
|
|
28
28
|
*/
|
|
29
29
|
export declare const checkEllipsisVisible: (el: HTMLElement) => boolean;
|
|
30
|
+
/**
|
|
31
|
+
* 根据路径获取对象嵌套属性值,支持点号分隔(如 "dept.title")
|
|
32
|
+
* @param obj 目标对象
|
|
33
|
+
* @param path 属性路径
|
|
34
|
+
* @returns 属性值,路径无效时返回 undefined
|
|
35
|
+
*/
|
|
36
|
+
export declare const getValueByPath: (obj: any, path: string) => any;
|
|
@@ -22,6 +22,15 @@ var e = (e, t) => {
|
|
|
22
22
|
}, r = (e) => e === void 0 || e === "auto" ? 0 : typeof e == "number" ? e : parseFloat(e) || 0, i = (e) => {
|
|
23
23
|
let t = e.split(".");
|
|
24
24
|
return t[0] = t[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), t.join(".");
|
|
25
|
-
}, a = (e) => !e.isConnected || e.getBoundingClientRect().width <= 1 ? !1 : e.scrollWidth > e.clientWidth
|
|
25
|
+
}, a = (e) => !e.isConnected || e.getBoundingClientRect().width <= 1 ? !1 : e.scrollWidth > e.clientWidth, o = (e, t) => {
|
|
26
|
+
if (e == null || !t) return;
|
|
27
|
+
if (!t.includes(".")) return e[t];
|
|
28
|
+
let n = t.split("."), r = e;
|
|
29
|
+
for (let e of n) {
|
|
30
|
+
if (r == null) return;
|
|
31
|
+
r = r[e];
|
|
32
|
+
}
|
|
33
|
+
return r;
|
|
34
|
+
};
|
|
26
35
|
//#endregion
|
|
27
|
-
export { i as addGroupSeparator, a as checkEllipsisVisible, e as debounce, n as getSize, r as getSizeNum, t as randomId };
|
|
36
|
+
export { i as addGroupSeparator, a as checkEllipsisVisible, e as debounce, n as getSize, r as getSizeNum, o as getValueByPath, t as randomId };
|
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.9.0",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"types-syntax": "typescript",
|
|
@@ -495,6 +495,14 @@
|
|
|
495
495
|
"type": "boolean",
|
|
496
496
|
"kind": "expression"
|
|
497
497
|
}
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
"name": "round",
|
|
501
|
+
"description": "是否为圆角按钮",
|
|
502
|
+
"value": {
|
|
503
|
+
"type": "boolean",
|
|
504
|
+
"kind": "expression"
|
|
505
|
+
}
|
|
498
506
|
}
|
|
499
507
|
],
|
|
500
508
|
"events": [],
|