fix: 完成按钮移到图片底部,改为黑色风格与网站统一
This commit is contained in:
parent
976e8de4c7
commit
da601a8c48
@ -245,28 +245,17 @@ export function ObjectPickerOverlay() {
|
||||
{isPickerLoading
|
||||
? '正在识别...'
|
||||
: pickedMarkers.length > 0
|
||||
? `已标注 ${pickedMarkers.length} 个物品,继续点击或完成`
|
||||
? `已标注 ${pickedMarkers.length} 个物品`
|
||||
: '点击图片中的物品进行标注'}
|
||||
</span>
|
||||
{pickedMarkers.length > 0 ? (
|
||||
<Button
|
||||
size="sm"
|
||||
className="h-7 rounded-full bg-green-600 hover:bg-green-700 text-white px-3"
|
||||
onClick={handleFinish}
|
||||
>
|
||||
<Check className="h-4 w-4 mr-1" />
|
||||
完成
|
||||
</Button>
|
||||
) : (
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="h-7 w-7 rounded-full"
|
||||
onClick={handleClose}
|
||||
>
|
||||
<X className="h-4 w-4" />
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="h-7 w-7 rounded-full"
|
||||
onClick={handleClose}
|
||||
>
|
||||
<X className="h-4 w-4" />
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{/* 图片容器 */}
|
||||
@ -340,21 +329,32 @@ export function ObjectPickerOverlay() {
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* 底部已标注物品列表 */}
|
||||
{/* 底部工具栏:已标注物品列表 + 完成按钮 */}
|
||||
{pickedMarkers.length > 0 && (
|
||||
<div className="absolute bottom-4 left-1/2 -translate-x-1/2 flex items-center gap-2 bg-white rounded-lg px-3 py-2 shadow-lg max-w-[80vw] overflow-x-auto">
|
||||
<span className="text-xs text-gray-500 flex-shrink-0">已标注:</span>
|
||||
{pickedMarkers.map((marker) => (
|
||||
<span
|
||||
key={`list-${marker.clickX}-${marker.clickY}`}
|
||||
className="inline-flex items-center gap-1 bg-blue-50 text-blue-700 text-xs px-2 py-1 rounded-full flex-shrink-0"
|
||||
>
|
||||
<span className="w-4 h-4 rounded-full bg-blue-500 text-white text-xs flex items-center justify-center">
|
||||
{marker.index}
|
||||
<div className="absolute bottom-4 left-1/2 -translate-x-1/2 flex items-center gap-3 bg-white rounded-full px-3 py-2 shadow-lg max-w-[80vw]">
|
||||
<div className="flex items-center gap-2 overflow-x-auto">
|
||||
<span className="text-xs text-gray-500 flex-shrink-0">已标注:</span>
|
||||
{pickedMarkers.map((marker) => (
|
||||
<span
|
||||
key={`list-${marker.clickX}-${marker.clickY}`}
|
||||
className="inline-flex items-center gap-1 bg-blue-50 text-blue-700 text-xs px-2 py-1 rounded-full flex-shrink-0"
|
||||
>
|
||||
<span className="w-4 h-4 rounded-full bg-blue-500 text-white text-xs flex items-center justify-center">
|
||||
{marker.index}
|
||||
</span>
|
||||
{marker.objectName}
|
||||
</span>
|
||||
{marker.objectName}
|
||||
</span>
|
||||
))}
|
||||
))}
|
||||
</div>
|
||||
{/* 完成按钮 - 黑色风格 */}
|
||||
<Button
|
||||
size="sm"
|
||||
className="h-8 rounded-full bg-black hover:bg-black/90 text-white px-4 flex-shrink-0"
|
||||
onClick={handleFinish}
|
||||
>
|
||||
<Check className="h-4 w-4 mr-1" />
|
||||
完成
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
</div>,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user