Skip to content

Commit

Permalink
fix: 修订类型
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyatong committed Dec 30, 2024
1 parent 4cf2633 commit 0ceeef0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/packages/dialog/dialog.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const BaseDialog: FunctionComponent<Partial<DialogProps>> & {
(footerDirection === 'vertical' ? (
<View
className={`${classPrefix}-footer-cancel ${btnClass}`}
onClick={(e) => handleCancel(e)}
onClick={(e) => handleCancel(e as any)}
>
{cancelText || locale.cancel}
</View>
Expand Down
4 changes: 3 additions & 1 deletion src/packages/dialog/dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ const BaseDialog: ForwardRefRenderFunction<unknown, Partial<DialogProps>> = (
const renderFooter = () => {
if (footer === null) return ''

const handleCancel = (e: MouseEvent<HTMLButtonElement>) => {
const handleCancel = (
e: MouseEvent<HTMLButtonElement | HTMLDivElement>
) => {
e.stopPropagation()
if (!beforeCancel?.()) return
if (!beforeClose?.()) return
Expand Down

0 comments on commit 0ceeef0

Please sign in to comment.