feat: 完成模板管理阶段4闭环
This commit is contained in:
1 parent
b1e8012ded
commit
d1958a7d7f
26 files changed
+1179
-310
No files matched your search
@@ -333,7 +333,7 @@ export function PublicationPage({ canManageTemplate }: { canManageTemplate: bool
|
||||
<Button
|
||||
disabled={!canManageTemplate || !sample.data || sample.data.alreadyImported}
|
||||
loading={importSample.isPending}
|
||||
onClick={() => importSample.mutate()}
|
||||
onClick={() => importSample.mutate(sample.data?.source.templatePackageVersionId)}
|
||||
>
|
||||
导入示例内容
|
||||
</Button>
|
||||
@@ -346,7 +346,11 @@ export function PublicationPage({ canManageTemplate }: { canManageTemplate: bool
|
||||
)}
|
||||
{sample.data && !sample.data.alreadyImported && (
|
||||
<p className="admin-section-description admin-offset-top-sm">
|
||||
将向草稿添加{" "}
|
||||
来源:{sample.data.source.packageKey}@{sample.data.source.version}
|
||||
{sample.data.source.contentChecksum
|
||||
? `(checksum ${sample.data.source.contentChecksum.slice(0, 12)})`
|
||||
: "(兼容 registry 来源)"}
|
||||
。将向草稿添加{" "}
|
||||
{Object.entries(sample.data.counts)
|
||||
.map(([key, count]) => `${key} ${count} 项`)
|
||||
.join("、")}
|
||||
@@ -582,7 +586,7 @@ export function PublicationPage({ canManageTemplate }: { canManageTemplate: bool
|
||||
title="确认安装行业模板"
|
||||
open={industryTarget !== null}
|
||||
onCancel={() => setIndustryTarget(null)}
|
||||
onOk={() => industryTarget && install.mutate(industryTarget)}
|
||||
onOk={() => industryTarget && install.mutate({ key: industryTarget })}
|
||||
confirmLoading={install.isPending}
|
||||
>
|
||||
模板会更新当前品牌的草稿结构,不会立即改变已发布的小程序。请安装后核对业务内容与视觉模板。
|
||||
|
||||
Reference in new issue
Block a user