Skip to content

Commit d591800

Browse files
author
daisy
committed
datetimePick add the Description of the property of 'value'
1 parent b60987e commit d591800

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/pages/en2/datetime-picker.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The `type` attribute configures the type of the component, and it has three opti
2828
<mt-datetime-picker
2929
ref="picker"
3030
type="time"
31-
v-model="pickerValue">
31+
v-model="value">
3232
</mt-datetime-picker>
3333
</template>
3434

@@ -47,7 +47,7 @@ You can configure a custom template for slot options. The template should be a s
4747

4848
```html
4949
<mt-datetime-picker
50-
v-model="pickerVisible"
50+
v-model="value"
5151
type="date"
5252
year-format="{value} 年"
5353
month-format="{value} 月"
@@ -59,7 +59,7 @@ When the confirm button is tapped, the `confirm` event triggers with `value` as
5959

6060
```html
6161
<mt-datetime-picker
62-
v-model="pickerVisible"
62+
v-model="value"
6363
type="time"
6464
@confirm="handleConfirm">
6565
</mt-datetime-picker>
@@ -68,6 +68,7 @@ When the confirm button is tapped, the `confirm` event triggers with `value` as
6868
## API
6969
| option | description | type | acceptable values | default |
7070
|------|-------|---------|-------|--------|
71+
| value | value of the picker | Date / String (for example: 2018-1-1 00:00:00 , 2018/1/1 00:00:00 or 2018.1.1 00:00:00))| | |
7172
| type | type of the picker | String | 'datetime', 'date', 'time' | 'datetime' |
7273
| cancelText | text of the cancel button | String | | '取消' |
7374
| confirmText | text of the confirm button | String | | '确定' |
@@ -84,5 +85,5 @@ When the confirm button is tapped, the `confirm` event triggers with `value` as
8485
## Events
8586
| event name | description | parameters |
8687
|------|-------|---------|
87-
| confirm | callback when the confirm button is clicked | current value of the picker |
88+
| confirm | callback when the confirm button is clicked | current value of the picker (is type of Date)|
8889
| changeVisible | callback when pop open or close | current value of pop visible |

src/pages/zh-cn2/datetime-picker.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Vue.component(DatetimePicker.name, DatetimePicker);
2828
<mt-datetime-picker
2929
ref="picker"
3030
type="time"
31-
v-model="pickerValue">
31+
v-model="value">
3232
</mt-datetime-picker>
3333
</template>
3434

@@ -47,7 +47,7 @@ Vue.component(DatetimePicker.name, DatetimePicker);
4747

4848
```html
4949
<mt-datetime-picker
50-
v-model="pickerVisible"
50+
v-model="value"
5151
type="date"
5252
year-format="{value} 年"
5353
month-format="{value} 月"
@@ -59,7 +59,7 @@ Vue.component(DatetimePicker.name, DatetimePicker);
5959

6060
```html
6161
<mt-datetime-picker
62-
v-model="pickerVisible"
62+
v-model="value"
6363
type="time"
6464
@confirm="handleConfirm">
6565
</mt-datetime-picker>
@@ -68,6 +68,7 @@ Vue.component(DatetimePicker.name, DatetimePicker);
6868
## API
6969
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
7070
|------|-------|---------|-------|--------|
71+
| value | 绑定值 | Date / String(如:2018-1-1 00:00:00 , 2018/1/1 00:00:00 或者 2018.1.1 00:00:00) | | |
7172
| type | 组件的类型 | String | 'datetime', 'date', 'time' | 'datetime' |
7273
| cancelText | 取消按钮文本 | String | | '取消' |
7374
| confirmText | 确定按钮文本 | String | | '确定' |
@@ -85,5 +86,5 @@ Vue.component(DatetimePicker.name, DatetimePicker);
8586
## Events
8687
| 事件名称 | 说明 | 回调参数 |
8788
|------|-------|---------|
88-
| confirm | 点击确认按钮时的回调函数 | 目前的选择值 |
89+
| confirm | 点击确认按钮时的回调函数 | 目前的选择值(为Date类型) |
8990
| changeVisible | 改变弹窗显示隐藏的回调函数 | 弹窗是否可见 |

0 commit comments

Comments
 (0)