地址:http://freemarker.foofun.cn/index.html
其中有一个翻译语法错误,错误地方定位:http://freemarker.foofun.cn/dgui_template_exp.html#dgui_template_exp_var_hash
错误详情:
在下面一段从哈希表中检索数据的描述中:
{ 如果我们想指定同一个表达式的子变量,那么还有另外一种语法格式: book["title"]
。在方括号中可以给出任意长度字符串的表达式。 在上面这个数据模型示例中还可以这么来获取title: book[test]
。 下面这些示例它们含义都是相等的: book.author.name, book["author"].name, book.author.["name"], book["author"]["name"]
。}
对于{ book.author.["name"]
} 的写法错误,应为{ book.author["name"]
}。
比较官方的FreeMarker 中文参考手册
最新推荐文章于 2023-12-21 14:49:10 发布