refactor: 模板注册与默认模板收敛到目录驱动
This commit is contained in:
1 parent
f87b26b201
commit
89fdfd7d83
25 files changed
+122
-96
No files matched your search
@@ -135,5 +135,9 @@ export function isBrandTemplateKey(value: string): value is BrandTemplateKey {
|
||||
}
|
||||
|
||||
export function getBrandTemplate(key: string): BrandTemplateDefinition | undefined {
|
||||
return isBrandTemplateKey(key) ? brandTemplates[key] : undefined;
|
||||
return isBrandTemplateKey(key) ? brandTemplates[key as keyof typeof brandTemplates] : undefined;
|
||||
}
|
||||
|
||||
export const defaultBrandTemplateKey = "personal" satisfies BrandTemplateKey;
|
||||
|
||||
export const brandTemplateKeys = Object.keys(brandTemplates);
|
||||
Reference in new issue
Block a user