diff --git a/packages/uni-ui-types/src/uni-search-bar.ts b/packages/uni-ui-types/src/uni-search-bar.ts index ef96a68..42c7385 100644 --- a/packages/uni-ui-types/src/uni-search-bar.ts +++ b/packages/uni-ui-types/src/uni-search-bar.ts @@ -34,10 +34,8 @@ type _UniSearchBarOnConfirmEvent = _UniSearchBarBaseEvent; /** 确认时触发 */ type _UniSearchBarOnConfirm = (event: _UniSearchBarOnConfirmEvent) => void; -type _UniSearchBarOnInputEvent = _UniSearchBarBaseEvent; - /** value 改变时触发 */ -type _UniSearchBarOnInput = (event: _UniSearchBarOnInputEvent) => void; +type _UniSearchBarOnInput = (value: _UniSearchBarValue) => void; type _UniSearchBarOnCancelEvent = _UniSearchBarBaseEvent; @@ -152,7 +150,6 @@ export type { _UniSearchBarBaseEvent as UniSearchBarBaseEvent, _UniSearchBarOnConfirmEvent as UniSearchBarOnConfirmEvent, _UniSearchBarOnConfirm as UniSearchBarOnConfirm, - _UniSearchBarOnInputEvent as UniSearchBarOnInputEvent, _UniSearchBarOnInput as UniSearchBarOnInput, _UniSearchBarOnCancelEvent as UniSearchBarOnCancelEvent, _UniSearchBarOnCancel as UniSearchBarOnCancel, @@ -195,7 +192,6 @@ declare global { export type UniSearchBarOnConfirmEvent = _UniSearchBarOnConfirmEvent; /** 确认时触发 */ export interface UniSearchBarOnConfirm extends _UniSearchBarOnConfirm {} - export type UniSearchBarOnInputEvent = _UniSearchBarOnInputEvent; /** value 改变时触发 */ export interface UniSearchBarOnInput extends _UniSearchBarOnInput {} export type UniSearchBarOnCancelEvent = _UniSearchBarOnCancelEvent; diff --git a/packages/uni-ui-types/test/uni-search-bar.test-d.ts b/packages/uni-ui-types/test/uni-search-bar.test-d.ts index 3f0b653..f892f1d 100644 --- a/packages/uni-ui-types/test/uni-search-bar.test-d.ts +++ b/packages/uni-ui-types/test/uni-search-bar.test-d.ts @@ -15,7 +15,6 @@ import type { UniSearchBarOnFocus, UniSearchBarOnFocusEvent, UniSearchBarOnInput, - UniSearchBarOnInputEvent, UniSearchBarProps, UniSearchBarValue, } from "@uni-helper/uni-ui-types"; @@ -41,9 +40,6 @@ describe("UniSearchBar", () => { expectTypeOf().toBeObject(); expectTypeOf().toEqualTypeOf(); - expectTypeOf().toBeObject(); - expectTypeOf().toEqualTypeOf(); - expectTypeOf().toBeObject(); expectTypeOf().toEqualTypeOf();