savor-ui 0.32.0 → 0.33.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 +14 -0
- package/dist/es/components/index.d.ts +1 -0
- package/dist/es/components/index.mjs +1 -0
- package/dist/es/components/src/slider/index.d.ts +33 -0
- package/dist/es/components/src/slider/index.mjs +7 -0
- package/dist/es/components/src/slider/slider.d.ts +26 -0
- package/dist/es/components/src/slider/slider.vue.mjs +156 -0
- package/dist/es/components/src/slider/types.d.ts +48 -0
- package/dist/es/core/components.mjs +29 -27
- package/dist/es/core/global.d.ts +1 -0
- package/dist/es/core/index.mjs +25 -24
- package/dist/es/theme/components/index.scss +1 -0
- package/dist/es/theme/components/slider.scss +203 -0
- package/dist/es/utils/src/theme/themeMap.d.ts +4 -3
- package/dist/es/utils/src/theme/themeMap.mjs +35 -24
- package/dist/json/vetur-attributes.json +49 -0
- package/dist/json/vetur-tags.json +18 -0
- package/dist/json/web-types.json +113 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
## [0.33.1](https://gitee.com/mach552/savor-ui/compare/v0.33.0...v0.33.1) (2026-10-08)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **theme:** 修复仅设置 `lightTheme` 时暗色主题色未跟随自动生成 ([2207663](https://gitee.com/mach552/savor-ui/commits/220766393cab22de1b00d6820b99a277abfc6a62))
|
|
11
|
+
|
|
12
|
+
# [0.33.0](https://gitee.com/mach552/savor-ui/compare/v0.32.0...v0.33.0) (2026-09-21)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **slider:** 新增滑块组件 ([47dcd36](https://gitee.com/mach552/savor-ui/commits/47dcd36493b1950cc75f4ab2ff96709adaf688ec))
|
|
18
|
+
|
|
5
19
|
# [0.32.0](https://gitee.com/mach552/savor-ui/compare/v0.31.1...v0.32.0) (2026-09-02)
|
|
6
20
|
|
|
7
21
|
|
|
@@ -52,6 +52,7 @@ export * from './src/scrollbar';
|
|
|
52
52
|
export * from './src/segmented';
|
|
53
53
|
export * from './src/select';
|
|
54
54
|
export * from './src/skeleton';
|
|
55
|
+
export * from './src/slider';
|
|
55
56
|
export * from './src/slider-verify';
|
|
56
57
|
export * from './src/space';
|
|
57
58
|
export * from './src/split';
|
|
@@ -76,6 +76,7 @@ import "./src/pagination/index.mjs";
|
|
|
76
76
|
import "./src/panel/index.mjs";
|
|
77
77
|
import "./src/progress/index.mjs";
|
|
78
78
|
import "./src/skeleton/index.mjs";
|
|
79
|
+
import "./src/slider/index.mjs";
|
|
79
80
|
import "./src/slider-verify/index.mjs";
|
|
80
81
|
import "./src/split/types.mjs";
|
|
81
82
|
import "./src/split/index.mjs";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PublicProps, VNode, Plugin } from 'vue';
|
|
2
|
+
export declare const SSlider: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
3
|
+
attrs: any;
|
|
4
|
+
slots: {};
|
|
5
|
+
emit: (((evt: "input", value: number | [number, number]) => void) & ((evt: "change", value: number | [number, number]) => void)) & ((event: "update:modelValue", value: number | [number, number]) => void);
|
|
6
|
+
}, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
7
|
+
props: PublicProps & {
|
|
8
|
+
modelValue?: number | [number, number] | undefined;
|
|
9
|
+
defaultValue?: number | [number, number] | undefined;
|
|
10
|
+
min?: number | undefined;
|
|
11
|
+
max?: number | undefined;
|
|
12
|
+
step?: number | undefined;
|
|
13
|
+
vertical?: boolean | undefined;
|
|
14
|
+
range?: boolean | undefined;
|
|
15
|
+
disabled?: boolean | undefined;
|
|
16
|
+
tooltip?: boolean | undefined;
|
|
17
|
+
marks?: Record<number, string> | undefined;
|
|
18
|
+
format?: ((value: number) => string | number) | undefined;
|
|
19
|
+
size?: "mini" | "small" | "medium" | "large" | undefined;
|
|
20
|
+
onInput?: ((value: number | [number, number]) => any) | undefined;
|
|
21
|
+
onChange?: ((value: number | [number, number]) => any) | undefined;
|
|
22
|
+
"onUpdate:modelValue"?: ((value: number | [number, number]) => any) | undefined;
|
|
23
|
+
} & (typeof globalThis extends {
|
|
24
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
25
|
+
} ? P : {});
|
|
26
|
+
expose: (exposed: {}) => void;
|
|
27
|
+
attrs: any;
|
|
28
|
+
slots: {};
|
|
29
|
+
emit: (((evt: "input", value: number | [number, number]) => void) & ((evt: "change", value: number | [number, number]) => void)) & ((event: "update:modelValue", value: number | [number, number]) => void);
|
|
30
|
+
}>) => VNode & {
|
|
31
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
32
|
+
}) & Plugin;
|
|
33
|
+
export * from './types';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SliderProps } from './types';
|
|
2
|
+
import { PublicProps, VNode } from 'vue';
|
|
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<(SliderProps & {
|
|
5
|
+
modelValue?: number | [number, number];
|
|
6
|
+
}) & {
|
|
7
|
+
onInput?: ((value: number | [number, number]) => any) | undefined;
|
|
8
|
+
onChange?: ((value: number | [number, number]) => any) | undefined;
|
|
9
|
+
"onUpdate:modelValue"?: ((value: number | [number, number]) => any) | undefined;
|
|
10
|
+
}> & (typeof globalThis extends {
|
|
11
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
12
|
+
} ? P : {});
|
|
13
|
+
expose: (exposed: {}) => void;
|
|
14
|
+
attrs: any;
|
|
15
|
+
slots: {};
|
|
16
|
+
emit: (((evt: "input", value: number | [number, number]) => void) & ((evt: "change", value: number | [number, number]) => void)) & ((event: "update:modelValue", value: number | [number, number]) => void);
|
|
17
|
+
}>) => VNode & {
|
|
18
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
19
|
+
};
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
23
|
+
[K in keyof T]: T[K];
|
|
24
|
+
} : {
|
|
25
|
+
[K in keyof T as K]: T[K];
|
|
26
|
+
}) & {};
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
|
|
2
|
+
import "../../../hooks/index.mjs";
|
|
3
|
+
import { useFormItem as t } from "../form/use-form-item.mjs";
|
|
4
|
+
import { child as n, computed as r, createFor as i, createIf as ee, createInvoker as a, createTemplateRefSetter as te, defineVaporComponent as o, delegateEvents as s, mergeModels as c, next as l, on as u, ref as d, renderEffect as f, setAttr as p, setClass as m, setInsertionState as h, setProp as g, setStyle as _, setText as v, template as y, toDisplayString as b, toRefs as x, txt as S, unref as C, useModel as ne, useTemplateRef as re, withModifiers as ie } from "vue";
|
|
5
|
+
//#region ../components/src/slider/slider.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
6
|
+
var w = y("<div>"), T = y("<div> "), E = y("<div role=slider>"), D = y("<div><div></div><div></div>", 1);
|
|
7
|
+
s("keydown", "pointerdown");
|
|
8
|
+
var O = /*@__PURE__*/ o({
|
|
9
|
+
name: "SSlider",
|
|
10
|
+
__name: "slider",
|
|
11
|
+
props: /*@__PURE__*/ c({
|
|
12
|
+
modelValue: {},
|
|
13
|
+
defaultValue: { default: void 0 },
|
|
14
|
+
min: { default: 0 },
|
|
15
|
+
max: { default: 100 },
|
|
16
|
+
step: { default: 1 },
|
|
17
|
+
vertical: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: !1
|
|
20
|
+
},
|
|
21
|
+
range: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !1
|
|
24
|
+
},
|
|
25
|
+
disabled: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !1
|
|
28
|
+
},
|
|
29
|
+
tooltip: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: !0
|
|
32
|
+
},
|
|
33
|
+
marks: {},
|
|
34
|
+
format: {
|
|
35
|
+
type: Function,
|
|
36
|
+
default: void 0
|
|
37
|
+
},
|
|
38
|
+
size: { default: "medium" }
|
|
39
|
+
}, {
|
|
40
|
+
modelValue: { default: void 0 },
|
|
41
|
+
modelModifiers: {}
|
|
42
|
+
}),
|
|
43
|
+
emits: /*@__PURE__*/ c(["input", "change"], ["update:modelValue"]),
|
|
44
|
+
setup(o, { emit: s }) {
|
|
45
|
+
let c = o, y = s, O = e("slider"), { size: k } = x(c), { mergedSize: A } = t({ size: k }), j = ne(o, "modelValue"), M = re("trackRef");
|
|
46
|
+
j.value === void 0 && (j.value = c.defaultValue === void 0 ? c.range ? [c.min, c.max] : c.min : c.defaultValue);
|
|
47
|
+
let N = r(() => c.range || Array.isArray(j.value)), ae = r(() => N.value ? [0, 1] : [0]), P = r(() => {
|
|
48
|
+
let e = j.value;
|
|
49
|
+
return N.value ? Array.isArray(e) ? [e[0] ?? c.min, e[1] ?? c.max] : [c.min, c.max] : [typeof e == "number" ? e : c.min];
|
|
50
|
+
}), F = r(() => P.value.map((e) => (e - c.min) / (c.max - c.min || 1) * 100)), oe = r(() => {
|
|
51
|
+
let e = `${c.step}`, t = e.indexOf(".");
|
|
52
|
+
return t === -1 ? 0 : e.length - t - 1;
|
|
53
|
+
}), I = (e) => {
|
|
54
|
+
let t = Math.min(Math.max(e, c.min), c.max);
|
|
55
|
+
if (!c.step) return t;
|
|
56
|
+
let n = c.min + Math.round((t - c.min) / c.step) * c.step;
|
|
57
|
+
return Number(Number(n).toFixed(oe.value));
|
|
58
|
+
}, L = (e) => {
|
|
59
|
+
let t = M.value.getBoundingClientRect(), n = c.vertical ? 1 - (e.clientY - t.top) / (t.height || 1) : (e.clientX - t.left) / (t.width || 1);
|
|
60
|
+
return I(c.min + Math.min(Math.max(n, 0), 1) * (c.max - c.min));
|
|
61
|
+
}, R = (e, t) => {
|
|
62
|
+
if (N.value) {
|
|
63
|
+
let [n, r] = P.value, i = e === 0 ? [Math.min(t, r), r] : [n, Math.max(t, n)];
|
|
64
|
+
j.value = i, y("input", i);
|
|
65
|
+
} else j.value = t, y("input", t);
|
|
66
|
+
}, z = d(!1), B = d(null), V = d(null), H = (e) => {
|
|
67
|
+
!z.value || B.value === null || R(B.value, L(e));
|
|
68
|
+
}, U = () => {
|
|
69
|
+
z.value && (z.value = !1, B.value = null, document.removeEventListener("pointermove", H), document.removeEventListener("pointerup", U), y("change", j.value));
|
|
70
|
+
}, W = (e, t) => {
|
|
71
|
+
if (c.disabled || !M.value) return;
|
|
72
|
+
e.preventDefault();
|
|
73
|
+
let n = t;
|
|
74
|
+
if (n === null) {
|
|
75
|
+
let t = L(e);
|
|
76
|
+
n = N.value ? Math.abs(t - P.value[0]) <= Math.abs(t - P.value[1]) ? 0 : 1 : 0;
|
|
77
|
+
}
|
|
78
|
+
B.value = n, z.value = !0, R(n, L(e)), document.addEventListener("pointermove", H), document.addEventListener("pointerup", U);
|
|
79
|
+
}, G = (e) => W(e, null), K = (e, t) => W(e, t), se = (e, t) => {
|
|
80
|
+
if (c.disabled) return;
|
|
81
|
+
let { key: n } = e;
|
|
82
|
+
if (n === "Home" || n === "End") {
|
|
83
|
+
e.preventDefault(), R(t, n === "Home" ? c.min : c.max), y("change", j.value);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
let r = n === "ArrowRight" || n === "ArrowUp" ? c.step : n === "ArrowLeft" || n === "ArrowDown" ? -c.step : 0;
|
|
87
|
+
r && (e.preventDefault(), R(t, P.value[t] + r), y("change", j.value));
|
|
88
|
+
}, ce = r(() => c.vertical ? N.value ? {
|
|
89
|
+
bottom: `${F.value[0]}%`,
|
|
90
|
+
height: `${F.value[1] - F.value[0]}%`
|
|
91
|
+
} : {
|
|
92
|
+
bottom: "0%",
|
|
93
|
+
height: `${F.value[0]}%`
|
|
94
|
+
} : N.value ? {
|
|
95
|
+
left: `${F.value[0]}%`,
|
|
96
|
+
width: `${F.value[1] - F.value[0]}%`
|
|
97
|
+
} : {
|
|
98
|
+
left: "0%",
|
|
99
|
+
width: `${F.value[0]}%`
|
|
100
|
+
}), le = (e) => c.vertical ? { bottom: `${F.value[e]}%` } : { left: `${F.value[e]}%` }, q = r(() => {
|
|
101
|
+
let e = /* @__PURE__ */ new Map();
|
|
102
|
+
if (c.step > 1) for (let t = 1;; t++) {
|
|
103
|
+
let n = I(c.min + t * c.step);
|
|
104
|
+
if (n >= c.max) break;
|
|
105
|
+
e.set(n, void 0);
|
|
106
|
+
}
|
|
107
|
+
for (let t of Object.keys(c.marks || {})) {
|
|
108
|
+
let n = I(Number(t));
|
|
109
|
+
n >= c.min && n <= c.max && e.set(n, c.marks[Number(t)]);
|
|
110
|
+
}
|
|
111
|
+
let t = c.max - c.min || 1;
|
|
112
|
+
return Array.from(e.entries()).map(([e, n]) => ({
|
|
113
|
+
value: e,
|
|
114
|
+
percent: (e - c.min) / t * 100,
|
|
115
|
+
label: n
|
|
116
|
+
}));
|
|
117
|
+
}), ue = r(() => q.value.filter((e) => e.label !== void 0)), de = r(() => q.value.filter((e) => e.value > c.min && e.value < c.max)), J = (e) => c.vertical ? { bottom: `${e}%` } : { left: `${e}%` }, fe = (e) => !c.tooltip || c.disabled ? !1 : z.value && B.value === e || V.value === e, Y = (e) => {
|
|
118
|
+
let t = P.value[e];
|
|
119
|
+
return String(c.format ? c.format(t) : t);
|
|
120
|
+
}, X = te(), Z = D(), Q = n(Z), $ = l(Q, 1);
|
|
121
|
+
return f(() => {
|
|
122
|
+
let e = C(O);
|
|
123
|
+
m(Z, [
|
|
124
|
+
e.b(),
|
|
125
|
+
e.m(C(A)),
|
|
126
|
+
e.is("vertical", o.vertical),
|
|
127
|
+
e.is("disabled", o.disabled),
|
|
128
|
+
e.is("range", o.range)
|
|
129
|
+
]), m(Q, [e.e("rail")]), m($, [e.e("fill")]), _($, ce.value);
|
|
130
|
+
}), h(Z, null, 2), i(() => de.value, (e) => {
|
|
131
|
+
let t = w();
|
|
132
|
+
return f(() => {
|
|
133
|
+
m(t, [C(O).e("mark")]), _(t, J(e.value.percent));
|
|
134
|
+
}), t;
|
|
135
|
+
}, (e) => `mark-${e.value}`, 8), h(Z, null, 3), i(() => ue.value, (e) => {
|
|
136
|
+
let t = T(), n = S(t);
|
|
137
|
+
return f(() => {
|
|
138
|
+
let r = e.value;
|
|
139
|
+
m(t, [C(O).e("mark-label")]), _(t, J(r.percent)), v(n, b(r.label));
|
|
140
|
+
}), t;
|
|
141
|
+
}, (e) => `mark-label-${e.value}`, 8), h(Z, null, 4), i(() => ae.value, (e) => {
|
|
142
|
+
let t = E();
|
|
143
|
+
return f(() => {
|
|
144
|
+
let n = C(O), r = e.value, i = o.disabled;
|
|
145
|
+
m(t, [n.e("handle"), n.is("active", z.value && B.value === r)]), _(t, le(r)), g(t, "tabindex", i ? -1 : 0), p(t, "aria-valuemin", o.min), p(t, "aria-valuemax", o.max), p(t, "aria-valuenow", P.value[r]), p(t, "aria-valuetext", Y(r)), p(t, "aria-orientation", o.vertical ? "vertical" : "horizontal"), p(t, "aria-disabled", i);
|
|
146
|
+
}), h(t, null, 0), ee(() => fe(e.value), () => {
|
|
147
|
+
let t = T(), n = S(t);
|
|
148
|
+
return f(() => {
|
|
149
|
+
m(t, [C(O).e("tooltip")]), v(n, b(Y(e.value)));
|
|
150
|
+
}), t;
|
|
151
|
+
}), u(t, "pointerdown", ie((t) => K(t, e.value), ["stop"])), t.$evtkeydown = a((t) => se(t, e.value)), u(t, "mouseenter", () => V.value = e.value), u(t, "mouseleave", () => V.value = null), t;
|
|
152
|
+
}, (e) => e, 8), Z.$evtpointerdown = a(G), X(Z, M, null, "trackRef"), Z;
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
//#endregion
|
|
156
|
+
export { O as default };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export interface SliderProps {
|
|
2
|
+
/** 滑块值(v-model),range 时为 [起始值, 结束值] */
|
|
3
|
+
modelValue?: number | [number, number];
|
|
4
|
+
/** 默认值 */
|
|
5
|
+
defaultValue?: number | [number, number];
|
|
6
|
+
/** 最小值
|
|
7
|
+
* @default 0
|
|
8
|
+
*/
|
|
9
|
+
min?: number;
|
|
10
|
+
/** 最大值
|
|
11
|
+
* @default 100
|
|
12
|
+
*/
|
|
13
|
+
max?: number;
|
|
14
|
+
/** 步长
|
|
15
|
+
* @default 1
|
|
16
|
+
*/
|
|
17
|
+
step?: number;
|
|
18
|
+
/** 是否竖向
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
vertical?: boolean;
|
|
22
|
+
/** 是否为范围选择(双滑块)
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
range?: boolean;
|
|
26
|
+
/** 是否禁用
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
/** 是否显示 tooltip
|
|
31
|
+
* @default true
|
|
32
|
+
*/
|
|
33
|
+
tooltip?: boolean;
|
|
34
|
+
/** 刻度标记,key 为位置值,value 为标签文本 */
|
|
35
|
+
marks?: Record<number, string>;
|
|
36
|
+
/** tooltip 内容格式化函数 */
|
|
37
|
+
format?: (value: number) => string | number;
|
|
38
|
+
/** 尺寸
|
|
39
|
+
* @default medium
|
|
40
|
+
*/
|
|
41
|
+
size?: "mini" | "small" | "medium" | "large";
|
|
42
|
+
}
|
|
43
|
+
export interface SliderEmits {
|
|
44
|
+
/** 拖动或点击轨道时持续触发 */
|
|
45
|
+
input: [value: number | [number, number]];
|
|
46
|
+
/** 一次拖动/点击/键盘操作结束时触发 */
|
|
47
|
+
change: [value: number | [number, number]];
|
|
48
|
+
}
|
|
@@ -55,25 +55,26 @@ import { SPagination as xe } from "../components/src/pagination/index.mjs";
|
|
|
55
55
|
import { SPanel as Se } from "../components/src/panel/index.mjs";
|
|
56
56
|
import { SProgress as Ce } from "../components/src/progress/index.mjs";
|
|
57
57
|
import { SSkeleton as we } from "../components/src/skeleton/index.mjs";
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
58
|
+
import { SSlider as Te } from "../components/src/slider/index.mjs";
|
|
59
|
+
import { SSliderVerify as Ee } from "../components/src/slider-verify/index.mjs";
|
|
60
|
+
import { SSplit as De, SSplitPane as Oe } from "../components/src/split/index.mjs";
|
|
61
|
+
import { SStatistic as ke } from "../components/src/statistic/index.mjs";
|
|
62
|
+
import { SSteps as Ae } from "../components/src/steps/index.mjs";
|
|
63
|
+
import { SSwitch as je } from "../components/src/switch/index.mjs";
|
|
64
|
+
import { STable as Me } from "../components/src/table/index.mjs";
|
|
65
|
+
import { STextarea as Ne } from "../components/src/textarea/index.mjs";
|
|
66
|
+
import { STree as Pe } from "../components/src/tree/index.mjs";
|
|
67
|
+
import { STransfer as Fe } from "../components/src/transfer/index.mjs";
|
|
68
|
+
import { STimeline as Ie, STimelineItem as Le } from "../components/src/timeline/index.mjs";
|
|
69
|
+
import { STreeSelect as Re } from "../components/src/tree-select/index.mjs";
|
|
70
|
+
import { SUpload as ze } from "../components/src/upload/index.mjs";
|
|
71
|
+
import { SVirtualList as Be } from "../components/src/virtual-list/index.mjs";
|
|
72
|
+
import { SWaterfall as Ve } from "../components/src/waterfall/index.mjs";
|
|
73
|
+
import { SWatermark as He } from "../components/src/watermark/index.mjs";
|
|
74
|
+
import { SWheel as Ue } from "../components/src/wheel/index.mjs";
|
|
74
75
|
import "../components/index.mjs";
|
|
75
76
|
//#region components.ts
|
|
76
|
-
var
|
|
77
|
+
var We = [
|
|
77
78
|
e,
|
|
78
79
|
t,
|
|
79
80
|
f,
|
|
@@ -145,32 +146,33 @@ var Ue = [
|
|
|
145
146
|
D,
|
|
146
147
|
we,
|
|
147
148
|
Te,
|
|
148
|
-
_e,
|
|
149
149
|
Ee,
|
|
150
|
+
_e,
|
|
150
151
|
De,
|
|
151
152
|
Oe,
|
|
152
|
-
me,
|
|
153
153
|
ke,
|
|
154
|
+
me,
|
|
154
155
|
Ae,
|
|
155
|
-
J,
|
|
156
156
|
je,
|
|
157
|
+
J,
|
|
158
|
+
Me,
|
|
157
159
|
Y,
|
|
158
160
|
X,
|
|
159
161
|
ve,
|
|
160
162
|
v,
|
|
161
|
-
|
|
162
|
-
Fe,
|
|
163
|
+
Ne,
|
|
163
164
|
Ie,
|
|
165
|
+
Le,
|
|
164
166
|
a,
|
|
165
|
-
|
|
167
|
+
Fe,
|
|
166
168
|
k,
|
|
167
|
-
|
|
168
|
-
Le,
|
|
169
|
+
Pe,
|
|
169
170
|
Re,
|
|
170
171
|
ze,
|
|
171
172
|
Be,
|
|
172
173
|
Ve,
|
|
173
|
-
He
|
|
174
|
+
He,
|
|
175
|
+
Ue
|
|
174
176
|
];
|
|
175
177
|
//#endregion
|
|
176
|
-
export {
|
|
178
|
+
export { We as default };
|
package/dist/es/core/global.d.ts
CHANGED
|
@@ -69,6 +69,7 @@ declare module "vue" {
|
|
|
69
69
|
SSegmented: (typeof import("savor-ui"))["SSegmented"];
|
|
70
70
|
SSelect: (typeof import("savor-ui"))["SSelect"];
|
|
71
71
|
SSkeleton: (typeof import("savor-ui"))["SSkeleton"];
|
|
72
|
+
SSlider: (typeof import("savor-ui"))["SSlider"];
|
|
72
73
|
SSliderVerify: (typeof import("savor-ui"))["SSliderVerify"];
|
|
73
74
|
SSpace: (typeof import("savor-ui"))["SSpace"];
|
|
74
75
|
SSplit: (typeof import("savor-ui"))["SSplit"];
|
package/dist/es/core/index.mjs
CHANGED
|
@@ -75,30 +75,31 @@ import { SPagination as We } from "../components/src/pagination/index.mjs";
|
|
|
75
75
|
import { SPanel as Ge } from "../components/src/panel/index.mjs";
|
|
76
76
|
import { SProgress as Ke } from "../components/src/progress/index.mjs";
|
|
77
77
|
import { SSkeleton as qe } from "../components/src/skeleton/index.mjs";
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
78
|
+
import { SSlider as Je } from "../components/src/slider/index.mjs";
|
|
79
|
+
import { SSliderVerify as Ye } from "../components/src/slider-verify/index.mjs";
|
|
80
|
+
import { splitContextKey as Xe } from "../components/src/split/types.mjs";
|
|
81
|
+
import { SSplit as Ze, SSplitPane as Qe } from "../components/src/split/index.mjs";
|
|
82
|
+
import { SStatistic as $e } from "../components/src/statistic/index.mjs";
|
|
83
|
+
import { SSteps as et } from "../components/src/steps/index.mjs";
|
|
84
|
+
import { SSwitch as tt } from "../components/src/switch/index.mjs";
|
|
85
|
+
import { tableContextKey as nt } from "../components/src/table/types.mjs";
|
|
86
|
+
import { STable as rt } from "../components/src/table/index.mjs";
|
|
87
|
+
import { STextarea as it } from "../components/src/textarea/index.mjs";
|
|
88
|
+
import { treeContextKey as at } from "../components/src/tree/types.mjs";
|
|
89
|
+
import { STree as ot } from "../components/src/tree/index.mjs";
|
|
90
|
+
import { STransfer as st } from "../components/src/transfer/index.mjs";
|
|
91
|
+
import { timelineContextKey as ct } from "../components/src/timeline/types.mjs";
|
|
92
|
+
import { STimeline as lt, STimelineItem as ut } from "../components/src/timeline/index.mjs";
|
|
93
|
+
import { STreeSelect as dt } from "../components/src/tree-select/index.mjs";
|
|
94
|
+
import { SUpload as ft } from "../components/src/upload/index.mjs";
|
|
95
|
+
import { SVirtualList as pt } from "../components/src/virtual-list/index.mjs";
|
|
96
|
+
import { SWaterfall as mt } from "../components/src/waterfall/index.mjs";
|
|
97
|
+
import { SWatermark as ht } from "../components/src/watermark/index.mjs";
|
|
98
|
+
import { SWheel as gt } from "../components/src/wheel/index.mjs";
|
|
98
99
|
import "../components/index.mjs";
|
|
99
|
-
import
|
|
100
|
-
import
|
|
100
|
+
import _t from "./components.mjs";
|
|
101
|
+
import vt from "dayjs";
|
|
101
102
|
//#region index.ts
|
|
102
|
-
var
|
|
103
|
+
var yt = e(_t);
|
|
103
104
|
//#endregion
|
|
104
|
-
export { t as SAlert, r as SAnchor, i as SAnchorLink, y as SAutoComplete, x as SAvatar, S as SAvatarGroup, _ as SBackTop, C as SBadge, w as SButton, T as SButtonGroup, D as SCard, O as SCarousel, I as SCascader, L as SChatList, R as SChatSender, j as SCheckbox, M as SCheckboxGroup, V as SCollapse, H as SCollapseItem, W as SColorPicker, l as SConfigProvider, G as SDatePicker, K as SDatetimePicker, J as SDescriptions, Y as SDescriptionsItem, X as SDivider, $ as SDoption, Z as SDrawer, ee as SDropdown, te as SDsubmenu, k as SEmpty, ne as SExpandCard, f as SForm, p as SFormItem, re as SGalleria, ae as SGrid, oe as SGridItem, se as SHighlight, h as SIcon, fe as SIconSelect, me as SImage, he as SImageGroup, ge as SImagePreview, m as SInput, _e as SInputGroup, ve as SInputNumber, ye as SInputTag, xe as SLayout, Se as SLayoutAside, Ce as SLayoutContent, we as SLayoutFooter, Te as SLayoutHeader, Ee as SLink, De as SList, je as SMenu, Me as SMenuGroup, Ne as SMenuItem, Ie as SMeterGroup, Re as SModal, He as SOverflowList, We as SPagination, Ge as SPanel, u as SPopover, Ke as SProgress, P as SRadio, F as SRadioGroup, v as SScrollbar, U as SSegmented, Ue as SSelect, qe as SSkeleton, Je as SSliderVerify, ze as SSpace,
|
|
105
|
+
export { t as SAlert, r as SAnchor, i as SAnchorLink, y as SAutoComplete, x as SAvatar, S as SAvatarGroup, _ as SBackTop, C as SBadge, w as SButton, T as SButtonGroup, D as SCard, O as SCarousel, I as SCascader, L as SChatList, R as SChatSender, j as SCheckbox, M as SCheckboxGroup, V as SCollapse, H as SCollapseItem, W as SColorPicker, l as SConfigProvider, G as SDatePicker, K as SDatetimePicker, J as SDescriptions, Y as SDescriptionsItem, X as SDivider, $ as SDoption, Z as SDrawer, ee as SDropdown, te as SDsubmenu, k as SEmpty, ne as SExpandCard, f as SForm, p as SFormItem, re as SGalleria, ae as SGrid, oe as SGridItem, se as SHighlight, h as SIcon, fe as SIconSelect, me as SImage, he as SImageGroup, ge as SImagePreview, m as SInput, _e as SInputGroup, ve as SInputNumber, ye as SInputTag, xe as SLayout, Se as SLayoutAside, Ce as SLayoutContent, we as SLayoutFooter, Te as SLayoutHeader, Ee as SLink, De as SList, je as SMenu, Me as SMenuGroup, Ne as SMenuItem, Ie as SMeterGroup, Re as SModal, He as SOverflowList, We as SPagination, Ge as SPanel, u as SPopover, Ke as SProgress, P as SRadio, F as SRadioGroup, v as SScrollbar, U as SSegmented, Ue as SSelect, qe as SSkeleton, Je as SSlider, Ye as SSliderVerify, ze as SSpace, Ze as SSplit, Qe as SSplitPane, $e as SStatistic, et as SSteps, Pe as SSubMenu, tt as SSwitch, le as STab, ue as STabPane, rt as STable, de as STabs, Ve as STag, E as SText, it as STextarea, lt as STimeline, ut as STimelineItem, d as STooltip, st as STransfer, z as STransition, ot as STree, dt as STreeSelect, ft as SUpload, pt as SVirtualList, mt as SWaterfall, ht as SWatermark, gt as SWheel, n as anchorContextKey, b as avatarGroupContextKey, g as buttonGroupContextKey, A as checkboxGroupContextKey, B as collapseContextKey, c as configProviderContextKey, vt as dayjs, yt as default, q as descriptionsContextKey, Q as dropdownContextKey, a as formContextKey, o as formItemContextKey, s as formItemStatusContextKey, ie as gridContextKey, pe as imageGroupContextKey, Oe as menuContextKey, ke as menuLevelContextKey, N as radioGroupContextKey, Xe as splitContextKey, Ae as subMenuContextKey, nt as tableContextKey, ce as tabsContextKey, ct as timelineContextKey, at as treeContextKey, be as useLayer, Fe as useMessage, Le as useModal, Be as useNotification };
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
@use "../mixins/function.scss" as *;
|
|
2
|
+
@use "../mixins/mixins.scss" as *;
|
|
3
|
+
@use "../common/var.scss" as *;
|
|
4
|
+
|
|
5
|
+
@include b(slider) {
|
|
6
|
+
--s-slider-rail-size: 4px;
|
|
7
|
+
--s-slider-handle-size: 14px;
|
|
8
|
+
|
|
9
|
+
position: relative;
|
|
10
|
+
display: inline-block;
|
|
11
|
+
width: 100%;
|
|
12
|
+
height: 32px;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
touch-action: none;
|
|
15
|
+
outline: none;
|
|
16
|
+
|
|
17
|
+
@include e(rail) {
|
|
18
|
+
position: absolute;
|
|
19
|
+
left: 0;
|
|
20
|
+
right: 0;
|
|
21
|
+
top: 50%;
|
|
22
|
+
height: var(--s-slider-rail-size);
|
|
23
|
+
transform: translateY(-50%);
|
|
24
|
+
background-color: getCssVar("color", "fill-2");
|
|
25
|
+
border-radius: getCssVar("radius", "round");
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@include e(fill) {
|
|
29
|
+
position: absolute;
|
|
30
|
+
top: 50%;
|
|
31
|
+
height: var(--s-slider-rail-size);
|
|
32
|
+
transform: translateY(-50%);
|
|
33
|
+
background-color: getCssVar("color", "primary-6");
|
|
34
|
+
border-radius: getCssVar("radius", "round");
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@include e(handle) {
|
|
38
|
+
position: absolute;
|
|
39
|
+
top: 50%;
|
|
40
|
+
width: var(--s-slider-handle-size);
|
|
41
|
+
height: var(--s-slider-handle-size);
|
|
42
|
+
transform: translate(-50%, -50%);
|
|
43
|
+
background-color: getCssVar("color", "bg-3");
|
|
44
|
+
border: 2px solid getCssVar("color", "primary-6");
|
|
45
|
+
border-radius: getCssVar("radius", "circle");
|
|
46
|
+
box-sizing: border-box;
|
|
47
|
+
cursor: grab;
|
|
48
|
+
outline: none;
|
|
49
|
+
transition: box-shadow 0.2s getCssVar("bezier", "1");
|
|
50
|
+
|
|
51
|
+
&:hover,
|
|
52
|
+
&:focus-visible {
|
|
53
|
+
box-shadow: 0 0 0 4px getCssVar("color", "primary-3");
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@include when(active) {
|
|
57
|
+
box-shadow: 0 0 0 4px getCssVar("color", "primary-3");
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&:active {
|
|
61
|
+
cursor: grabbing;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@include e(mark) {
|
|
66
|
+
position: absolute;
|
|
67
|
+
top: 50%;
|
|
68
|
+
width: var(--s-slider-rail-size);
|
|
69
|
+
height: var(--s-slider-rail-size);
|
|
70
|
+
transform: translate(-50%, -50%);
|
|
71
|
+
background-color: getCssVar("color", "bg-3");
|
|
72
|
+
pointer-events: none;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@include e(mark-label) {
|
|
76
|
+
position: absolute;
|
|
77
|
+
top: calc(50% + (var(--s-slider-rail-size) / 2) + 4px);
|
|
78
|
+
transform: translateX(-50%);
|
|
79
|
+
font-size: getCssVar("font-size", "mini");
|
|
80
|
+
line-height: 1.5715;
|
|
81
|
+
color: getCssVar("color", "text-2");
|
|
82
|
+
white-space: nowrap;
|
|
83
|
+
pointer-events: none;
|
|
84
|
+
user-select: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@include e(tooltip) {
|
|
88
|
+
position: absolute;
|
|
89
|
+
bottom: calc(100% + 8px);
|
|
90
|
+
left: 50%;
|
|
91
|
+
transform: translateX(-50%);
|
|
92
|
+
background-color: #373739;
|
|
93
|
+
color: #fff;
|
|
94
|
+
font-size: getCssVar("font-size", "mini");
|
|
95
|
+
line-height: 1.5715;
|
|
96
|
+
padding: 2px 8px;
|
|
97
|
+
border-radius: getCssVar("radius", "small");
|
|
98
|
+
white-space: nowrap;
|
|
99
|
+
pointer-events: none;
|
|
100
|
+
z-index: 1;
|
|
101
|
+
|
|
102
|
+
&::after {
|
|
103
|
+
content: "";
|
|
104
|
+
position: absolute;
|
|
105
|
+
top: 100%;
|
|
106
|
+
left: 50%;
|
|
107
|
+
transform: translateX(-50%);
|
|
108
|
+
border: 4px solid transparent;
|
|
109
|
+
border-top-color: #373739;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@include when(disabled) {
|
|
114
|
+
cursor: not-allowed;
|
|
115
|
+
|
|
116
|
+
@include be(slider, fill) {
|
|
117
|
+
background-color: getCssVar("color", "primary-3");
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@include be(slider, handle) {
|
|
121
|
+
border-color: getCssVar("color", "primary-3");
|
|
122
|
+
cursor: not-allowed;
|
|
123
|
+
|
|
124
|
+
&:hover {
|
|
125
|
+
box-shadow: none;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@include when(vertical) {
|
|
131
|
+
width: 32px;
|
|
132
|
+
height: 100%;
|
|
133
|
+
|
|
134
|
+
@include be(slider, rail) {
|
|
135
|
+
left: 50%;
|
|
136
|
+
right: auto;
|
|
137
|
+
top: 0;
|
|
138
|
+
bottom: 0;
|
|
139
|
+
width: var(--s-slider-rail-size);
|
|
140
|
+
height: auto;
|
|
141
|
+
transform: translateX(-50%);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
@include be(slider, fill) {
|
|
145
|
+
left: 50%;
|
|
146
|
+
top: auto;
|
|
147
|
+
bottom: 0;
|
|
148
|
+
width: var(--s-slider-rail-size);
|
|
149
|
+
height: auto;
|
|
150
|
+
transform: translateX(-50%);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@include be(slider, handle) {
|
|
154
|
+
left: 50%;
|
|
155
|
+
top: auto;
|
|
156
|
+
transform: translate(-50%, 50%);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
@include be(slider, mark) {
|
|
160
|
+
top: auto;
|
|
161
|
+
left: 50%;
|
|
162
|
+
transform: translate(-50%, 50%);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
@include be(slider, mark-label) {
|
|
166
|
+
top: auto;
|
|
167
|
+
bottom: 0;
|
|
168
|
+
left: calc(50% + (var(--s-slider-rail-size) / 2) + 4px);
|
|
169
|
+
transform: translateY(50%);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
@include be(slider, tooltip) {
|
|
173
|
+
bottom: auto;
|
|
174
|
+
left: calc(100% + 8px);
|
|
175
|
+
top: 50%;
|
|
176
|
+
transform: translateY(-50%);
|
|
177
|
+
|
|
178
|
+
&::after {
|
|
179
|
+
top: 50%;
|
|
180
|
+
left: auto;
|
|
181
|
+
right: 100%;
|
|
182
|
+
transform: translateY(-50%);
|
|
183
|
+
border-top-color: transparent;
|
|
184
|
+
border-right-color: #373739;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
@include m(mini) {
|
|
190
|
+
--s-slider-rail-size: 2px;
|
|
191
|
+
--s-slider-handle-size: 10px;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
@include m(small) {
|
|
195
|
+
--s-slider-rail-size: 3px;
|
|
196
|
+
--s-slider-handle-size: 12px;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
@include m(large) {
|
|
200
|
+
--s-slider-rail-size: 6px;
|
|
201
|
+
--s-slider-handle-size: 18px;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
@@ -2,7 +2,8 @@ import { ThemeTokens } from './types';
|
|
|
2
2
|
type ThemeMode = "light" | "dark";
|
|
3
3
|
export declare const lightTheme: ThemeTokens;
|
|
4
4
|
export declare const darkTheme: ThemeTokens;
|
|
5
|
-
export declare
|
|
6
|
-
export declare
|
|
7
|
-
export declare
|
|
5
|
+
export declare const resolveThemeTokens: (overrides?: Partial<ThemeTokens>, mode?: ThemeMode) => ThemeTokens;
|
|
6
|
+
export declare const tokensToCssVars: (tokens: ThemeTokens, mode?: ThemeMode) => Record<string, string>;
|
|
7
|
+
export declare const injectOrUpdateStyle: (id: string, selector: string, declarations: Record<string, string>) => void;
|
|
8
|
+
export declare const initTheme: (light?: Partial<ThemeTokens>, dark?: Partial<ThemeTokens>) => void;
|
|
8
9
|
export {};
|
|
@@ -92,30 +92,41 @@ var t = "s", n = [
|
|
|
92
92
|
"colorWarning",
|
|
93
93
|
"colorDanger",
|
|
94
94
|
"colorInfo"
|
|
95
|
-
])
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
95
|
+
]), o = new Set([
|
|
96
|
+
...n.map((e) => `colorFill${e}`),
|
|
97
|
+
"colorText1",
|
|
98
|
+
"colorText2",
|
|
99
|
+
"colorText3",
|
|
100
|
+
"colorBg1",
|
|
101
|
+
"colorBg2",
|
|
102
|
+
"colorBg3",
|
|
103
|
+
"shadow1",
|
|
104
|
+
"shadow2",
|
|
105
|
+
"shadow3"
|
|
106
|
+
]), s = (e) => {
|
|
107
|
+
if (!e) return {};
|
|
108
|
+
let t = {};
|
|
109
|
+
for (let [n, r] of Object.entries(e)) o.has(n) || (t[n] = r);
|
|
110
|
+
return t;
|
|
111
|
+
}, c = (e) => e.replace(/[A-Z]/g, (e) => "-" + e.toLowerCase()).replace(/([a-zA-Z])(\d)/g, "$1-$2").replace(/^-/, ""), l = (e, t = "light") => ({
|
|
112
|
+
...t === "light" ? r : i,
|
|
113
|
+
...e
|
|
114
|
+
}), u = (r, i = "light") => {
|
|
115
|
+
let o = {};
|
|
116
|
+
for (let [s, l] of Object.entries(r)) if (a.has(s)) {
|
|
117
|
+
let r = `--${t}-${c(s)}`, a = e(l, { theme: i === "dark" ? "dark" : "default" });
|
|
118
|
+
for (let e = 0; e < n.length; e++) o[`${r}-${n[e]}`] = a[e];
|
|
119
|
+
} else o[`--${t}-${c(s)}`] = l;
|
|
120
|
+
return o;
|
|
121
|
+
}, d = (e, t, n) => {
|
|
114
122
|
let r = document.getElementById(e);
|
|
115
123
|
r || (r = document.createElement("style"), r.id = e, document.head.appendChild(r)), r.textContent = `${t} {\n${Object.entries(n).map(([e, t]) => ` ${e}: ${t};`).join("\n")}\n}`;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
124
|
+
}, f = (e, t) => {
|
|
125
|
+
let n = {
|
|
126
|
+
...s(e),
|
|
127
|
+
...t
|
|
128
|
+
};
|
|
129
|
+
d("root-light-theme", ":root", u(l(e, "light"), "light")), d("root-dark-theme", "html.dark", u(l(n, "dark"), "dark"));
|
|
130
|
+
};
|
|
120
131
|
//#endregion
|
|
121
|
-
export { i as darkTheme,
|
|
132
|
+
export { i as darkTheme, f as initTheme, r as lightTheme, l as resolveThemeTokens, u as tokensToCssVars };
|
|
@@ -2150,6 +2150,55 @@
|
|
|
2150
2150
|
"s-skeleton/exclude": {
|
|
2151
2151
|
"description": "排除的选择器列表(匹配的元素及其子元素不生成骨架)"
|
|
2152
2152
|
},
|
|
2153
|
+
"s-slider/input": {
|
|
2154
|
+
"description": "拖动或点击轨道时持续触发"
|
|
2155
|
+
},
|
|
2156
|
+
"s-slider/change": {
|
|
2157
|
+
"description": "一次拖动/点击/键盘操作结束时触发"
|
|
2158
|
+
},
|
|
2159
|
+
"s-slider/modelValue": {
|
|
2160
|
+
"description": "滑块值(v-model),range 时为 [起始值, 结束值]"
|
|
2161
|
+
},
|
|
2162
|
+
"s-slider/defaultValue": {
|
|
2163
|
+
"description": "默认值"
|
|
2164
|
+
},
|
|
2165
|
+
"s-slider/min": {
|
|
2166
|
+
"description": "最小值",
|
|
2167
|
+
"type": "number"
|
|
2168
|
+
},
|
|
2169
|
+
"s-slider/max": {
|
|
2170
|
+
"description": "最大值",
|
|
2171
|
+
"type": "number"
|
|
2172
|
+
},
|
|
2173
|
+
"s-slider/step": {
|
|
2174
|
+
"description": "步长",
|
|
2175
|
+
"type": "number"
|
|
2176
|
+
},
|
|
2177
|
+
"s-slider/vertical": {
|
|
2178
|
+
"description": "是否竖向",
|
|
2179
|
+
"type": "boolean"
|
|
2180
|
+
},
|
|
2181
|
+
"s-slider/range": {
|
|
2182
|
+
"description": "是否为范围选择(双滑块)",
|
|
2183
|
+
"type": "boolean"
|
|
2184
|
+
},
|
|
2185
|
+
"s-slider/disabled": {
|
|
2186
|
+
"description": "是否禁用",
|
|
2187
|
+
"type": "boolean"
|
|
2188
|
+
},
|
|
2189
|
+
"s-slider/tooltip": {
|
|
2190
|
+
"description": "是否显示 tooltip",
|
|
2191
|
+
"type": "boolean"
|
|
2192
|
+
},
|
|
2193
|
+
"s-slider/marks": {
|
|
2194
|
+
"description": "刻度标记,key 为位置值,value 为标签文本"
|
|
2195
|
+
},
|
|
2196
|
+
"s-slider/format": {
|
|
2197
|
+
"description": "tooltip 内容格式化函数"
|
|
2198
|
+
},
|
|
2199
|
+
"s-slider/size": {
|
|
2200
|
+
"description": "尺寸"
|
|
2201
|
+
},
|
|
2153
2202
|
"s-slider-verify/result": {
|
|
2154
2203
|
"description": "是否通过验证(v-model:result)",
|
|
2155
2204
|
"type": "boolean"
|
|
@@ -892,6 +892,24 @@
|
|
|
892
892
|
"exclude"
|
|
893
893
|
]
|
|
894
894
|
},
|
|
895
|
+
"s-slider": {
|
|
896
|
+
"attributes": [
|
|
897
|
+
"input",
|
|
898
|
+
"change",
|
|
899
|
+
"modelValue",
|
|
900
|
+
"defaultValue",
|
|
901
|
+
"min",
|
|
902
|
+
"max",
|
|
903
|
+
"step",
|
|
904
|
+
"vertical",
|
|
905
|
+
"range",
|
|
906
|
+
"disabled",
|
|
907
|
+
"tooltip",
|
|
908
|
+
"marks",
|
|
909
|
+
"format",
|
|
910
|
+
"size"
|
|
911
|
+
]
|
|
912
|
+
},
|
|
895
913
|
"s-slider-verify": {
|
|
896
914
|
"attributes": [
|
|
897
915
|
"result",
|
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.33.0",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"types-syntax": "typescript",
|
|
@@ -5586,6 +5586,118 @@
|
|
|
5586
5586
|
}
|
|
5587
5587
|
]
|
|
5588
5588
|
},
|
|
5589
|
+
{
|
|
5590
|
+
"name": "s-slider",
|
|
5591
|
+
"attributes": [
|
|
5592
|
+
{
|
|
5593
|
+
"name": "modelValue",
|
|
5594
|
+
"description": "滑块值(v-model),range 时为 [起始值, 结束值]",
|
|
5595
|
+
"value": {
|
|
5596
|
+
"type": "number | [number, number]",
|
|
5597
|
+
"kind": "expression"
|
|
5598
|
+
}
|
|
5599
|
+
},
|
|
5600
|
+
{
|
|
5601
|
+
"name": "defaultValue",
|
|
5602
|
+
"description": "默认值",
|
|
5603
|
+
"value": {
|
|
5604
|
+
"type": "number | [number, number]",
|
|
5605
|
+
"kind": "expression"
|
|
5606
|
+
}
|
|
5607
|
+
},
|
|
5608
|
+
{
|
|
5609
|
+
"name": "min",
|
|
5610
|
+
"description": "最小值",
|
|
5611
|
+
"value": {
|
|
5612
|
+
"type": "number",
|
|
5613
|
+
"kind": "expression"
|
|
5614
|
+
}
|
|
5615
|
+
},
|
|
5616
|
+
{
|
|
5617
|
+
"name": "max",
|
|
5618
|
+
"description": "最大值",
|
|
5619
|
+
"value": {
|
|
5620
|
+
"type": "number",
|
|
5621
|
+
"kind": "expression"
|
|
5622
|
+
}
|
|
5623
|
+
},
|
|
5624
|
+
{
|
|
5625
|
+
"name": "step",
|
|
5626
|
+
"description": "步长",
|
|
5627
|
+
"value": {
|
|
5628
|
+
"type": "number",
|
|
5629
|
+
"kind": "expression"
|
|
5630
|
+
}
|
|
5631
|
+
},
|
|
5632
|
+
{
|
|
5633
|
+
"name": "vertical",
|
|
5634
|
+
"description": "是否竖向",
|
|
5635
|
+
"value": {
|
|
5636
|
+
"type": "boolean",
|
|
5637
|
+
"kind": "expression"
|
|
5638
|
+
}
|
|
5639
|
+
},
|
|
5640
|
+
{
|
|
5641
|
+
"name": "range",
|
|
5642
|
+
"description": "是否为范围选择(双滑块)",
|
|
5643
|
+
"value": {
|
|
5644
|
+
"type": "boolean",
|
|
5645
|
+
"kind": "expression"
|
|
5646
|
+
}
|
|
5647
|
+
},
|
|
5648
|
+
{
|
|
5649
|
+
"name": "disabled",
|
|
5650
|
+
"description": "是否禁用",
|
|
5651
|
+
"value": {
|
|
5652
|
+
"type": "boolean",
|
|
5653
|
+
"kind": "expression"
|
|
5654
|
+
}
|
|
5655
|
+
},
|
|
5656
|
+
{
|
|
5657
|
+
"name": "tooltip",
|
|
5658
|
+
"description": "是否显示 tooltip",
|
|
5659
|
+
"value": {
|
|
5660
|
+
"type": "boolean",
|
|
5661
|
+
"kind": "expression"
|
|
5662
|
+
}
|
|
5663
|
+
},
|
|
5664
|
+
{
|
|
5665
|
+
"name": "marks",
|
|
5666
|
+
"description": "刻度标记,key 为位置值,value 为标签文本",
|
|
5667
|
+
"value": {
|
|
5668
|
+
"type": "Record<number, string>",
|
|
5669
|
+
"kind": "expression"
|
|
5670
|
+
}
|
|
5671
|
+
},
|
|
5672
|
+
{
|
|
5673
|
+
"name": "format",
|
|
5674
|
+
"description": "tooltip 内容格式化函数",
|
|
5675
|
+
"value": {
|
|
5676
|
+
"type": "(value: number) => string | number",
|
|
5677
|
+
"kind": "expression"
|
|
5678
|
+
}
|
|
5679
|
+
},
|
|
5680
|
+
{
|
|
5681
|
+
"name": "size",
|
|
5682
|
+
"description": "尺寸",
|
|
5683
|
+
"value": {
|
|
5684
|
+
"type": "mini | small | medium | large",
|
|
5685
|
+
"kind": "expression"
|
|
5686
|
+
}
|
|
5687
|
+
}
|
|
5688
|
+
],
|
|
5689
|
+
"events": [
|
|
5690
|
+
{
|
|
5691
|
+
"name": "input",
|
|
5692
|
+
"description": "拖动或点击轨道时持续触发"
|
|
5693
|
+
},
|
|
5694
|
+
{
|
|
5695
|
+
"name": "change",
|
|
5696
|
+
"description": "一次拖动/点击/键盘操作结束时触发"
|
|
5697
|
+
}
|
|
5698
|
+
],
|
|
5699
|
+
"slots": []
|
|
5700
|
+
},
|
|
5589
5701
|
{
|
|
5590
5702
|
"name": "s-slider-verify",
|
|
5591
5703
|
"attributes": [
|