feat(Calendar): add open、opened event

This commit is contained in:
陈嘉涵 2020-02-20 19:52:55 +08:00
parent 556f335cc2
commit a83082f599
11 changed files with 18 additions and 12 deletions

View File

@ -155,8 +155,8 @@ export default {
|------|------|------| |------|------|------|
| select | Triggered when click option | *action: Action, index: number* | | select | Triggered when click option | *action: Action, index: number* |
| cancel | Triggered when cancel click | - | | cancel | Triggered when cancel click | - |
| click-overlay | Triggered when click overlay | - |
| open | Triggered when open ActionSheet | - | | open | Triggered when open ActionSheet | - |
| opened | Triggered when opened ActionSheet | - |
| close | Triggered when close ActionSheet | - | | close | Triggered when close ActionSheet | - |
| opened | Triggered when opened ActionSheet | - |
| closed | Triggered when closed ActionSheet | - | | closed | Triggered when closed ActionSheet | - |
| click-overlay | Triggered when click overlay | - |

View File

@ -171,11 +171,11 @@ export default {
|------|------|------| |------|------|------|
| select | 选中选项时触发,禁用或加载状态下不会触发 | *action: Action, index: number* | | select | 选中选项时触发,禁用或加载状态下不会触发 | *action: Action, index: number* |
| cancel | 取消按钮点击时触发 | - | | cancel | 取消按钮点击时触发 | - |
| click-overlay | 点击遮罩层时触发 | - |
| open | 打开菜单时触发 | - | | open | 打开菜单时触发 | - |
| opened | 打开菜单且动画结束后触发 | - |
| close | 关闭菜单时触发 | - | | close | 关闭菜单时触发 | - |
| opened | 打开菜单且动画结束后触发 | - |
| closed | 关闭菜单且动画结束后触发 | - | | closed | 关闭菜单且动画结束后触发 | - |
| click-overlay | 点击遮罩层时触发 | - |
## 常见问题 ## 常见问题

View File

@ -251,8 +251,10 @@ Set `poppable` to `false`, the calendar will be displayed directly on the page i
|------|------|------| |------|------|------|
| select | Triggered when select date | *value: Date \| Date[]* | | select | Triggered when select date | *value: Date \| Date[]* |
| confirm | Triggered after date selection is completeif `show-confirm` is` true`, it is triggered after clicking the confirm button | *value: Date \| Date[]* | | confirm | Triggered after date selection is completeif `show-confirm` is` true`, it is triggered after clicking the confirm button | *value: Date \| Date[]* |
| close `v2.5.2` | Triggered when close Calendar Popup | - | | open `v2.5.2` | Triggered when open Popup | - |
| closed `v2.5.2` | Triggered when closed Calendar Popup | - | | close `v2.5.2` | Triggered when close Popup | - |
| opened `v2.5.2` | Triggered when opened Popup | - |
| closed `v2.5.2` | Triggered when closed Popup | - |
### Slots ### Slots

View File

@ -253,7 +253,9 @@ export default {
|------|------|------| |------|------|------|
| select | 点击任意日期时触发 | *value: Date \| Date[]* | | select | 点击任意日期时触发 | *value: Date \| Date[]* |
| confirm | 日期选择完成后触发,若`show-confirm``true`,则点击确认按钮后触发 | *value: Date \| Date[]* | | confirm | 日期选择完成后触发,若`show-confirm``true`,则点击确认按钮后触发 | *value: Date \| Date[]* |
| open `v2.5.2` | 打开弹出层时触发 | - |
| close `v2.5.2` | 关闭弹出层时触发 | - | | close `v2.5.2` | 关闭弹出层时触发 | - |
| opened `v2.5.2` | 打开弹出层且动画结束后触发 | - |
| closed `v2.5.2` | 关闭弹出层且动画结束后触发 | - | | closed `v2.5.2` | 关闭弹出层且动画结束后触发 | - |
### Slots ### Slots

View File

@ -387,6 +387,8 @@ export default createComponent({
closeOnPopstate={this.closeOnPopstate} closeOnPopstate={this.closeOnPopstate}
closeOnClickOverlay={this.closeOnClickOverlay} closeOnClickOverlay={this.closeOnClickOverlay}
onInput={this.togglePopup} onInput={this.togglePopup}
onOpen={createListener('open')}
onOpened={createListener('opened')}
onClose={createListener('close')} onClose={createListener('close')}
onClosed={createListener('closed')} onClosed={createListener('closed')}
> >

View File

@ -168,8 +168,8 @@ export default {
| confirm | Triggered when click confirm button | - | | confirm | Triggered when click confirm button | - |
| cancel | Triggered when click cancel button | - | | cancel | Triggered when click cancel button | - |
| open | Triggered when open Dialog | - | | open | Triggered when open Dialog | - |
| opened | Triggered when opened Dialog | - |
| close | Triggered when close Dialog | - | | close | Triggered when close Dialog | - |
| opened | Triggered when opened Dialog | - |
| closed | Triggered when closed Dialog | - | | closed | Triggered when closed Dialog | - |
### Slots ### Slots

View File

@ -201,8 +201,8 @@ export default {
| confirm | 点击确认按钮时触发 | - | | confirm | 点击确认按钮时触发 | - |
| cancel | 点击取消按钮时触发 | - | | cancel | 点击取消按钮时触发 | - |
| open | 打开弹窗时触发 | - | | open | 打开弹窗时触发 | - |
| opened | 打开弹窗且动画结束后触发 | - |
| close | 关闭弹窗时触发 | - | | close | 关闭弹窗时触发 | - |
| opened | 打开弹窗且动画结束后触发 | - |
| closed | 关闭弹窗且动画结束后触发 | - | | closed | 关闭弹窗且动画结束后触发 | - |
### Slots ### Slots

View File

@ -137,8 +137,8 @@ Use `active-color` prop to custom active color of the title and options
|------|------|------| |------|------|------|
| change | Triggered select option and value changed | value | | change | Triggered select option and value changed | value |
| open | Triggered when open menu | - | | open | Triggered when open menu | - |
| opened | Triggered when menu opened | - |
| close | Triggered when close menu | - | | close | Triggered when close menu | - |
| opened | Triggered when menu opened | - |
| closed | Triggered when menu closed | - | | closed | Triggered when menu closed | - |
### DropdownItem Slots ### DropdownItem Slots

View File

@ -141,8 +141,8 @@ export default {
|------|------|------| |------|------|------|
| change | 点击选项导致 value 变化时触发 | value | | change | 点击选项导致 value 变化时触发 | value |
| open | 打开菜单栏时触发 | - | | open | 打开菜单栏时触发 | - |
| opened | 打开菜单栏且动画结束后触发 | - |
| close | 关闭菜单栏时触发 | - | | close | 关闭菜单栏时触发 | - |
| opened | 打开菜单栏且动画结束后触发 | - |
| closed | 关闭菜单栏且动画结束后触发 | - | | closed | 关闭菜单栏且动画结束后触发 | - |
### DropdownItem Slots ### DropdownItem Slots

View File

@ -141,7 +141,7 @@ export default {
|------|------|------| |------|------|------|
| click | Triggered when click Popup | *event: Event* | | click | Triggered when click Popup | *event: Event* |
| open | Triggered when open Popup | - | | open | Triggered when open Popup | - |
| opened | Triggered when opened Popup | - |
| close | Triggered when close Popup | - | | close | Triggered when close Popup | - |
| opened | Triggered when opened Popup | - |
| closed | Triggered when closed Popup | - | | closed | Triggered when closed Popup | - |
| click-overlay | Triggered when click overlay | - | | click-overlay | Triggered when click overlay | - |

View File

@ -152,7 +152,7 @@ export default {
|------|------|------| |------|------|------|
| click | 点击弹出层时触发 | *event: Event* | | click | 点击弹出层时触发 | *event: Event* |
| open | 打开弹出层时触发 | - | | open | 打开弹出层时触发 | - |
| opened | 打开弹出层且动画结束后触发 | - |
| close | 关闭弹出层时触发 | - | | close | 关闭弹出层时触发 | - |
| opened | 打开弹出层且动画结束后触发 | - |
| closed | 关闭弹出层且动画结束后触发 | - | | closed | 关闭弹出层且动画结束后触发 | - |
| click-overlay | 点击遮罩层时触发 | - | | click-overlay | 点击遮罩层时触发 | - |