-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(calendar):
on-update:value
prop type
- Loading branch information
Showing
5 changed files
with
44 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
# CHANGELOG | ||
|
||
## Pending | ||
|
||
### Fixes | ||
|
||
- Fix `n-calendar`'s `on-update:value` prop type. | ||
|
||
## 2.11.7 | ||
|
||
### Fixes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
# CHANGELOG | ||
|
||
## Pending | ||
|
||
### Fixes | ||
|
||
- 修复 `n-calendar` 的 `on-update:value` 属性类型 | ||
|
||
## 2.11.7 | ||
|
||
### Fixes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export type OnUpdateValue = (value: number, time: DateItem) => void | ||
|
||
export interface DateItem { | ||
year: number | ||
month: number | ||
date: number | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { h } from 'vue' | ||
import { mount } from '@vue/test-utils' | ||
import { NCalendar } from '../index' | ||
|
||
describe('n-button', () => { | ||
it('should work with import on demand', () => { | ||
mount(NCalendar) | ||
}) | ||
it('props.onUpdate has correct type', () => { | ||
;<NCalendar | ||
onUpdateValue={( | ||
value: number, | ||
time: { | ||
date: number | ||
month: number | ||
year: number | ||
} | ||
) => {}} | ||
/> | ||
}) | ||
}) |
5a7b2fa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: