-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
yushijie1
committed
Nov 19, 2024
1 parent
def9cd8
commit 8200e56
Showing
37 changed files
with
740 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 10 additions & 4 deletions
14
...ugin_compile_mode/tests/__swc_snapshots__/src/tests/attributes.rs/should_handle_events.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
const TARO_TEMPLATES_f0t0 = '<template name="tmpl_0_f0t0"><view><view bindtap="eh" data-sid="{{i.cn[0].sid}}" id="{{i.cn[0].sid}}"></view><view bindanimationstart="eh" data-sid="{{i.cn[1].sid}}" id="{{i.cn[1].uid}}"></view><image bindload="eh" data-sid="{{i.cn[2].sid}}" id="myImg"></image></view></template>'; | ||
const TARO_TEMPLATES_f0t0 = '<template name="tmpl_0_f0t0"><view><view bindtap="eh" data-sid="{{i.cn[0].sid}}" id="{{i.cn[0].sid}}"></view><view bindanimationstart="eh" data-sid="{{i.cn[1].sid}}" id="{{i.cn[1].uid}}"></view><image bindload="eh" data-sid="{{i.cn[2].sid}}" id="myImg"></image><view bindscroll="eh" data-sid="{{i.cn[3].sid}}" id="{{i.cn[3].sid}}" native-view="view" worklet:ongesture="onGesture" worklet:onscrollupdate="onScrollUpdate" worklet:should-response-on-move="shouldResponseOnMoveCallBack"></view></view></template>'; | ||
function Index() { | ||
return <View compileMode="f0t0"> | ||
|
||
<View onClick={handleViewClick}></View> | ||
<View onAnimationStart={() => {}} id={myId}></View> | ||
<Image onLoad={() => {}} /> | ||
</View> | ||
|
||
<View onAnimationStart={()=>{}} id={myId}></View> | ||
|
||
<Image onLoad={()=>{}}/> | ||
|
||
<View onScroll={()=>{}}></View> | ||
|
||
</View>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
packages/taro-components/types/gesture/DoubleTapGestureHandler.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { ComponentType } from 'react' | ||
|
||
import { StandardProps } from '../common' | ||
import { CommonGestureProps } from './common' | ||
|
||
interface DoubleTapGestureHandlerProps extends CommonGestureProps, StandardProps { | ||
/** 手指移动过程中手势是否响应 | ||
* @supported weapp-skyline | ||
*/ | ||
shouldResponseOnMoveWorklet?: string | ||
} | ||
|
||
/** 双击时触发手势 | ||
* 微信小程序下 skyline 的手势标签,只能在 CompileMode 中使用 | ||
* @supported weapp-skyline | ||
* @example_react | ||
* ```tsx | ||
* import { Component } from 'react' | ||
* import { View, DoubleTapGestureHandler } from '@tarojs/components' | ||
* | ||
* export function Index () { | ||
* return ( | ||
* <View compileMode> | ||
* <DoubleTapGestureHandler onGestureWorklet="onGesture"> | ||
* <View className='circle'></View> | ||
* </DoubleTapGestureHandler> | ||
* </View> | ||
* ) | ||
* } | ||
* ``` | ||
*/ | ||
declare const DoubleTapGestureHandler: ComponentType<DoubleTapGestureHandlerProps> | ||
|
||
export { DoubleTapGestureHandler, DoubleTapGestureHandlerProps } |
30 changes: 30 additions & 0 deletions
30
packages/taro-components/types/gesture/ForcePressGestureHandler.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { ComponentType } from 'react' | ||
|
||
import { StandardProps } from './common' | ||
import { CommonGestureProps } from './common' | ||
|
||
interface ForcePressGestureHandlerProps extends CommonGestureProps, StandardProps { | ||
} | ||
|
||
/**iPhone 设备重按时触发手势 | ||
* 微信小程序下 skyline 的手势标签,只能在 CompileMode 中使用 | ||
* @supported weapp-skyline | ||
* @example_react | ||
* ```tsx | ||
* import { Component } from 'react' | ||
* import { View, ForcePressGestureHandler } from '@tarojs/components' | ||
* | ||
* export function Index () { | ||
* return ( | ||
* <View compileMode> | ||
* <ForcePressGestureHandler onGestureWorklet="onGesture"> | ||
* <View className='circle'></View> | ||
* </ForcePressGestureHandler> | ||
* </View> | ||
* ) | ||
* } | ||
* ``` | ||
*/ | ||
declare const ForcePressGestureHandler: ComponentType<ForcePressGestureHandlerProps> | ||
|
||
export { ForcePressGestureHandler, ForcePressGestureHandlerProps } |
34 changes: 34 additions & 0 deletions
34
packages/taro-components/types/gesture/HorizontalDragGestureHandler.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { ComponentType } from 'react' | ||
|
||
import { StandardProps } from '../common' | ||
import { CommonGestureProps } from './common' | ||
|
||
interface HorizontalDragGestureHandlerProps extends CommonGestureProps, StandardProps { | ||
/** 手指移动过程中手势是否响应 | ||
* @supported weapp-skyline | ||
*/ | ||
shouldResponseOnMoveWorklet?: string | ||
} | ||
|
||
/**横向滑动时触发手势 | ||
* 微信小程序下 skyline 的手势标签,只能在 CompileMode 中使用 | ||
* @supported weapp-skyline | ||
* @example_react | ||
* ```tsx | ||
* import { Component } from 'react' | ||
* import { View, HorizontalDragGestureHandler } from '@tarojs/components' | ||
* | ||
* export function Index () { | ||
* return ( | ||
* <View compileMode> | ||
* <HorizontalDragGestureHandler onGestureWorklet="onGesture"> | ||
* <View className='circle'></View> | ||
* </HorizontalDragGestureHandler> | ||
* </View> | ||
* ) | ||
* } | ||
* ``` | ||
*/ | ||
declare const HorizontalDragGestureHandler: ComponentType<HorizontalDragGestureHandlerProps> | ||
|
||
export { HorizontalDragGestureHandler, HorizontalDragGestureHandlerProps } |
34 changes: 34 additions & 0 deletions
34
packages/taro-components/types/gesture/LongPressGestureHandler.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { ComponentType } from 'react' | ||
|
||
import { StandardProps } from '../common' | ||
import { CommonGestureProps } from './common' | ||
|
||
interface LongPressGestureHandlerProps extends CommonGestureProps, StandardProps { | ||
/** 手指移动过程中手势是否响应 | ||
* @supported weapp-skyline | ||
*/ | ||
shouldResponseOnMoveWorklet?: string | ||
} | ||
|
||
/**长按时触发手势 | ||
* 微信小程序下 skyline 的手势标签,只能在 CompileMode 中使用 | ||
* @supported weapp-skyline | ||
* @example_react | ||
* ```tsx | ||
* import { Component } from 'react' | ||
* import { View, LongPressGestureHandler } from '@tarojs/components' | ||
* | ||
* export function Index () { | ||
* return ( | ||
* <View compileMode> | ||
* <LongPressGestureHandler onGestureWorklet="onGesture"> | ||
* <View className='circle'></View> | ||
* </LongPressGestureHandler> | ||
* </View> | ||
* ) | ||
* } | ||
* ``` | ||
*/ | ||
declare const LongPressGestureHandler: ComponentType<LongPressGestureHandlerProps> | ||
|
||
export { LongPressGestureHandler, LongPressGestureHandlerProps } |
34 changes: 34 additions & 0 deletions
34
packages/taro-components/types/gesture/PanGestureHandler.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { ComponentType } from 'react' | ||
|
||
import { StandardProps } from '../common' | ||
import { CommonGestureProps } from './common' | ||
|
||
interface PanGestureHandlerProps extends CommonGestureProps, StandardProps { | ||
/** 手指移动过程中手势是否响应 | ||
* @supported weapp-skyline | ||
*/ | ||
shouldResponseOnMoveWorklet?: string | ||
} | ||
|
||
/**拖动(横向/纵向)时触发手势 | ||
* 微信小程序下 skyline 的手势标签,只能在 CompileMode 中使用 | ||
* @supported weapp-skyline | ||
* @example_react | ||
* ```tsx | ||
* import { Component } from 'react' | ||
* import { View, PanGestureHandler } from '@tarojs/components' | ||
* | ||
* export function Index () { | ||
* return ( | ||
* <View compileMode> | ||
* <PanGestureHandler onGestureWorklet="onGesture"> | ||
* <View className='circle'></View> | ||
* </PanGestureHandler> | ||
* </View> | ||
* ) | ||
* } | ||
* ``` | ||
*/ | ||
declare const PanGestureHandler: ComponentType<PanGestureHandlerProps> | ||
|
||
export { PanGestureHandler, PanGestureHandlerProps } |
34 changes: 34 additions & 0 deletions
34
packages/taro-components/types/gesture/ScaleGestureHandler.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { ComponentType } from 'react' | ||
|
||
import { StandardProps } from '../common' | ||
import { CommonGestureProps } from './common' | ||
|
||
interface ScaleGestureHandlerProps extends CommonGestureProps, StandardProps { | ||
/** 手指移动过程中手势是否响应 | ||
* @supported weapp-skyline | ||
*/ | ||
shouldResponseOnMoveWorklet?: string | ||
} | ||
|
||
/**多指缩放时触发手势 | ||
* 微信小程序下 skyline 的手势标签,只能在 CompileMode 中使用 | ||
* @supported weapp-skyline | ||
* @example_react | ||
* ```tsx | ||
* import { Component } from 'react' | ||
* import { View, ScaleGestureHandler } from '@tarojs/components' | ||
* | ||
* export function Index () { | ||
* return ( | ||
* <View compileMode> | ||
* <ScaleGestureHandler onGestureWorklet="onGesture"> | ||
* <View className='circle'></View> | ||
* </ScaleGestureHandler> | ||
* </View> | ||
* ) | ||
* } | ||
* ``` | ||
*/ | ||
declare const ScaleGestureHandler: ComponentType<ScaleGestureHandlerProps> | ||
|
||
export { ScaleGestureHandler, ScaleGestureHandlerProps } |
34 changes: 34 additions & 0 deletions
34
packages/taro-components/types/gesture/TapGestureHandler.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { ComponentType } from 'react' | ||
|
||
import { StandardProps } from '../common' | ||
import { CommonGestureProps } from './common' | ||
|
||
interface TapGestureHandlerProps extends CommonGestureProps, StandardProps { | ||
/** 手指移动过程中手势是否响应 | ||
* @supported weapp-skyline | ||
*/ | ||
shouldResponseOnMoveWorklet?: string | ||
} | ||
|
||
/**点击时触发手势 | ||
* 微信小程序下 skyline 的手势标签,只能在 CompileMode 中使用 | ||
* @supported weapp-skyline | ||
* @example_react | ||
* ```tsx | ||
* import { Component } from 'react' | ||
* import { View, TapGestureHandler } from '@tarojs/components' | ||
* | ||
* export function Index () { | ||
* return ( | ||
* <View compileMode> | ||
* <TapGestureHandler onGestureWorklet="onGesture"> | ||
* <View className='circle'></View> | ||
* </TapGestureHandler> | ||
* </View> | ||
* ) | ||
* } | ||
* ``` | ||
*/ | ||
declare const TapGestureHandler: ComponentType<TapGestureHandlerProps> | ||
|
||
export { TapGestureHandler, TapGestureHandlerProps } |
Oops, something went wrong.