!152 修复鼠标长按拖拽

Merge pull request !152 from qano/master
This commit is contained in:
openharmony_ci 2022-06-06 09:22:42 +00:00 committed by Gitee
commit edd4e16bc2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 7 additions and 0 deletions

View File

@ -83,6 +83,12 @@ export default struct AppBubble {
.borderRadius(this.isSelect ? StyleConstants.DEFAULT_15 : StyleConstants.DEFAULT_0)
.padding(this.isSelect ? { left: StyleConstants.DEFAULT_20,
right: StyleConstants.DEFAULT_20, top: this.mPaddingTop } : { top: this.mPaddingTop })
.gesture(
LongPressGesture({ repeat: false })
.onAction((event: GestureEvent) => {
AppStorage.SetOrCreate('isLongPress', true);
})
)
}
.parallelGesture(
LongPressGesture({ repeat: false })

View File

@ -80,6 +80,7 @@ export default struct AppIcon {
}
.onHover((isHover: boolean) => {
Log.showInfo(TAG, `onHover isHover ${isHover}`);
this.scale = isHover ? 1.05 : 1
})
.onTouch((event: TouchEvent) => {
if (event.type === TouchType.Down) {