Blame view

Types.js 1.88 KB
75c87a8d   张志伟   init
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
  /*
   * @Author: 石破天惊
   * @email: shanshang130@gmail.com
   * @Date: 2021-07-21 13:05:32
   * @LastEditTime: 2021-07-29 23:34:45
   * @LastEditors: 石破天惊
   * @Description: 
   */
  
  import {Animated, ViewProps, ViewStyle} from 'react-native';
  import {RefreshHeader} from './RefreshHeader';
  import {LoadingFooter} from './LoadingFooter';
  
  export interface IndexPath {
    section: number;
    row: number;
  }
  
  export interface Offset {
    x: number;
    y: number;
  }
  
  export interface Size {
    width: number;
    height: number;
  }
  
  export interface NativeContentOffset {
    x?: Animated.Value;
    y?: Animated.Value;
  }
  
  export type RefreshStyle = 'topping' | 'stickyScrollView' | 'stickyContent';
  
  export type LoadingStyle = 'bottoming' | 'stickyScrollView' | 'stickyContent';
  
  export interface ScrollEvent {
    nativeEvent: {
      contentOffset: {
        x: number,
        y: number,
      },
    };
  }
  
  export interface SpringScrollViewPropType extends ViewProps {
    style?: ViewStyle;
    contentStyle?: ViewStyle;
    bounces?: boolean;
    scrollEnabled?: boolean;
    pagingEnabled?: boolean;
    pageSize?: Size;
    decelerationRate?: number;
    directionalLockEnabled?: boolean;
    initialContentOffset?: Offset;
    showsVerticalScrollIndicator?: boolean;
    showsHorizontalScrollIndicator?: boolean;
    refreshHeader?: RefreshHeader;
    loadingFooter?: LoadingFooter;
    onRefresh?: () => any;
    onLoading?: () => any;
    allLoaded?: boolean;
    textInputRefs?: any[];
    inputToolBarHeight?: number;
    tapToHideKeyboard?: boolean;
    onTouchBegin?: () => any;
    onTouchEnd?: () => any;
    inverted?: boolean;
    onMomentumScrollBegin?: () => any;
    onMomentumScrollEnd?: () => any;
    onScroll?: (evt: ScrollEvent) => any;
    keyboardShouldPersistTaps?: 'always' | 'never' | 'handled';
    onNativeContentOffsetExtract?: NativeContentOffset;
    onSizeChange?: ({width: number, height: number}) => any;
    onContentSizeChange?: ({width: number, height: number}) => any;
  }