2
0
mirror of https://github.com/tenrok/vue2-datepicker.git synced 2026-06-05 13:52:25 +03:00

docs: fix readme

This commit is contained in:
mxie
2018-06-16 11:29:24 +08:00
parent 75f08225c3
commit 283f85a11e
2 changed files with 30 additions and 1 deletions
+1 -1
View File
@@ -147,7 +147,7 @@ export default {
| change | When the value change | the currentValue |
| input | When the value change | the currentValue |
| confirm | When user click 'OK' button | the currentValue |
| input-error | When user type a invalid Date| the input value |
| input-error | When user type a invalid Date| the input text |
### Slots
+29
View File
@@ -89,6 +89,35 @@ export default {
| confirm-text | String | 'OK' | 确认按钮的名称
| range-separator | String | '~' | range 分隔符
#### lang
* String (en/zh/es/pt-br/fr/ru/de/it/cs)
* Object (自定义)
```html
<script>
export default {
data() {
return {
value: '',
lang: {
days: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
months: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
pickers: ['next 7 days', 'next 30 days', 'previous 7 days', 'previous 30 days'],
placeholder: {
date: 'Select Date',
dateRange: 'Select Date Range'
}
}
}
}
}
</script>
<template>
<date-picker v-model="value" :lang="lang"></date-picker>
</template>
```
#### shortcuts
* true - 显示默认快捷选择