update DateTimePicker
update DateTimePicker
This commit is contained in:
parent
62c7f99780
commit
a8571a5fa1
3 changed files with 18 additions and 0 deletions
|
@ -64,6 +64,7 @@
|
|||
v-ref:time-picker
|
||||
:date="date"
|
||||
:value="value"
|
||||
show-date
|
||||
@on-pick="handleTimePick"></time-picker>
|
||||
</div>
|
||||
<Confirm
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<template>
|
||||
<div :class="[prefixCls + '-body-wrapper']">
|
||||
<div :class="[prefixCls + '-body']">
|
||||
<div :class="[timePrefixCls + '-header']" v-if="showDate">{{ visibleDate }}</div>
|
||||
<div :class="[prefixCls + '-content']">
|
||||
<time-spinner
|
||||
v-ref:time-spinner
|
||||
|
@ -44,6 +45,10 @@
|
|||
},
|
||||
value: {
|
||||
default: ''
|
||||
},
|
||||
showDate: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
|
@ -64,6 +69,10 @@
|
|||
computed: {
|
||||
showSeconds () {
|
||||
return (this.format || '').indexOf('ss') !== -1;
|
||||
},
|
||||
visibleDate () {
|
||||
const date = this.date;
|
||||
return `${date.getFullYear()}年 ${date.getMonth() + 1}月`;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
|
@ -135,7 +135,15 @@
|
|||
}
|
||||
&-list {
|
||||
width: @time-picker-cells-width-with-date-base;
|
||||
max-height: 216px;
|
||||
&:first-child{
|
||||
border-radius: 0;
|
||||
}
|
||||
&:last-child{
|
||||
border-radius: 0;
|
||||
}
|
||||
ul{
|
||||
padding: 0 0 192px 0;
|
||||
li{
|
||||
padding: 0 0 0 28px;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue