Skip to content

datetimePick add the Description of the property of 'value' #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/pages/en2/datetime-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The `type` attribute configures the type of the component, and it has three opti
<mt-datetime-picker
ref="picker"
type="time"
v-model="pickerValue">
v-model="value">
</mt-datetime-picker>
</template>

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

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

```html
<mt-datetime-picker
v-model="pickerVisible"
v-model="value"
type="time"
@confirm="handleConfirm">
</mt-datetime-picker>
Expand All @@ -68,6 +68,7 @@ When the confirm button is tapped, the `confirm` event triggers with `value` as
## API
| option | description | type | acceptable values | default |
|------|-------|---------|-------|--------|
| 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))| | |
| type | type of the picker | String | 'datetime', 'date', 'time' | 'datetime' |
| cancelText | text of the cancel button | String | | '取消' |
| confirmText | text of the confirm button | String | | '确定' |
Expand All @@ -84,5 +85,5 @@ When the confirm button is tapped, the `confirm` event triggers with `value` as
## Events
| event name | description | parameters |
|------|-------|---------|
| confirm | callback when the confirm button is clicked | current value of the picker |
| confirm | callback when the confirm button is clicked | current value of the picker (is type of Date)|
| changeVisible | callback when pop open or close | current value of pop visible |
9 changes: 5 additions & 4 deletions src/pages/zh-cn2/datetime-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Vue.component(DatetimePicker.name, DatetimePicker);
<mt-datetime-picker
ref="picker"
type="time"
v-model="pickerValue">
v-model="value">
</mt-datetime-picker>
</template>

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

```html
<mt-datetime-picker
v-model="pickerVisible"
v-model="value"
type="date"
year-format="{value} 年"
month-format="{value} 月"
Expand All @@ -59,7 +59,7 @@ Vue.component(DatetimePicker.name, DatetimePicker);

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