Import workbench/panel/lib/client.js

This commit is contained in:
QQ 2026-11-12 15:42:30 +08:00
parent 0cd0aea49d
commit 257c47f78c
1 changed files with 8 additions and 1 deletions

View File

@ -2059,7 +2059,14 @@ window.__ModuleLoader__.load({
? renderFactorySlot(
"conversation.content",
{ variant: "main", phase: phaseValue, hero: heroValue },
{ slots: { widthControls: input.widthControls || {} } },
// widthControls 槽要的是组件本身(官方根组件传的是
// ConversationWidthControls 函数);宿主没有给真组件时
// 宁可不传 slots,让工厂用它自带的 NoConversationWidthControls
// 兜底。旧版在这里塞了个空对象 {},工厂把它当组件渲染,
// React 抛 #130(element type got: object),中央会话整片白屏。
typeof input.widthControls === "function"
? { slots: { widthControls: input.widthControls } }
: {},
)
: null,
]);