update DateTimePicker
update DateTimePicker
This commit is contained in:
parent
a8571a5fa1
commit
acde7262ef
4 changed files with 21 additions and 6 deletions
|
@ -64,6 +64,7 @@
|
|||
v-ref:time-picker
|
||||
:date="date"
|
||||
:value="value"
|
||||
:format="format"
|
||||
show-date
|
||||
@on-pick="handleTimePick"></time-picker>
|
||||
</div>
|
||||
|
@ -109,7 +110,8 @@
|
|||
year: null,
|
||||
month: null,
|
||||
confirm: false,
|
||||
isTime: false
|
||||
isTime: false,
|
||||
format: 'yyyy-MM-dd'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
|
|
@ -49,13 +49,17 @@
|
|||
showDate: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
format: {
|
||||
type: String,
|
||||
default: 'HH:mm:ss'
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
prefixCls: prefixCls,
|
||||
timePrefixCls: timePrefixCls,
|
||||
format: 'HH:mm:ss',
|
||||
// format: 'HH:mm:ss',
|
||||
hours: '',
|
||||
minutes: '',
|
||||
seconds: '',
|
||||
|
|
|
@ -129,12 +129,20 @@
|
|||
.@{picker-prefix-cls}-panel-content{
|
||||
.@{time-picker-prefix-cls}{
|
||||
&-cells{
|
||||
min-width: @time-picker-cells-width-with-date;
|
||||
min-width: @time-picker-cells-width-with-date-with-seconds;
|
||||
&-with-seconds{
|
||||
min-width: @time-picker-cells-width-with-date-with-seconds;
|
||||
.@{time-picker-prefix-cls}-cells-list{
|
||||
width: @time-picker-cells-width-with-date-with-seconds / 3;
|
||||
ul{
|
||||
li{
|
||||
padding: 0 0 0 28px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&-list {
|
||||
width: @time-picker-cells-width-with-date-base;
|
||||
width: @time-picker-cells-width-with-date-with-seconds / 2;
|
||||
max-height: 216px;
|
||||
&:first-child{
|
||||
border-radius: 0;
|
||||
|
@ -145,7 +153,7 @@
|
|||
ul{
|
||||
padding: 0 0 192px 0;
|
||||
li{
|
||||
padding: 0 0 0 28px;
|
||||
padding: 0 0 0 46px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<!--style="width: 168px"></time-picker>-->
|
||||
<!--</i-col>-->
|
||||
<i-col span="12">
|
||||
<Date-picker type="datetime" placeholder="选择日期时间" style="width: 200px" @on-change="c"></Date-picker>
|
||||
<Date-picker :value="value1" format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="选择日期时间" style="width: 200px" @on-change="c"></Date-picker>
|
||||
<!--<time-picker-->
|
||||
<!--:value="value2"-->
|
||||
<!--type="timerange"-->
|
||||
|
@ -44,6 +44,7 @@
|
|||
data () {
|
||||
return {
|
||||
// value: '2016-12-12 03:03:03',
|
||||
value1: '2015-12-12 09:41',
|
||||
value: '03:12:01',
|
||||
value2: ['08:40:00', '09:40:00'],
|
||||
// value2: [new Date(), new Date()],
|
||||
|
|
Loading…
Add table
Reference in a new issue