Commit 0e31618388f6ce998258b94bddd1cd31769bebfc

Authored by 梁灏
1 parent ba1422cd

update demo

Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
examples/routers/date.vue
1 <template> 1 <template>
2 <div> 2 <div>
3 {{ value1 }} 3 {{ value1 }}
4 - <Date-picker v-model="value1" placeholder="选择日期" style="width: 200px"></Date-picker> 4 + <Date-picker v-model="value1" :editable="false" type="datetimerange" placeholder="选择日期" style="width: 200px"></Date-picker>
5 <Button @click="setDate">set date</Button> 5 <Button @click="setDate">set date</Button>
6 <Button @click="getDate">get date</Button> 6 <Button @click="getDate">get date</Button>
7 <!--<Date-picker v-model="value2" type="daterange" placeholder="选择日期" style="width: 200px"></Date-picker>--> 7 <!--<Date-picker v-model="value2" type="daterange" placeholder="选择日期" style="width: 200px"></Date-picker>-->
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 export default { 12 export default {
13 data () { 13 data () {
14 return { 14 return {
15 - value1: '2017-10-23', 15 + value1: ['2017-10-10', '2017-10-20'],
16 value2: [] 16 value2: []
17 } 17 }
18 }, 18 },
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 console.log(date); 21 console.log(date);
22 }, 22 },
23 setDate () { 23 setDate () {
24 - this.value1 = '2017-09-20'; 24 + this.value1 = ['2016-10-10', '2017-10-10'];
25 }, 25 },
26 getDate () { 26 getDate () {
27 const date = new Date(this.value1); 27 const date = new Date(this.value1);