Skip to content

Commit d4d0c11

Browse files
committed
Improvement - Atom component - Improve Slicer
1 parent 096e5de commit d4d0c11

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,4 @@
107107
"vitest": "^3.1.1",
108108
"vue": "^3.5.13"
109109
}
110-
}
110+
}

src/atoms/Slicer.vue

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,12 @@ function setTooltipRight() {
421421
}
422422
}
423423
424+
const leftLabelZIndex = ref(0);
425+
426+
function setLeftLabelZIndex(handle) {
427+
leftLabelZIndex.value = handle === 'start' ? 1 : 0
428+
}
429+
424430
onUpdated(() => {
425431
setTooltipLeft();
426432
setTooltipRight();
@@ -629,6 +635,7 @@ defineExpose({
629635
:max="max"
630636
v-model="startValue"
631637
@input="onStartInput"
638+
@mouseenter="setLeftLabelZIndex('start')"
632639
/>
633640

634641
<input
@@ -641,6 +648,7 @@ defineExpose({
641648
:max="max"
642649
v-model="endValue"
643650
@input="onEndInput"
651+
@mouseenter="setLeftLabelZIndex('end')"
644652
/>
645653

646654
<div
@@ -657,7 +665,8 @@ defineExpose({
657665
left: highlightStyle.tooltipLeft,
658666
color: adaptColorToBackground(selectColor),
659667
backgroundColor: selectColor,
660-
border: `1px solid ${borderColor}`
668+
border: `1px solid ${borderColor}`,
669+
zIndex: `${leftLabelZIndex + 4}`
661670
}"
662671
>
663672
{{ labelLeft }}
@@ -677,7 +686,8 @@ defineExpose({
677686
left: highlightStyle.tooltipRight,
678687
color: adaptColorToBackground(selectColor),
679688
backgroundColor: selectColor,
680-
border: `1px solid ${borderColor}`
689+
border: `1px solid ${borderColor}`,
690+
zIndex: '4'
681691
}"
682692
>
683693
{{ labelRight }}
@@ -869,7 +879,6 @@ input[type="range"]::-ms-thumb {
869879
}
870880
871881
.range-tooltip {
872-
z-index: 4;
873882
padding: 2px 4px;
874883
font-size: 10px;
875884
border-radius: 3px;

0 commit comments

Comments
 (0)