Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
yuzhilin
2024-04-10 14:41:03 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f0e22d6b0ccdc3f2b53c79cf13992db5a4a8a46e
f0e22d6b
1 parent
64b96bc9
拖拽复位
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
sight_harmony/features/wdComponent/src/main/ets/components/page/ChannelSubscriptionLayout.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/ChannelSubscriptionLayout.ets
View file @
f0e22d6
...
...
@@ -15,7 +15,6 @@ const LOCAL_CHANNEL: string = '地方频道'
@CustomDialog
struct ChannelDialog {
@State dragItem: number = -1
@State item: number = -1
private dragRefOffsetX: number = 0
private dragRefOffsetY: number = 0
@State offsetX: number = 0
...
...
@@ -235,7 +234,7 @@ struct ChannelDialog {
.alignContent(Alignment.Start)
.height(36)
.onClick(() => {
AppStorage.set('indexSettingChannelId',item.channelId)
AppStorage.set('indexSettingChannelId',
item.channelId)
})
})
}
...
...
@@ -308,6 +307,7 @@ struct ChannelDialog {
})
.zIndex(this.dragItem == item.num ? 1 : 0)
.translate(this.dragItem == item.num ? { x: this.offsetX, y: this.offsetY } : { x: 0, y: 0 })
.gesture(
GestureGroup(GestureMode.Sequence,
PanGesture({ fingers: 1, direction: null, distance: 0 })
...
...
@@ -324,12 +324,20 @@ struct ChannelDialog {
.onActionEnd((event: GestureEvent) => {
animateTo({ curve: curves.interpolatingSpring(0, 1, 400, 38) }, () => {
this.dragItem = -1
this.offsetX = 0
this.offsetY = 0
this.dragRefOffsetX = 0
this.dragRefOffsetY = 0
})
})
)
.onCancel(() => {
animateTo({ curve: curves.interpolatingSpring(0, 1, 400, 38) }, () => {
this.dragItem = -1
this.offsetX = 0
this.offsetY = 0
this.dragRefOffsetX = 0
this.dragRefOffsetY = 0
})
}))
...
...
Please
register
or
login
to post a comment