mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-11 16:10:05 +00:00
Inset border, default dropIndicator for LoadImage
This commit is contained in:
@@ -14,7 +14,12 @@ const canAcceptDrop = ref(false)
|
||||
<template>
|
||||
<drop-wrapper
|
||||
v-if="onDragOver && onDragDrop"
|
||||
:class="cn(canAcceptDrop && 'ring-1 ring-primary-500 bg-primary-500/10')"
|
||||
:class="
|
||||
cn(
|
||||
'rounded-lg ring-inset ring-primary-500',
|
||||
canAcceptDrop && 'ring-4 bg-primary-500/10'
|
||||
)
|
||||
"
|
||||
@dragover.prevent="(e: DragEvent) => (canAcceptDrop = onDragOver!(e))"
|
||||
@dragleave="canAcceptDrop = false"
|
||||
@drop.stop.prevent="
|
||||
@@ -27,7 +32,7 @@ const canAcceptDrop = ref(false)
|
||||
<slot />
|
||||
<div
|
||||
v-if="dropIndicator"
|
||||
class="flex flex-col items-center align-center border-dashed rounded-lg border grow-1 w-full border-border-subtle my-3"
|
||||
class="flex flex-col items-center align-center border-dashed rounded-lg border grow-1 w-full border-border-subtle my-3 py-2"
|
||||
>
|
||||
<span v-if="dropIndicator.label" v-text="dropIndicator.label" />
|
||||
<i v-if="dropIndicator.iconClass" :class="dropIndicator.iconClass" />
|
||||
|
||||
Reference in New Issue
Block a user