base6-ui 2.0.14 → 2.0.16
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/dist/components/slider/index.vue.d.ts +3 -2
- package/dist/index.css +1 -1
- package/dist/index.umd.js +1 -1
- package/es/components/slider/index.vue.d.ts +3 -2
- package/es/components/slider/index.vue.mjs +2 -2
- package/es/components/slider/index.vue2.mjs +48 -44
- package/es/config/themes/components/baseComponent/dark.mjs +7 -3
- package/es/config/themes/components/baseComponent/light.mjs +7 -3
- package/es/index.css +1 -1
- package/lib/components/slider/index.vue.d.ts +3 -2
- package/lib/components/slider/index.vue.js +1 -1
- package/lib/components/slider/index.vue2.js +1 -1
- package/lib/config/themes/components/baseComponent/dark.js +1 -1
- package/lib/config/themes/components/baseComponent/light.js +1 -1
- package/lib/index.css +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { CSSProperties } from 'vue';
|
|
2
|
+
import { SliderProps } from 'naive-ui';
|
|
2
3
|
type PropsType = {
|
|
4
|
+
step?: SliderProps['step'];
|
|
3
5
|
style?: CSSProperties;
|
|
4
6
|
showInput?: boolean;
|
|
5
7
|
size?: 'small' | 'medium';
|
|
@@ -8,7 +10,6 @@ type PropsType = {
|
|
|
8
10
|
max?: number;
|
|
9
11
|
range?: boolean;
|
|
10
12
|
showExtremeValueText?: boolean;
|
|
11
|
-
precision?: number;
|
|
12
13
|
};
|
|
13
14
|
declare const _default: import('vue').DefineComponent<PropsType, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
15
|
"update:value": (...args: any[]) => void;
|
|
@@ -19,7 +20,7 @@ declare const _default: import('vue').DefineComponent<PropsType, {}, {}, {}, {},
|
|
|
19
20
|
max: number;
|
|
20
21
|
size: "small" | "medium";
|
|
21
22
|
min: number;
|
|
22
|
-
|
|
23
|
+
step: number | "mark";
|
|
23
24
|
range: boolean;
|
|
24
25
|
showInput: boolean;
|
|
25
26
|
showExtremeValueText: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6c4c66a4"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { NSlider as
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { NSlider as z, NInputNumber as w } from "naive-ui";
|
|
2
|
+
import { defineComponent as b, shallowRef as B, computed as f, watch as S, createElementBlock as u, openBlock as i, normalizeStyle as k, createElementVNode as o, createCommentVNode as r, createVNode as d, mergeProps as N, toDisplayString as c, createBlock as C, Fragment as E } from "vue";
|
|
3
|
+
import I from "../../hooks/useNaiveConfigProvideContext.mjs";
|
|
4
|
+
const T = { class: "slider-content" }, U = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "extreme-value-text"
|
|
7
|
-
},
|
|
7
|
+
}, V = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "slider-input"
|
|
10
|
-
},
|
|
10
|
+
}, F = /* @__PURE__ */ b({
|
|
11
11
|
name: "BodenSlider",
|
|
12
12
|
__name: "index",
|
|
13
13
|
props: {
|
|
14
|
+
step: { default: 1 },
|
|
14
15
|
style: { default: () => ({}) },
|
|
15
16
|
showInput: { type: Boolean, default: !1 },
|
|
16
17
|
size: { default: "medium" },
|
|
@@ -18,83 +19,86 @@ const I = { class: "slider-content" }, T = {
|
|
|
18
19
|
min: { default: 0 },
|
|
19
20
|
max: { default: 100 },
|
|
20
21
|
range: { type: Boolean, default: !1 },
|
|
21
|
-
showExtremeValueText: { type: Boolean, default: !1 }
|
|
22
|
-
precision: { default: 0 }
|
|
22
|
+
showExtremeValueText: { type: Boolean, default: !1 }
|
|
23
23
|
},
|
|
24
24
|
emits: ["update:value"],
|
|
25
|
-
setup(e, { emit:
|
|
26
|
-
const
|
|
25
|
+
setup(e, { emit: g }) {
|
|
26
|
+
const v = e, { mergedThemeOverridesRef: y } = I(), x = B({}), p = g, n = f({
|
|
27
27
|
get() {
|
|
28
|
-
return
|
|
28
|
+
return v.value;
|
|
29
29
|
},
|
|
30
|
-
set(
|
|
31
|
-
|
|
30
|
+
set(t) {
|
|
31
|
+
p("update:value", t);
|
|
32
32
|
}
|
|
33
|
+
}), s = f(() => {
|
|
34
|
+
const t = v.step;
|
|
35
|
+
return (String(t).split(".")[1] || "").length || 1;
|
|
33
36
|
});
|
|
34
|
-
return
|
|
35
|
-
() =>
|
|
36
|
-
(
|
|
37
|
-
|
|
38
|
-
"--n-slider-handler-border":
|
|
39
|
-
"--n-slider-input-width":
|
|
40
|
-
"--n-slider-range-input-line-color":
|
|
41
|
-
"--n-slider-extreme-value-text-color":
|
|
37
|
+
return S(
|
|
38
|
+
() => y?.value?.Slider,
|
|
39
|
+
(t) => {
|
|
40
|
+
t && (x.value = {
|
|
41
|
+
"--n-slider-handler-border": t.handleBorderStyle,
|
|
42
|
+
"--n-slider-input-width": t.inputWidth,
|
|
43
|
+
"--n-slider-range-input-line-color": t.rangeInputLineColor,
|
|
44
|
+
"--n-slider-extreme-value-text-color": t.extremeValueTextColor
|
|
42
45
|
});
|
|
43
46
|
},
|
|
44
47
|
{
|
|
45
48
|
immediate: !0
|
|
46
49
|
}
|
|
47
|
-
), (
|
|
48
|
-
const
|
|
50
|
+
), (t, l) => {
|
|
51
|
+
const h = z, m = w;
|
|
49
52
|
return i(), u("div", {
|
|
50
53
|
class: "boden-slider",
|
|
51
|
-
style:
|
|
54
|
+
style: k([x.value, e.style])
|
|
52
55
|
}, [
|
|
53
|
-
o("div",
|
|
54
|
-
|
|
56
|
+
o("div", T, [
|
|
57
|
+
d(h, N(t.$attrs, {
|
|
55
58
|
value: n.value,
|
|
56
|
-
"onUpdate:value":
|
|
59
|
+
"onUpdate:value": l[0] || (l[0] = (a) => n.value = a),
|
|
57
60
|
min: e.min,
|
|
58
61
|
max: e.max,
|
|
59
|
-
range: e.range
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
o("div", null,
|
|
62
|
+
range: e.range,
|
|
63
|
+
step: e.step
|
|
64
|
+
}), null, 16, ["value", "min", "max", "range", "step"]),
|
|
65
|
+
e.showExtremeValueText ? (i(), u("div", U, [
|
|
66
|
+
o("div", null, c(e.min), 1),
|
|
67
|
+
o("div", null, c(e.max), 1)
|
|
64
68
|
])) : r("", !0)
|
|
65
69
|
]),
|
|
66
|
-
e.showInput ? (i(), u("div",
|
|
70
|
+
e.showInput ? (i(), u("div", V, [
|
|
67
71
|
!e.range && typeof n.value == "number" ? (i(), C(m, {
|
|
68
72
|
key: 0,
|
|
69
73
|
"show-button": !1,
|
|
70
74
|
placeholder: "",
|
|
71
75
|
size: e.size,
|
|
72
76
|
value: n.value,
|
|
73
|
-
"onUpdate:value":
|
|
77
|
+
"onUpdate:value": l[1] || (l[1] = (a) => n.value = a),
|
|
74
78
|
min: e.min,
|
|
75
79
|
max: e.max,
|
|
76
|
-
precision:
|
|
77
|
-
}, null, 8, ["size", "value", "min", "max", "precision"])) : e.range && typeof n.value != "number" ? (i(), u(
|
|
78
|
-
|
|
80
|
+
precision: s.value
|
|
81
|
+
}, null, 8, ["size", "value", "min", "max", "precision"])) : e.range && typeof n.value != "number" ? (i(), u(E, { key: 1 }, [
|
|
82
|
+
d(m, {
|
|
79
83
|
"show-button": !1,
|
|
80
84
|
placeholder: "",
|
|
81
85
|
size: e.size,
|
|
82
86
|
value: n.value[0],
|
|
83
|
-
"onUpdate:value":
|
|
87
|
+
"onUpdate:value": l[2] || (l[2] = (a) => n.value[0] = a),
|
|
84
88
|
min: e.min,
|
|
85
89
|
max: e.max,
|
|
86
|
-
precision:
|
|
90
|
+
precision: s.value
|
|
87
91
|
}, null, 8, ["size", "value", "min", "max", "precision"]),
|
|
88
|
-
|
|
89
|
-
|
|
92
|
+
l[4] || (l[4] = o("div", { class: "line" }, null, -1)),
|
|
93
|
+
d(m, {
|
|
90
94
|
"show-button": !1,
|
|
91
95
|
placeholder: "",
|
|
92
96
|
size: e.size,
|
|
93
97
|
value: n.value[1],
|
|
94
|
-
"onUpdate:value":
|
|
98
|
+
"onUpdate:value": l[3] || (l[3] = (a) => n.value[1] = a),
|
|
95
99
|
min: e.min,
|
|
96
100
|
max: e.max,
|
|
97
|
-
precision:
|
|
101
|
+
precision: s.value
|
|
98
102
|
}, null, 8, ["size", "value", "min", "max", "precision"])
|
|
99
103
|
], 64)) : r("", !0)
|
|
100
104
|
])) : r("", !0)
|
|
@@ -103,5 +107,5 @@ const I = { class: "slider-content" }, T = {
|
|
|
103
107
|
}
|
|
104
108
|
});
|
|
105
109
|
export {
|
|
106
|
-
|
|
110
|
+
F as default
|
|
107
111
|
};
|
|
@@ -3,9 +3,13 @@ import o from "../../token/dark.mjs";
|
|
|
3
3
|
import { commonBase as e } from "../../common.mjs";
|
|
4
4
|
const l = {
|
|
5
5
|
borderRadius: e.borderRadiusMedium,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
padding: e.paddingBase,
|
|
7
|
+
peers: {
|
|
8
|
+
Popover: {
|
|
9
|
+
color: r["color-gray-3"],
|
|
10
|
+
textColor: o["color-text-5"]
|
|
11
|
+
}
|
|
12
|
+
}
|
|
9
13
|
}, d = {
|
|
10
14
|
peers: {
|
|
11
15
|
Popover: {
|
|
@@ -3,9 +3,13 @@ import { commonBase as r } from "../../common.mjs";
|
|
|
3
3
|
import e from "../../token/light.mjs";
|
|
4
4
|
const l = {
|
|
5
5
|
borderRadius: r.borderRadiusMedium,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
padding: r.paddingBase,
|
|
7
|
+
peers: {
|
|
8
|
+
Popover: {
|
|
9
|
+
color: o["color-gray-10"],
|
|
10
|
+
textColor: e["color-text-1"]
|
|
11
|
+
}
|
|
12
|
+
}
|
|
9
13
|
}, c = {
|
|
10
14
|
peers: {
|
|
11
15
|
Popover: {
|