diff --git a/.changeset/rude-sheep-argue.md b/.changeset/rude-sheep-argue.md new file mode 100644 index 000000000..884ff4931 --- /dev/null +++ b/.changeset/rude-sheep-argue.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/time-picker": minor +--- + +feat: 新增前缀后缀内容扩展 diff --git a/.changeset/silent-gifts-suffer.md b/.changeset/silent-gifts-suffer.md new file mode 100644 index 000000000..e2e711db2 --- /dev/null +++ b/.changeset/silent-gifts-suffer.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/hiui": patch +--- + +feat(time-picker): 新增前缀后缀内容扩展 diff --git a/packages/ui/time-picker/src/TimePicker.tsx b/packages/ui/time-picker/src/TimePicker.tsx index 78758c806..76503c80d 100644 --- a/packages/ui/time-picker/src/TimePicker.tsx +++ b/packages/ui/time-picker/src/TimePicker.tsx @@ -65,6 +65,7 @@ export const TimePicker = forwardRef( overlay, size = 'md', invalid = false, + prefix, }, ref ) => { @@ -258,6 +259,7 @@ export const TimePicker = forwardRef( return (
+ {prefix ? {prefix} : null} { + const [addonValue, setAddonValue] = useState(['12:00:00']) + + return ( + <> +

Addon

+
+ { + console.log('basic-default', e) + setAddonValue(e) + }} + prefix={} + /> +
+ + ) +} diff --git a/packages/ui/time-picker/stories/index.stories.tsx b/packages/ui/time-picker/stories/index.stories.tsx index 7af377483..dd81ad0c8 100644 --- a/packages/ui/time-picker/stories/index.stories.tsx +++ b/packages/ui/time-picker/stories/index.stories.tsx @@ -8,6 +8,7 @@ export * from './disabled.stories' export * from './range.stories' export * from './format.stories' export * from './custom-disabled.stories' +export * from './addon.stories' export default { title: 'Data Input/TimePicker',