-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Feat(DatePicker): increase presets prop #6387
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
bf1038e
feat(date-picker): add PresetDate type
CCherry07 0c89bc6
feat(date-picker): add usePresets hook
CCherry07 67dd85c
feat(date-picker): add PresetPanel Component
CCherry07 07ddaa1
feat(date-picker): add PresetPanel Component
CCherry07 10a16ed
feat(demo): update Preset Ranges Examples
CCherry07 689c49a
feat(docs): add new prop presets
CCherry07 bf2d708
feat(docs): add new prop presets with english
CCherry07 b696e15
fix(RangePicker): footer is not managed by panels
CCherry07 15ad296
chore(Picker): prefixCls default rc-picker
CCherry07 7d5f696
chore(date-picker): update presetted-ranges demo
CCherry07 eed0765
chore(date-picker): update rangePickerProps'presets
CCherry07 30281eb
feat(date-picker): presets reactively processing
CCherry07 7cf7167
chore(date-picker): update type
CCherry07 12cb5c5
refactor(RangePicker): deprecated ranges prop
CCherry07 682318d
chore(date-picker): update type
CCherry07 e83f234
chore(PickerPanel): del notuse panelRef
CCherry07 eadbf3e
Merge branch 'feat-v4' into feat-6354
tangjinzhou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,43 @@ | ||
import { defineComponent } from 'vue'; | ||
|
||
export default defineComponent({ | ||
name: 'PresetPanel', | ||
props: { | ||
prefixCls: String, | ||
presets: { | ||
type: Array, | ||
default: () => [], | ||
}, | ||
onClick: Function, | ||
onHover: Function, | ||
}, | ||
setup(props) { | ||
return () => { | ||
if (!props.presets.length) { | ||
return null; | ||
} | ||
return ( | ||
<div class={`${props.prefixCls}-presets`}> | ||
<ul> | ||
{props.presets.map(({ label, value }, index) => ( | ||
<li | ||
key={index} | ||
onClick={() => { | ||
props.onClick(value); | ||
}} | ||
onMouseenter={() => { | ||
props.onHover?.(value); | ||
}} | ||
onMouseleave={() => { | ||
props.onHover?.(null); | ||
}} | ||
> | ||
{label} | ||
</li> | ||
))} | ||
</ul> | ||
</div> | ||
); | ||
}; | ||
}, | ||
}); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.