我有一个看起来像的大豆模板
{template .fullView}
{@param people: list<[age:int, name:string]>}
{call .headers}
{param people: $queries /}
{/call}
{call .content}
{param people: $queries /}
{/call}
{/template}
{template .headers}
{@param people: list<[age:int, name:string]>}
# headers
{/template}
{template .content}
{@param queries: list<[age:int, name:string]>}
# content
{/template}
由于“人”的记录定义变得比年龄和姓名更复杂,因此更新所有三个地方的参数定义变得乏味。是否可以创建一个别名或可以在每个模板中重用的东西?
{alias [age:int, name:string] as Person}
{template .headers}
{@param people: list<Person>}
# headers
{/template}