完善画布生成面板交互

补齐普通生图参考图来源菜单和画布选择流程

接入UI设计图与视频生成面板的提交链路

让生成引用上传目标支持多种生成面板

统一图片信息弹窗断言并补充相关测试

修复图标按钮浮层锚点ref与视频生成类型契约
This commit is contained in:
2026-06-17 21:49:32 +08:00
parent 2d90a30b8b
commit 6d964937db
21 changed files with 914 additions and 85 deletions
+22 -11
View File
@@ -1,9 +1,11 @@
import { forwardRef } from 'react';
import type {
ButtonHTMLAttributes,
HTMLAttributes,
KeyboardEvent,
LabelHTMLAttributes,
ReactNode,
Ref,
} from 'react';
type PlatformIconButtonBaseProps = {
@@ -52,16 +54,22 @@ type PlatformIconButtonProps =
* 平台通用图标动作按钮。
* 统一承接纯图标动作、图标上传 label 和带短标签的浮动图标动作。
*/
export function PlatformIconButton({
label,
icon,
children,
variant = 'platformIcon',
title,
className,
asChild,
...actionProps
}: PlatformIconButtonProps) {
export const PlatformIconButton = forwardRef<
HTMLButtonElement | HTMLLabelElement | HTMLSpanElement,
PlatformIconButtonProps
>(function PlatformIconButton(
{
label,
icon,
children,
variant = 'platformIcon',
title,
className,
asChild,
...actionProps
},
ref,
) {
const variantClassName = {
platformIcon: 'platform-icon-button',
surfaceFloating:
@@ -78,6 +86,7 @@ export function PlatformIconButton({
return (
<label
{...(actionProps as LabelHTMLAttributes<HTMLLabelElement>)}
ref={ref as Ref<HTMLLabelElement>}
title={title}
className={actionClassName}
>
@@ -112,6 +121,7 @@ export function PlatformIconButton({
return (
<span
{...spanProps}
ref={ref as Ref<HTMLSpanElement>}
aria-disabled={disabled}
aria-label={label}
className={actionClassName}
@@ -133,6 +143,7 @@ export function PlatformIconButton({
return (
<button
{...buttonProps}
ref={ref as Ref<HTMLButtonElement>}
type={type}
aria-label={label}
title={title}
@@ -142,4 +153,4 @@ export function PlatformIconButton({
{children}
</button>
);
}
});