fix(workspace): 创作工作台 - 修复线上样式层级并优化 Agent、菜单与素材密度

This commit is contained in:
ddCat committed 2026-09-20 05:29:52 +08:00
1 parent b9d60f9807
commit cfcc53a904
21 files changed
+671 -110

No files matched your search

@@ -1,6 +1,6 @@
import { Button } from "antd";
import { Button, ConfigProvider } from "antd";
import { RotateCcw } from "lucide-react";
import type { ReactNode } from "react";
import { useState, type ReactNode } from "react";
/** 内容库的浏览控件,不复用后台表格的筛选外框。 */
export function CollectionToolbar({ children, trailing, active, onReset, label = "搜索与筛选" }: {
@@ -10,8 +10,23 @@ export function CollectionToolbar({ children, trailing, active, onReset, label =
onReset?: () => void;
label?: string;
}) {
return <section className="collection-toolbar" aria-label={label}>
<div className="collection-toolbar-controls">{children}</div>
const [inputModality, setInputModality] = useState<"keyboard" | "pointer">("keyboard");
return <section
className="collection-toolbar"
aria-label={label}
data-input-modality={inputModality}
onPointerDownCapture={() => setInputModality("pointer")}
onKeyDownCapture={(event) => {
if (!event.altKey && !event.ctrlKey && !event.metaKey) setInputModality("keyboard");
}}
onBlurCapture={(event) => {
if (!event.currentTarget.contains(event.relatedTarget)) setInputModality("keyboard");
}}
>
<ConfigProvider select={{ variant: "filled", classNames: { popup: { root: "workspace-quiet-popup" } } }}>
<div className="collection-toolbar-controls">{children}</div>
</ConfigProvider>
<div className="collection-toolbar-actions">
{active && onReset ? <Button type="text" icon={<RotateCcw />} onClick={onReset}>重置</Button> : null}
{trailing}