fix(extension):修复收藏应用组不能拖拽换位功能

This commit is contained in:
qiqi49 2024-03-06 09:14:41 +08:00 committed by iaom
parent f7b4b23a1f
commit af6886e6ff
1 changed files with 7 additions and 6 deletions

View File

@ -29,8 +29,8 @@ UkuiItems.StyleBackground {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
paletteRole: Platform.Theme.Text paletteRole: Platform.Theme.Text
useStyleTransparency: false useStyleTransparency: false
alpha: (delegateDropArea.enterSourceId !== model.id) alpha: ((delegateDropArea.enterSourceId !== model.id)
&& delegateDropArea.containsDrag && favoriteView.dragTypeIsMerge ? 0.15 : 0 && delegateDropArea.containsDrag && favoriteView.dragTypeIsMerge) ? 0.15 : 0
z: -1 z: -1
} }
@ -43,13 +43,14 @@ UkuiItems.StyleBackground {
// drag.source [itemLoader] // drag.source [itemLoader]
onEntered: { onEntered: {
// folder // folder
if (drag.source.isFolder || !drag.source.sourceId) { if (!drag.source.sourceId) {
drag.accepted = false; drag.accepted = false;
return; return;
} }
if (!drag.source.isFolder) {
enterSourceId = drag.source.sourceId; enterSourceId = drag.source.sourceId;
delegateDropTimer.running = true; delegateDropTimer.running = true;
}
} }
onExited: { onExited: {
if (!drag.source.sourceId) { if (!drag.source.sourceId) {