iview/test/routers/date.vue

66 lines
2 KiB
Vue
Raw Normal View History

<style>
body{
height: auto !important;
}
</style>
2016-12-12 20:34:28 +08:00
<template>
<row>
2016-12-28 17:30:34 +08:00
<!--<i-col span="12">-->
<!--<date-picker type="date" placeholder="选择日期" style="width: 200px" @on-ok="ok" confirm @on-clear="clear"></date-picker>-->
<!--</i-col>-->
<!--<i-col span="12">-->
<!--<date-picker :value="value3" type="daterange" placement="bottom-start" placeholder="选择日期" style="width: 200px"></date-picker>-->
<!--</i-col>-->
<!--<i-col span="12">-->
<!--<time-picker-->
<!--:value="value"-->
<!--placeholder="选择时间"-->
<!--format="HH:mm:ss"-->
<!--:hide-disabled-options="false"-->
<!--:disabled-hours="[1,2,10,11]"-->
<!--@on-change="c"-->
<!--@on-ok="ok"-->
<!--@on-clear="clear"-->
<!--style="width: 168px"></time-picker>-->
<!--</i-col>-->
2016-12-28 15:21:25 +08:00
<i-col span="12">
<time-picker
:value="value2"
type="timerange"
placeholder="选择时间"
2016-12-28 17:30:34 +08:00
format="HH:mm:ss"
2016-12-28 15:21:25 +08:00
:hide-disabled-options="false"
2016-12-27 17:16:11 +08:00
@on-change="c"
2016-12-27 17:41:35 +08:00
@on-ok="ok"
@on-clear="clear"
2016-12-27 15:15:29 +08:00
style="width: 168px"></time-picker>
2016-12-26 14:50:39 +08:00
</i-col>
</row>
2016-12-12 20:34:28 +08:00
</template>
<script>
export default {
data () {
return {
2016-12-28 16:07:11 +08:00
// value: '2016-12-12 03:03:03',
2016-12-28 15:21:25 +08:00
value: '15:12:01',
value2: ['08:40:00', '09:40:00'],
// value2: [new Date(), new Date()],
value3: ['2016-12-01', '2016-12-25']
2016-12-27 17:16:11 +08:00
}
},
methods: {
2016-12-29 09:36:09 +08:00
2016-12-27 17:16:11 +08:00
c (s) {
2016-12-28 17:30:34 +08:00
// console.log(1,s);
// this.value2 = s;
2016-12-27 17:41:35 +08:00
},
ok () {
console.log('ok');
},
clear () {
console.log('clear');
}
}
2016-12-12 20:34:28 +08:00
}
2016-12-22 15:08:05 +08:00
</script>