2
0
mirror of https://github.com/tenrok/vue2-datepicker.git synced 2026-06-25 07:20:35 +03:00

添加修改语言说明

This commit is contained in:
mxie
2018-04-12 16:20:36 +08:00
parent 3d40766d53
commit 8c26c05866
+18 -2
View File
@@ -49,12 +49,12 @@ export default {
### Attributes ### Attributes
| Prop | Type | Default | Description | | Prop | Type | Default | Description |
|---------------------|---------------|-------------|---------------------------------------------------| |---------------------|---------------|-------------|-----------------------------------------------------|
| type | String | 'date' | select datepicker or datetimepicker(date/datetime) | | type | String | 'date' | select datepicker or datetimepicker(date/datetime) |
| range | Boolean | false | if true, the type is daterange or datetimerange | | range | Boolean | false | if true, the type is daterange or datetimerange |
| confirm | Boolean | false | if true, need click the button to change the value | | confirm | Boolean | false | if true, need click the button to change the value |
| format | String | yyyy-MM-dd | Date formatting string | | format | String | yyyy-MM-dd | Date formatting string |
| lang | String | zh | Translation (en/zh/es/pt-br/fr/ru/de/it/cs) | | lang | String/Object | zh | Translation (en/zh/es/pt-br/fr/ru/de/it/cs)(custom) |
| placeholder | String | | input placeholder text | | placeholder | String | | input placeholder text |
| width | String/Number | 210 | input size | | width | String/Number | 210 | input size |
| disabled-days | Array | [] | Days in YYYY-MM-DD format to disable | | disabled-days | Array | [] | Days in YYYY-MM-DD format to disable |
@@ -69,6 +69,22 @@ export default {
| disabled | Boolean | false | Disable the component | | disabled | Boolean | false | Disable the component |
| editable | Boolean | false | if true, user can type it(only the range is false) | | editable | Boolean | false | if true, user can type it(only the range is false) |
#### lang
* String (en/zh/es/pt-br/fr/ru/de/it/cs)
* Object
```JavaScript
{
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'
}
}
```
#### shortcuts #### shortcuts
* true - show the default shortcuts * true - show the default shortcuts
* false - hide the shortcuts * false - hide the shortcuts