Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
最近在用stringtemplate,发现StringTemplate不支持复杂的条件,类似的value>1或者value="menu"等,谁能给我指点一下怎么用?谢谢。
StringTemplate 故意不支持复杂的条件。这种想法是,如果你需要那么多逻辑,你就打破了它对模型-视图分离的严格执行。相反,请使用表示您尝试表示的复杂条件的模板变量,然后将其传入,或者使用计算正确结果的方法。