mirror of
https://github.com/dbgate/dbgate
synced 2024-11-08 04:35:58 +00:00
allow drop on group #274
This commit is contained in:
parent
909591404f
commit
ebfa0a1939
@ -35,19 +35,17 @@
|
|||||||
return res;
|
return res;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
|
||||||
|
|
||||||
<div
|
function handleDrop(e) {
|
||||||
class="group"
|
|
||||||
on:click={() => (isExpanded = !isExpanded)}
|
|
||||||
on:drop={e => {
|
|
||||||
var data = e.dataTransfer.getData('app_object_drag_data');
|
var data = e.dataTransfer.getData('app_object_drag_data');
|
||||||
if (data && onDropOnGroup) {
|
if (data && onDropOnGroup) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
onDropOnGroup(data, group);
|
onDropOnGroup(data, group);
|
||||||
}
|
}
|
||||||
}}
|
}
|
||||||
>
|
</script>
|
||||||
|
|
||||||
|
<div class="group" on:click={() => (isExpanded = !isExpanded)} on:drop={handleDrop}>
|
||||||
<span class="expand-icon">
|
<span class="expand-icon">
|
||||||
<FontIcon icon={groupIconFunc(isExpanded)} />
|
<FontIcon icon={groupIconFunc(isExpanded)} />
|
||||||
</span>
|
</span>
|
||||||
@ -65,6 +63,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
<div on:drop={handleDrop}>
|
||||||
{#each items as item}
|
{#each items as item}
|
||||||
<AppObjectListItem
|
<AppObjectListItem
|
||||||
isHidden={!item.isMatched}
|
isHidden={!item.isMatched}
|
||||||
@ -77,6 +76,7 @@
|
|||||||
{passProps}
|
{passProps}
|
||||||
/>
|
/>
|
||||||
{/each}
|
{/each}
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
Loading…
Reference in New Issue
Block a user