Skip to content

Commit

Permalink
feat: ✨ Calendar 确认事件 confirm 增加 type 参数
Browse files Browse the repository at this point in the history
  • Loading branch information
oknixus authored Jan 18, 2025
1 parent 03623f4 commit e0fca91
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 6 additions & 5 deletions docs/component/calendar.md
Original file line number Diff line number Diff line change
Expand Up @@ -450,13 +450,14 @@ function handleConfirm({ value }) {

## Events

| 事件名称 | 说明 | 参数 | 最低版本 |
| -------- | -------------------------- | ----------- | -------- |
| confirm | 绑定值变化时触发 | `{ value }` | - |
| change | 点击面板日期时触发 | `{ value }` | - |
| cancel | 点击关闭按钮或者蒙层时触发 | - | - |
| 事件名称 | 说明 | 参数 | 最低版本 |
| -------- | ------------------------------------ | ------------------------ | -------- |
| confirm | 绑定值变化时触发 | `{ value, type }` | - |
| change | 点击面板日期时触发 | `{ value }` | - |
| cancel | 点击关闭按钮或者蒙层时触发 | - | - |
| open | 日历打开时触发 | - | - |


## Methods

| 方法名称 | 说明 | 参数 | 最低版本 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,8 @@ function onConfirm() {
lastCurrentType.value = currentType.value
emit('update:modelValue', calendarValue.value)
emit('confirm', {
value: calendarValue.value
value: calendarValue.value,
type: currentType.value
})
}
Expand Down

0 comments on commit e0fca91

Please sign in to comment.