所属产品: Mingcedar Studio DESIGNER
模板库:可复用组件的统一管理 | Mingcedar Studio
模板库是模板资产的管理入口,用于统一解决模板存放、检索和复用问题。
<section id="template-library" class="docs-block docs-block-intro docs-block-current"> <span class="section-kicker">库</span> <h2>模板库:可复用组件的统一管理</h2> <p>模板库是模板资产的管理入口,用于统一解决模板存放、检索和复用问题。</p> <div class="docs-detail-list"> <article id="template-library-item-1" class="docs-detail-row"> <strong>模板库能做什么</strong> <p>模板库支持搜索模板、按模板组查看模板卡片、保存模板、导入模板、导出模板和删除模板。它是项目中的复用资产库,不是一次性暂存区。</p> <ul> <li>Search:按模板名称或分类搜索定位</li><li>Save:将选中的可复用内容保存到模板库</li><li>Import / Export:便于模板资产迁移和共享</li><li>Delete:清理已经不用的模板</li> </ul> </article><article id="template-library-item-2" class="docs-detail-row"> <strong>保存为模板的时机</strong> <p>当一个结构已经稳定、未来会重复使用,而且复制后需要反复调整字段时,就应保存成模板。仍在频繁变化、字段和结构尚未确定的页面,不建议过早模板化。</p> </article><article id="template-library-item-3" class="docs-detail-row"> <strong>插入模板的推荐顺序</strong> <p>先在模板库中确认目标模板,再双击或拖拽插入,插入后进入 Template Edit 调整实例尺寸和实例配置。模板插入后不建议先大量复制,再逐个补充配置。</p> </article><article id="template-library-item-4" class="docs-detail-row"> <strong>模板库最适合管理什么</strong> <p>最适合放进模板库的通常是设备卡片、状态块、诊断弹窗、操作弹窗、通用按钮组、输入 + 按键组合区和标准表格区。这些内容复用频率高,结构变化也容易影响多个页面。</p> </article><article id="template-library-item-5" class="docs-detail-row"> <strong>模板保存前检查</strong> <p>保存前先确认选中对象只包含需要长期复用的内容。对象命名、默认文本、Tag 片段、模板变量和图层顺序都应保持清晰;仅用于当前页面的说明、占位标记和辅助对象不应进入模板。</p> </article><article id="template-library-item-6" class="docs-detail-row"> <strong>模板命名与分组</strong> <p>模板名建议直接说明用途,例如“设备状态卡片”“参数输入区”“诊断弹窗”。模板组建议按业务或页面模块划分,例如设备、报警、配方、报表。名称越稳定,后续搜索、替换和团队交接越容易。</p> </article> </div> <div class="docs-note-grid"> <figure id="template-library-image-1" class="docs-note-card manual-doc-image-card"> <img src="/WEB_img/HQPPT/TemplateLibraryForm.png" alt="模板库" loading="lazy" decoding="async"> <figcaption> <strong>模板库</strong> <p>模板库适合统一管理已经定型、准备反复使用的页面结构和组件组合。</p> </figcaption> </figure> </div> </section>