iview/test/routers/date.vue

51 lines
1.4 KiB
Vue
Raw Normal View History

<style>
body{
height: auto !important;
}
</style>
2016-12-12 20:34:28 +08:00
<template>
<row>
<i-col span="12">
2016-12-27 17:41:35 +08:00
<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 type="daterange" placement="bottom-end" placeholder="选择日期" style="width: 200px"></date-picker>
</i-col>
2016-12-26 14:50:39 +08:00
<i-col span="12">
2016-12-27 17:16:11 +08:00
<span>123,{{value}},456</span>
2016-12-27 15:15:29 +08:00
<time-picker
:value="value"
placeholder="选择时间"
format="HH:mm:ss"
2016-12-27 15:50:07 +08:00
:hide-disabled-options="false"
:disabled-hours="[1,2,5,10,11]"
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-27 17:16:11 +08:00
// value: '2016-12-12 03:03:03'
value: '15:12:01'
}
},
methods: {
c (s) {
2016-12-27 17:41:35 +08:00
console.log(1,s);
2016-12-27 17:16:11 +08:00
this.value = 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>