我有一张使用车把模板的桌子。在表的第一行中声明了#each,在下一行中声明了标记,在最后一行中完成了#each 结束声明。
| Name | Price | Quantity | Total |
|---|---|---|---|
| {{#each itemList}} | |||
| {{name}} | {{price}} | {{qty}} | {{total}} |
| {{/each}} | |||
执行编译后的模板后,生成的输出如下所示。在定义每个行的表中,第一行和最后一行不会被删除。有什么办法可以去掉吗?
| a | c | v | d |
|---|---|---|---|
| 12 | 3 | 2 | 2 |
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号