update zh-TW

This commit is contained in:
梁灏 2017-10-23 09:52:56 +08:00
parent f672ae027c
commit ba1422cd62
2 changed files with 14 additions and 5 deletions

View file

@ -1,22 +1,31 @@
<template> <template>
<div> <div>
{{ value1 }}-{{ value2 }} {{ value1 }}
<Date-picker v-model="value1" placeholder="选择日期" style="width: 200px"></Date-picker> <Date-picker v-model="value1" placeholder="选择日期" style="width: 200px"></Date-picker>
<Date-picker v-model="value2" type="daterange" placeholder="选择日期" style="width: 200px"></Date-picker> <Button @click="setDate">set date</Button>
<Date-picker transfer type="datetimerange" placeholder="选择日期" style="width: 200px" @on-change="changeDate"></Date-picker> <Button @click="getDate">get date</Button>
<!--<Date-picker v-model="value2" type="daterange" placeholder="选择日期" style="width: 200px"></Date-picker>-->
<!--<Date-picker transfer type="datetimerange" placeholder="选择日期" style="width: 200px" @on-change="changeDate"></Date-picker>-->
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data () { data () {
return { return {
value1: '', value1: '2017-10-23',
value2: [] value2: []
} }
}, },
methods: { methods: {
changeDate(date){ changeDate(date){
console.log(date); console.log(date);
},
setDate () {
this.value1 = '2017-09-20';
},
getDate () {
const date = new Date(this.value1);
console.log(date.getMonth()+1)
} }
} }
} }

View file

@ -20,7 +20,7 @@ export default {
endTime: '結束時間', endTime: '結束時間',
clear: '清空', clear: '清空',
ok: '確定', ok: '確定',
datePanelLabel: '[yyyy] [mmmm]', datePanelLabel: '[yyyy年] [m月]',
month: '月', month: '月',
month1: '1 月', month1: '1 月',
month2: '2 月', month2: '2 月',