Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
fix: 调整Button组件的dom标签
Browse files Browse the repository at this point in the history
  • Loading branch information
sydeEvans committed Aug 9, 2021
1 parent a828da3 commit 63ac7cf
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions packages/remax-one/src/hostComponents/Button/index.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import clsx from 'clsx';
import { ButtonWebProps } from './props';
import { filterProps } from '../../utils/isPlatformSpecifyProp';
import useWebTouch from '../useWebTouch';
import View from '../View';

export type ButtonProps = ButtonWebProps;

Expand Down Expand Up @@ -32,18 +31,16 @@ const Button: React.ForwardRefRenderFunction<any, ButtonWebProps> = (props, ref)
});

return (
<View>
<button
{...(restProps as any)}
onTouchStart={handleTouchStart}
onTouchMove={handleTouchMove}
onTouchEnd={handleTouchEnd}
ref={ref}
onTouchCancel={handleTouchCancel}
className={clsx('remax-button', className, { [hoverClassName || '']: hovered })}
onClick={onTap as any}
/>
</View>
<button
{...(restProps as any)}
onTouchStart={handleTouchStart}
onTouchMove={handleTouchMove}
onTouchEnd={handleTouchEnd}
ref={ref}
onTouchCancel={handleTouchCancel}
className={clsx('remax-button', className, { [hoverClassName || '']: hovered })}
onClick={onTap as any}
/>
);
};

Expand Down

0 comments on commit 63ac7cf

Please sign in to comment.