mirror of
https://github.com/tenrok/vue2-datepicker.git
synced 2026-06-23 02:20:36 +03:00
docs: fix readme
This commit is contained in:
@@ -147,7 +147,7 @@ export default {
|
|||||||
| change | When the value change | the currentValue |
|
| change | When the value change | the currentValue |
|
||||||
| input | When the value change | the currentValue |
|
| input | When the value change | the currentValue |
|
||||||
| confirm | When user click 'OK' button | 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
|
### Slots
|
||||||
|
|
||||||
|
|||||||
@@ -89,6 +89,35 @@ export default {
|
|||||||
| confirm-text | String | 'OK' | 确认按钮的名称
|
| confirm-text | String | 'OK' | 确认按钮的名称
|
||||||
| range-separator | String | '~' | range 分隔符
|
| 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
|
#### shortcuts
|
||||||
* true - 显示默认快捷选择
|
* true - 显示默认快捷选择
|
||||||
|
|||||||
Reference in New Issue
Block a user