mirror of https://github.com/ElemeFE/element
TimePicker: fix HH:mm style
parent
fed488ef9f
commit
42ec4567f1
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="el-time-spinner">
|
<div class="el-time-spinner" :class="{ 'has-seconds': showSeconds }">
|
||||||
<div
|
<div
|
||||||
@mouseenter="emitSelectRange('hours')"
|
@mouseenter="emitSelectRange('hours')"
|
||||||
@mousewheel="handleScroll('hour')"
|
@mousewheel="handleScroll('hour')"
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
<div
|
<div
|
||||||
v-show="currentVisible"
|
v-show="currentVisible"
|
||||||
:style="{width: width + 'px'}"
|
:style="{width: width + 'px'}"
|
||||||
|
:class="{ 'has-seconds': showSeconds }"
|
||||||
class="el-time-panel">
|
class="el-time-panel">
|
||||||
<div class="el-time-panel__content">
|
<div class="el-time-panel__content">
|
||||||
<time-spinner
|
<time-spinner
|
||||||
|
|
|
@ -13,6 +13,16 @@
|
||||||
z-index: var(--index-top);
|
z-index: var(--index-top);
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
|
&.has-seconds {
|
||||||
|
.el-time-panel__content::after {
|
||||||
|
left: calc(100% / 3 * 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-time-panel__content::before {
|
||||||
|
padding-left: calc(100% / 3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@e content {
|
@e content {
|
||||||
font-size: 0;
|
font-size: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -37,12 +47,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
left: calc(100%/3*2);
|
left: 50%;
|
||||||
margin-left: -2px;
|
margin-left: -2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
padding-left: calc(100%/3);
|
padding-left: 50%;
|
||||||
margin-right: -2px;
|
margin-right: -2px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,11 +2,17 @@
|
||||||
|
|
||||||
@component-namespace el {
|
@component-namespace el {
|
||||||
@b time-spinner {
|
@b time-spinner {
|
||||||
|
&.has-seconds {
|
||||||
|
.el-time-spinner__wrapper {
|
||||||
|
width: calc(100% / 3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@e wrapper {
|
@e wrapper {
|
||||||
height: 190px;
|
height: 190px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: calc(100% / 3);
|
width: 50%;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
position: relative;
|
position: relative;
|
||||||
-ms-overflow-style: none;
|
-ms-overflow-style: none;
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: #1d8ce0;
|
background-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue