Dustjs OR帮手

时间:2016-12-15 09:29:18

标签: dust.js dust-helpers dustc

如何用尘埃助手写下面的陈述?

{@eq key="device" value="windows || Linux"}
     Your system is Windows or Linux based.
{:else}
     Your system is MAC based.
{/eq}

1 个答案:

答案 0 :(得分:1)

您可以将@any帮助程序与Select Helper一起使用来实现此目的:

{@select key=device}
  {@eq value="windows"/}
  {@eq value="Linux"/}
  {@any}Your system is Windows or Linux based.{/any}
  {@none}Your system is MAC based.{/none}
{/select}