如何在Stencil车把中定义回调

时间:2019-05-30 20:40:01

标签: bigcommerce

Some是一个块帮助程序,如果回调针对给定数组中的某些值返回true,则该块帮助程序将返回该块。

{{#some array isString}}
  Render me if the array has a string.
{{else}}
  Render me if it doesn't.
{{/some}}
//=> 'Render me if the array has a string.'

如何在模具主题中定义回调

1 个答案:

答案 0 :(得分:1)

在Stencil主题中,回调函数将需要是Stencil中存在的帮助程序,而不是您定义的函数。我们将更新文档以注意回调必须是预先存在的帮助程序。