fix: 修复html文件高度没自适应。发送框文本状态错误
This commit is contained in:
parent
d0c9255c20
commit
e192d75a1c
|
|
@ -468,13 +468,13 @@ export function ArtifactFileDetail({
|
|||
{previewable &&
|
||||
viewMode === "preview" &&
|
||||
(language === "markdown" || language === "html") && (
|
||||
<div className="min-h-full mb-[180px] rounded-b-[10px] bg-white p-0 mb-0">
|
||||
<ArtifactFilePreview
|
||||
content={displayContent}
|
||||
language={language ?? "text"}
|
||||
zoom={zoom}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<ArtifactFilePreview
|
||||
content={displayContent}
|
||||
language={language ?? "text"}
|
||||
zoom={zoom}
|
||||
/>
|
||||
|
||||
)}
|
||||
{isCodeFile && viewMode === "code" && (
|
||||
<div className="min-h-full mb-[180px] rounded-b-[10px] bg-white p-0 mb-0">
|
||||
|
|
@ -487,14 +487,14 @@ export function ArtifactFileDetail({
|
|||
</div>
|
||||
)}
|
||||
{!isCodeFile && (
|
||||
<div className="h-full mb-[180px] ">
|
||||
<iframe
|
||||
className="size-full border-0"
|
||||
srcDoc={artifactViewerSrcDoc}
|
||||
sandbox="allow-same-origin allow-scripts allow-downloads"
|
||||
title={`Artifact preview: ${fileName}`}
|
||||
/>
|
||||
</div>
|
||||
<div className="h-full mb-[180px]">
|
||||
<iframe
|
||||
className="size-full border-0"
|
||||
srcDoc={artifactViewerSrcDoc}
|
||||
sandbox="allow-same-origin allow-scripts allow-downloads"
|
||||
title={`Artifact preview: ${fileName}`}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</ArtifactContent>
|
||||
</Artifact>
|
||||
|
|
@ -526,17 +526,21 @@ export function ArtifactFilePreview({
|
|||
{content ?? ""}
|
||||
</Streamdown>
|
||||
</div>
|
||||
|
||||
);
|
||||
}
|
||||
if (language === "html") {
|
||||
return (
|
||||
<iframe
|
||||
className="size-full"
|
||||
title="Artifact preview"
|
||||
srcDoc={content}
|
||||
sandbox="allow-scripts allow-forms"
|
||||
style={{ zoom: zoomScale }}
|
||||
/>
|
||||
<div className="h-full mb-[180px]">
|
||||
<iframe
|
||||
className="size-full"
|
||||
title="Artifact preview"
|
||||
srcDoc={content}
|
||||
sandbox="allow-scripts allow-forms"
|
||||
style={{ zoom: zoomScale }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ export function InputBox({
|
|||
threadId: threadIdFromProps,
|
||||
disabled,
|
||||
autoFocus,
|
||||
status = "ready",
|
||||
status,
|
||||
context,
|
||||
extraHeader,
|
||||
showWelcomeStyle,
|
||||
|
|
|
|||
Loading…
Reference in New Issue