Commit ba1422cd62d9a4def1c9a0f2b532b0633c3d7382

Authored by 梁灏
1 parent f672ae02

update zh-TW

Showing 2 changed files with 14 additions and 5 deletions   Show diff stats
examples/routers/date.vue
1 <template> 1 <template>
2 <div> 2 <div>
3 - {{ value1 }}-{{ value2 }} 3 + {{ value1 }}
4 <Date-picker v-model="value1" placeholder="选择日期" style="width: 200px"></Date-picker> 4 <Date-picker v-model="value1" placeholder="选择日期" style="width: 200px"></Date-picker>
5 - <Date-picker v-model="value2" type="daterange" placeholder="选择日期" style="width: 200px"></Date-picker>  
6 - <Date-picker transfer type="datetimerange" placeholder="选择日期" style="width: 200px" @on-change="changeDate"></Date-picker> 5 + <Button @click="setDate">set date</Button>
  6 + <Button @click="getDate">get date</Button>
  7 + <!--<Date-picker v-model="value2" type="daterange" placeholder="选择日期" style="width: 200px"></Date-picker>-->
  8 + <!--<Date-picker transfer type="datetimerange" placeholder="选择日期" style="width: 200px" @on-change="changeDate"></Date-picker>-->
7 </div> 9 </div>
8 </template> 10 </template>
9 <script> 11 <script>
10 export default { 12 export default {
11 data () { 13 data () {
12 return { 14 return {
13 - value1: '', 15 + value1: '2017-10-23',
14 value2: [] 16 value2: []
15 } 17 }
16 }, 18 },
17 methods: { 19 methods: {
18 changeDate(date){ 20 changeDate(date){
19 console.log(date); 21 console.log(date);
  22 + },
  23 + setDate () {
  24 + this.value1 = '2017-09-20';
  25 + },
  26 + getDate () {
  27 + const date = new Date(this.value1);
  28 + console.log(date.getMonth()+1)
20 } 29 }
21 } 30 }
22 } 31 }
src/locale/lang/zh-TW.js
@@ -20,7 +20,7 @@ export default { @@ -20,7 +20,7 @@ export default {
20 endTime: '結束時間', 20 endTime: '結束時間',
21 clear: '清空', 21 clear: '清空',
22 ok: '確定', 22 ok: '確定',
23 - datePanelLabel: '[yyyy] [mmmm]', 23 + datePanelLabel: '[yyyy年] [m月]',
24 month: '月', 24 month: '月',
25 month1: '1 月', 25 month1: '1 月',
26 month2: '2 月', 26 month2: '2 月',