1
import * as React from 'react';
2
import { TapEvent, TouchStartEvent, TouchEndEvent, TouchMoveEvent, TouchCancelEvent } from '../../../types';
3

4 4
export { default as defaults } from './default';
5

6
interface CommonProps {
7
  // 通用属性
8
  readonly dataset?: DOMStringMap;
9
  id?: string;
10
  slot?: string;
11
  className?: string;
12
  style?: React.CSSProperties;
13
  hoverClassName?: string;
14
  hoverStartTime?: number;
15
  hoverStayTime?: number;
16
  role?: string;
17
}
18

19
export default interface ViewProps extends CommonProps, React.AriaAttributes {
20
  onTap?: (event: TapEvent) => void;
21
  onTouchStart?: (event: TouchStartEvent) => void;
22
  onTouchMove?: (e: TouchMoveEvent) => void;
23
  onTouchEnd?: (e: TouchEndEvent) => void;
24
  onTouchCancel?: (e: TouchCancelEvent) => void;
25
  onLongTap?: (e: TapEvent) => void;
26
}
27

28
export interface ViewWebProps extends CommonProps, React.HTMLAttributes<HTMLDivElement> {
29
  onTap?: (event: React.MouseEvent<HTMLDivElement>) => void;
30
  onLongTap?: (event: React.TouchEvent<HTMLDivElement>) => void;
31
}

Read our documentation on viewing source code .

Loading