refactor: 迁移 Ant Design 6 弃用的 Alert 与 Space 属性

This commit is contained in:
que01 committed 2026-10-21 10:30:03 +08:00
1 parent ca1b873a50
commit 3a0099e674
18 files changed
+38 -43

No files matched your search

+1 -1
View File
@@ -219,7 +219,7 @@ export function BrandPage() {
className="brand-page__template-note"
type="info"
showIcon
message={`当前页面方案:${workspace.data?.templateContent?.displayName ?? template.data.name}`}
title={`当前页面方案:${workspace.data?.templateContent?.displayName ?? template.data.name}`}
description={`适用场景:${template.data.serviceCategories.join("、") || "通用品牌展示"}`}
/>
) : null}
@@ -205,7 +205,7 @@ export function ComponentTemplatePreview({
return () => window.removeEventListener("keydown", clear);
}, [onTargetSelected]);
if (!Renderer)
return <Alert type="warning" showIcon message="此模板尚无组件预览,请使用页面预览" />;
return <Alert type="warning" showIcon title="此模板尚无组件预览,请使用页面预览" />;
return (
<div className="component-template-preview-shell">
<div
@@ -59,7 +59,7 @@ export function InquiryPreviewEditor({
return (
<Alert
type="error"
message="表单读取失败"
title="表单读取失败"
action={<Button onClick={() => void query.refetch()}>重试</Button>}
/>
);
@@ -67,10 +67,10 @@ export function InquiryPreviewEditor({
return (
<Alert
type="info"
message={query.isPending ? "正在读取表单" : "未找到对应表单,请刷新后重试"}
title={query.isPending ? "正在读取表单" : "未找到对应表单,请刷新后重试"}
/>
);
if (!field) return <Alert type="warning" message="字段已不存在" />;
if (!field) return <Alert type="warning" title="字段已不存在" />;
return (
<Form<Record<string, unknown>>
form={form}
@@ -311,12 +311,12 @@ export function PresentationEditor({
</div>
{templateContent ? <StatusTag tone="info" label={templateContent.displayName} /> : null}
</div>
{loading ? <Alert type="info" showIcon message="正在读取当前页面方案的编辑项目" /> : null}
{loading ? <Alert type="info" showIcon title="正在读取当前页面方案的编辑项目" /> : null}
{error ? (
<Alert type="warning" showIcon message="页面方案编辑项目读取失败,请刷新后重试。" />
<Alert type="warning" showIcon title="页面方案编辑项目读取失败,请刷新后重试。" />
) : null}
{!loading && !error && !templateContent ? (
<Alert type="warning" showIcon message="当前页面方案暂未提供可编辑的页面内容。" />
<Alert type="warning" showIcon title="当前页面方案暂未提供可编辑的页面内容。" />
) : null}
{templateContent ? (
<>
@@ -454,7 +454,7 @@ export function PresentationEditor({
<Alert
type="info"
showIcon
message="详情页由所选业务内容动态生成"
title="详情页由所选业务内容动态生成"
description="选择业务内容预览详情,记录内容在业务提供项中维护;公共标题和按钮文案可从左侧区域列表配置,对全部详情生效。"
action={
<Button
@@ -480,7 +480,7 @@ export function PresentationEditor({
<Alert
type="info"
showIcon
message="这是一个组合区域"
title="这是一个组合区域"
description={
<Space wrap>
{(selectedTarget.children ?? []).map((childKey) => {
@@ -542,7 +542,7 @@ export function PresentationEditor({
? "error"
: "info"
}
message={
title={
(
selectedRecordSource === "offering"
? offeringsQuery.isError
@@ -583,7 +583,7 @@ export function PresentationEditor({
<Alert
type="info"
showIcon
message="此区域尚未配置内容"
title="此区域尚未配置内容"
description="创建并启用对应内容后,即可在预览中点选编辑。"
action={
<Button
@@ -89,7 +89,7 @@ export function PresentationFormPanel({
type="info"
showIcon
className="admin-offset-bottom-lg"
message="这个页面还有关联内容"
title="这个页面还有关联内容"
description={
<Space wrap>
{relevantPageLinks.map((item) => (
@@ -124,7 +124,7 @@ export function TemplatePreview({
<Alert
type="warning"
showIcon
message="页面预览暂不可用"
title="页面预览暂不可用"
description="请确认模板预览资源已构建并发布,或本地预览服务正在运行。"
/>
);
@@ -150,7 +150,7 @@ export function TemplatePreview({
</div>
) : null}
{error ? (
<Alert type="error" showIcon message="页面预览加载失败" description={error} />
<Alert type="error" showIcon title="页面预览加载失败" description={error} />
) : null}
<iframe
key={url}