gpt4 book ai didi

html - Pug 中的多行变量(前 Jade)

转载 作者:搜寻专家 更新时间:2023-10-31 08:05:48 27 4
gpt4 key购买 nike

可以用吗?例如这里:

- var movieList = [{title: "Ocean's Eleven", rating: 9.2}, {title: "Pirates of the Caribbean", rating: 9.7}];

mixin movie-card(movie)
h2.movie-title= movie.title
div.rating
p= movie.rating

for movie in movieList
+movie-card(movie)

我不想在每一行的开头使用 -。如果不可能,也许有一些方法可以导入多行 JSON 文件?

最佳答案

从版本 2.0.3 开始可以使用这种语法:

-
var arr = ["Very", "Long",
"Array"];

拉取请求链接:https://github.com/pugjs/pug/pull/1965

关于html - Pug 中的多行变量(前 Jade),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36706345/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com