savor-ui 0.12.1 → 0.12.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 CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
 
4
4
 
5
+ ## [0.12.2](https://gitee.com/mach552/savor-ui/compare/v0.12.1...v0.12.2) (2026-07-17)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **segmented:** 修复默认值错误赋值为false的问题 ([ab153ae](https://gitee.com/mach552/savor-ui/commits/ab153ae99cfa690b535c40bb7fe6ff4f02085245))
11
+ * **steps:** 修复组件导出名称错误问题 ([6a61ac4](https://gitee.com/mach552/savor-ui/commits/6a61ac4045b24ba8576842cba5cec04a332fc77b))
12
+ * **switch:** 修复默认值错误赋值为false的问题 ([1d2e43e](https://gitee.com/mach552/savor-ui/commits/1d2e43ec434caf5b93bc7c2f8f780cdf8c80f4db))
13
+ * **table:** 修复插槽列的`align`属性失效问题 ([fbab17f](https://gitee.com/mach552/savor-ui/commits/fbab17fc24cbff58cb8cfd3eadc3512f07333b53))
14
+
5
15
  ## [0.12.1](https://gitee.com/mach552/savor-ui/compare/v0.12.0...v0.12.1) (2026-07-16)
6
16
 
7
17
 
@@ -15,11 +15,14 @@ var O = /*@__PURE__*/ c({
15
15
  value: "value",
16
16
  disabled: "disabled"
17
17
  }) },
18
- defaultValue: { type: [
19
- String,
20
- Number,
21
- Boolean
22
- ] },
18
+ defaultValue: {
19
+ type: [
20
+ String,
21
+ Number,
22
+ Boolean
23
+ ],
24
+ default: void 0
25
+ },
23
26
  size: {},
24
27
  block: { type: Boolean }
25
28
  }, {
@@ -1,6 +1,6 @@
1
1
  import { PublicProps, VNode, Plugin } from 'vue';
2
2
  import { StepsItemProps } from './types';
3
- export declare const Steps: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
3
+ export declare const SSteps: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
4
4
  attrs: any;
5
5
  slots: {};
6
6
  emit: ((evt: "change", index: number) => void) & ((event: "update:current", value: number) => void);
@@ -4,4 +4,4 @@ import t from "./steps.vue.mjs";
4
4
  //#region ../components/src/steps/index.ts
5
5
  var n = e(t);
6
6
  //#endregion
7
- export { n as Steps };
7
+ export { n as SSteps };
@@ -14,11 +14,14 @@ var j = /*@__PURE__*/ c({
14
14
  String,
15
15
  Number
16
16
  ] },
17
- defaultValue: { type: [
18
- Boolean,
19
- String,
20
- Number
21
- ] },
17
+ defaultValue: {
18
+ type: [
19
+ Boolean,
20
+ String,
21
+ Number
22
+ ],
23
+ default: void 0
24
+ },
22
25
  disabled: { type: Boolean },
23
26
  activeValue: {
24
27
  type: [
@@ -5,12 +5,13 @@ import "../../../hooks/index.mjs";
5
5
  import r from "../../../icons/src/right.vue.mjs";
6
6
  import "../../../icons/index.mjs";
7
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";
8
+ import { SCheckbox as a } from "../checkbox/index.mjs";
9
+ import { tableContextKey as o } from "./types.mjs";
10
+ import { child as s, computed as c, createComponent as l, createFor as u, createIf as d, createInvoker as f, createSlot as p, createTemplateRefSetter as m, defineVaporComponent as h, delegateEvents as g, inject as _, nextTick as v, ref as y, renderEffect 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
11
  //#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>"), I = E("<tr>"), te = E("<tbody>", 1);
12
- h("click");
13
- var L = /*@__PURE__*/ m({
12
+ var j = E("<td><div>"), M = E("<span>"), N = E("<div>"), P = E("<div><div> </div>"), F = E("<div><div> "), ee = E("<td>"), te = E("<tr>"), I = E("<tbody>", 1);
13
+ g("click");
14
+ var L = /*@__PURE__*/ h({
14
15
  __name: "table-body",
15
16
  props: { data: { default: () => [] } },
16
17
  emits: [
@@ -18,11 +19,11 @@ var L = /*@__PURE__*/ m({
18
19
  "selectRow",
19
20
  "expandedRow"
20
21
  ],
21
- setup(m, { emit: h }) {
22
- let E = m, L = h, R = n("table"), z = g(a, void 0), B = v({}), V = v({}), H = (e, t) => {
22
+ setup(h, { emit: g }) {
23
+ let E = h, L = g, R = n("table"), z = _(o, void 0), B = y({}), V = y({}), H = (e, t) => {
23
24
  e instanceof HTMLElement && (V.value[t] = e);
24
25
  }, U = async () => {
25
- await _(), requestAnimationFrame(() => {
26
+ await v(), requestAnimationFrame(() => {
26
27
  let t = {};
27
28
  Object.entries(V.value).forEach(([n, r]) => {
28
29
  t[n] = e(r);
@@ -38,10 +39,10 @@ var L = /*@__PURE__*/ m({
38
39
  });
39
40
  let W = (e, t) => {
40
41
  L("expandedRow", e, t);
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
+ }, G = (e, n) => t(e, n), K = c(() => z?.flatColumns.value || []), q = c(() => z?.props.stripe ?? !1), J = c(() => z?.isScrollAtLeft.value ?? !0), Y = c(() => z?.isScrollAtRight.value ?? !1), X = (e) => {
42
43
  let t = {};
43
44
  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
- }, Z = s(() => {
45
+ }, Z = c(() => {
45
46
  let e = z?.checked.value ?? [];
46
47
  return new Set(e.map((e) => e._id));
47
48
  }), Q = (e) => Z.value.has(e._id), ne = (e, t, n) => {
@@ -62,10 +63,10 @@ var L = /*@__PURE__*/ m({
62
63
  if (!z?.props?.rowSelection) return;
63
64
  let t = z?.selected.value;
64
65
  L("selectRow", t && t._id === e._id ? {} : e, E.data.indexOf(e));
65
- }, ae = p(), oe = b("s-checkbox"), $ = te();
66
+ }, ae = m(), $ = I();
66
67
  return S($, null, 0), u(() => E.data, (e, t) => {
67
- let n = I();
68
- return y(() => {
68
+ let n = te();
69
+ return b(() => {
69
70
  let r = k(R), i = e.value;
70
71
  x(n, [
71
72
  r.e("body-row"),
@@ -73,9 +74,9 @@ var L = /*@__PURE__*/ m({
73
74
  r.is("selected", re(i) || Q(i)),
74
75
  r.is("selection", k(z)?.props?.rowSelection)
75
76
  ]);
76
- }), S(n, null, 0), u(() => K.value, (n, a) => d(() => n.value.type === "select", () => {
77
- let r = j(), i = o(r);
78
- y(() => {
77
+ }), S(n, null, 0), u(() => K.value, (n, o) => d(() => n.value.type === "select", () => {
78
+ let r = j(), i = s(r);
79
+ b(() => {
79
80
  let e = k(R), t = n.value, a = t.fixed;
80
81
  x(r, [
81
82
  e.e("body-cell"),
@@ -86,16 +87,16 @@ var L = /*@__PURE__*/ m({
86
87
  { [e.m("body-cell", "align", t.align)]: t.align }
87
88
  ]), w(r, X(t)), x(i, [e.e("body-cell-content")]);
88
89
  }), S(i, null, 0);
89
- let a = (n) => ne(n, e.value, t.value);
90
- return l(oe, {
90
+ let o = (n) => ne(n, e.value, t.value);
91
+ return l(k(a), {
91
92
  "model-value": () => Q(e.value),
92
- onChange: () => a
93
+ onChange: () => o
93
94
  }), r;
94
95
  }, () => {
95
- let s = F();
96
- return y(() => {
96
+ let a = ee();
97
+ return b(() => {
97
98
  let e = k(R), t = n.value, r = t.fixed;
98
- x(s, [
99
+ x(a, [
99
100
  e.e("body-cell"),
100
101
  e.is("ellipsis", t.ellipsis || t.ellipsisTooltip),
101
102
  r ? e.m("body-cell", "fixed") : "",
@@ -103,46 +104,57 @@ var L = /*@__PURE__*/ m({
103
104
  e.is("shadow", r === "left" && !J.value),
104
105
  e.is("shadow", r === "right" && !Y.value),
105
106
  { [e.m("body-cell", "align", t.align)]: t.align }
106
- ]), w(s, X(t));
107
- }), S(s, null, 0), d(() => n.value.slot, () => ee(() => n.value.slot, {
108
- column: () => n.value,
109
- index: () => t.value,
110
- row: () => e.value
111
- }), () => d(() => n.value.ellipsisTooltip, () => c(k(i), {
107
+ ]), w(a, X(t));
108
+ }), S(a, null, 0), d(() => n.value.slot, () => {
109
+ let i = N();
110
+ return b(() => {
111
+ x(i, [k(R).e("body-cell-content")]), w(i, { paddingLeft: n.value.treeNode ? (e.value._level || 0) * 24 + "px" : "0px" });
112
+ }), S(i, null, 0), d(() => e.value._hasChildren && n.value.treeNode, () => {
113
+ let n = M();
114
+ return b(() => {
115
+ let t = k(R);
116
+ x(n, [t.e("tree-node-arrow"), t.is("expanded", e.value._expanded)]);
117
+ }), S(n, null, 0), l(k(r)), n.$evtclick = f(() => W(e.value, t.value)), n;
118
+ }), S(i, null, 1), p(() => n.value.slot, {
119
+ column: () => n.value,
120
+ index: () => t.value,
121
+ row: () => e.value
122
+ }), i;
123
+ }, () => d(() => n.value.ellipsisTooltip, () => l(k(i), {
112
124
  content: () => G(e.value, n.value.field),
113
125
  mini: "",
114
- disabled: () => B.value[t.value + "_" + a.value] !== !0
126
+ disabled: () => B.value[t.value + "_" + o.value] !== !0
115
127
  }, () => {
116
- let i = N(), s = o(i, 1);
117
- y(() => {
128
+ let i = P(), a = s(i, 1);
129
+ b(() => {
118
130
  x(i, [k(R).e("body-cell-content")]), w(i, { paddingLeft: n.value.treeNode ? (e.value._level || 0) * 24 + "px" : "0px" });
119
131
  }), S(i, 0, 0), d(() => e.value._hasChildren && n.value.treeNode, () => {
120
132
  let n = M();
121
- return y(() => {
133
+ return b(() => {
122
134
  let t = k(R);
123
135
  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;
136
+ }), S(n, null, 0), l(k(r)), n.$evtclick = f(() => W(e.value, t.value)), n;
125
137
  });
126
- let l = O(s);
127
- return y(() => {
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);
138
+ let c = O(a);
139
+ return b(() => {
140
+ x(a, k(R).e("body-cell-text")), T(c, D(G(e.value, n.value.field))), ae(a, (e) => H(e, t.value + "_" + o.value), !0);
129
141
  }), i;
130
142
  }), () => {
131
- let i = P(), a = o(i, 1);
132
- y(() => {
143
+ let i = F(), a = s(i, 1);
144
+ b(() => {
133
145
  x(i, [k(R).e("body-cell-content")]), w(i, { paddingLeft: n.value.treeNode ? (e.value._level || 0) * 24 + "px" : "0px" });
134
146
  }), S(i, 0, 0), d(() => e.value._hasChildren && n.value.treeNode, () => {
135
147
  let n = M();
136
- return y(() => {
148
+ return b(() => {
137
149
  let t = k(R);
138
150
  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;
151
+ }), S(n, null, 0), l(k(r)), n.$evtclick = f(() => W(e.value, t.value)), n;
140
152
  });
141
- let s = O(a);
142
- return y(() => {
143
- x(a, k(R).e("body-cell-text")), T(s, D(G(e.value, n.value.field)));
153
+ let o = O(a);
154
+ return b(() => {
155
+ x(a, k(R).e("body-cell-text")), T(o, D(G(e.value, n.value.field)));
144
156
  }), i;
145
- }, 1029), 517), s;
157
+ }, 1285), 773), a;
146
158
  }, 266), (e, t) => t, 17), n.$evtclick = f(() => ie(e.value)), n;
147
159
  }, (e, t) => t, 9), C($, "tabindex", -1), $;
148
160
  }
@@ -53,7 +53,7 @@ import { SSliderVerify as ge } from "../components/src/slider-verify/index.mjs";
53
53
  import { SSpace as _e } from "../components/src/space/index.mjs";
54
54
  import { SSplit as ve, SSplitPane as ye } from "../components/src/split/index.mjs";
55
55
  import { SStatistic as be } from "../components/src/statistic/index.mjs";
56
- import { Steps as xe } from "../components/src/steps/index.mjs";
56
+ import { SSteps as xe } from "../components/src/steps/index.mjs";
57
57
  import { SSwitch as Se } from "../components/src/switch/index.mjs";
58
58
  import { STable as Ce } from "../components/src/table/index.mjs";
59
59
  import { STab as we, STabPane as Te, STabs as Ee } from "../components/src/tabs/index.mjs";
@@ -70,7 +70,7 @@ declare module "vue" {
70
70
  SSplit: (typeof import("savor-ui"))["SSplit"];
71
71
  SSplitPane: (typeof import("savor-ui"))["SSplitPane"];
72
72
  SStatistic: (typeof import("savor-ui"))["SStatistic"];
73
- Steps: (typeof import("savor-ui"))["Steps"];
73
+ SSteps: (typeof import("savor-ui"))["SSteps"];
74
74
  SSwitch: (typeof import("savor-ui"))["SSwitch"];
75
75
  STab: (typeof import("savor-ui"))["STab"];
76
76
  STable: (typeof import("savor-ui"))["STable"];
@@ -71,7 +71,7 @@ import { SSpace as Le } from "../components/src/space/index.mjs";
71
71
  import { splitContextKey as Re } from "../components/src/split/types.mjs";
72
72
  import { SSplit as ze, SSplitPane as Be } from "../components/src/split/index.mjs";
73
73
  import { SStatistic as Ve } from "../components/src/statistic/index.mjs";
74
- import { Steps as He } from "../components/src/steps/index.mjs";
74
+ import { SSteps as He } from "../components/src/steps/index.mjs";
75
75
  import { SSwitch as Ue } from "../components/src/switch/index.mjs";
76
76
  import { tableContextKey as We } from "../components/src/table/types.mjs";
77
77
  import { STable as Ge } from "../components/src/table/index.mjs";
@@ -94,4 +94,4 @@ import lt from "./components.mjs";
94
94
  //#region index.ts
95
95
  var ut = e(lt);
96
96
  //#endregion
97
- export { t as SAlert, r as SAnchor, i as SAnchorLink, v as SAutoComplete, y as SAvatar, g as SBackTop, b as SBadge, x as SButton, S as SButtonGroup, C as SCard, w as SCarousel, M as SCascader, N as SChatList, P as SChatSender, D as SCheckbox, O as SCheckboxGroup, L as SCollapse, R as SCollapseItem, H as SColorPicker, l as SConfigProvider, U as SDatePicker, W as SDatetimePicker, K as SDescriptions, q as SDescriptionsItem, J as SDivider, Z as SDoption, Y as SDrawer, Q as SDropdown, $ as SDsubmenu, T as SEmpty, ee as SExpandCard, f as SForm, p as SFormItem, te as SGalleria, re as SGrid, ie as SGridItem, ae as SHighlight, z as SIcon, se as SImage, ce as SImageGroup, le as SImagePreview, m as SInput, ue as SInputNumber, de as SInputTag, pe as SLayout, me as SLayoutAside, he as SLayoutContent, ge as SLayoutFooter, _e as SLayoutHeader, ve as SLink, ye as SList, Ce as SMenu, we as SMenuGroup, Te as SMenuItem, Oe as SMeterGroup, Ae as SModal, je as SPagination, Me as SPanel, u as SPopover, Ne as SProgress, A as SRadio, j as SRadioGroup, _ as SScrollbar, Pe as SSegmented, V as SSelect, Fe as SSkeleton, Ie as SSliderVerify, Le as SSpace, ze as SSplit, Be as SSplitPane, Ve as SStatistic, Ee as SSubMenu, Ue as SSwitch, qe as STab, Je as STabPane, Ge as STable, Ye as STabs, B as STag, Xe as SText, Ze as STextarea, $e as STimeline, et as STimelineItem, d as STooltip, F as STransition, nt as STree, rt as STreeSelect, it as SUpload, at as SVirtualList, ot as SWaterfall, st as SWatermark, ct as SWheel, He as Steps, n as anchorContextKey, h as buttonGroupContextKey, E as checkboxGroupContextKey, I as collapseContextKey, c as configProviderContextKey, ut as default, G as descriptionsContextKey, X as dropdownContextKey, a as formContextKey, o as formItemContextKey, s as formItemStatusContextKey, ne as gridContextKey, oe as imageGroupContextKey, be as menuContextKey, xe as menuLevelContextKey, k as radioGroupContextKey, Re as splitContextKey, Se as subMenuContextKey, We as tableContextKey, Ke as tabsContextKey, Qe as timelineContextKey, tt as treeContextKey, fe as useLayer, De as useMessage, ke as useModal };
97
+ export { t as SAlert, r as SAnchor, i as SAnchorLink, v as SAutoComplete, y as SAvatar, g as SBackTop, b as SBadge, x as SButton, S as SButtonGroup, C as SCard, w as SCarousel, M as SCascader, N as SChatList, P as SChatSender, D as SCheckbox, O as SCheckboxGroup, L as SCollapse, R as SCollapseItem, H as SColorPicker, l as SConfigProvider, U as SDatePicker, W as SDatetimePicker, K as SDescriptions, q as SDescriptionsItem, J as SDivider, Z as SDoption, Y as SDrawer, Q as SDropdown, $ as SDsubmenu, T as SEmpty, ee as SExpandCard, f as SForm, p as SFormItem, te as SGalleria, re as SGrid, ie as SGridItem, ae as SHighlight, z as SIcon, se as SImage, ce as SImageGroup, le as SImagePreview, m as SInput, ue as SInputNumber, de as SInputTag, pe as SLayout, me as SLayoutAside, he as SLayoutContent, ge as SLayoutFooter, _e as SLayoutHeader, ve as SLink, ye as SList, Ce as SMenu, we as SMenuGroup, Te as SMenuItem, Oe as SMeterGroup, Ae as SModal, je as SPagination, Me as SPanel, u as SPopover, Ne as SProgress, A as SRadio, j as SRadioGroup, _ as SScrollbar, Pe as SSegmented, V as SSelect, Fe as SSkeleton, Ie as SSliderVerify, Le as SSpace, ze as SSplit, Be as SSplitPane, Ve as SStatistic, He as SSteps, Ee as SSubMenu, Ue as SSwitch, qe as STab, Je as STabPane, Ge as STable, Ye as STabs, B as STag, Xe as SText, Ze as STextarea, $e as STimeline, et as STimelineItem, d as STooltip, F as STransition, nt as STree, rt as STreeSelect, it as SUpload, at as SVirtualList, ot as SWaterfall, st as SWatermark, ct as SWheel, n as anchorContextKey, h as buttonGroupContextKey, E as checkboxGroupContextKey, I as collapseContextKey, c as configProviderContextKey, ut as default, G as descriptionsContextKey, X as dropdownContextKey, a as formContextKey, o as formItemContextKey, s as formItemStatusContextKey, ne as gridContextKey, oe as imageGroupContextKey, be as menuContextKey, xe as menuLevelContextKey, k as radioGroupContextKey, Re as splitContextKey, Se as subMenuContextKey, We as tableContextKey, Ke as tabsContextKey, Qe as timelineContextKey, tt as treeContextKey, fe as useLayer, De as useMessage, ke as useModal };
@@ -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.12.0",
5
+ "version": "0.12.1",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "types-syntax": "typescript",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "savor-ui",
3
- "version": "0.12.1",
3
+ "version": "0.12.2",
4
4
  "description": "A Vue3 Components Library",
5
5
  "keywords": [
6
6
  "component library",