ration_enum={' ':' ','定性':'定性','定量':'定量'}
for val, key in ration_enum
if modi_type=='edit'&&key==common_index.ration
option(value='#{key}', selected) #{val}
else
option(value='#{key}') #{val}
预期“缩进”,但得到“换行”
最佳答案
猜测这是一个Jade template ...
Jade 遵循 Python 规则,其中空格很重要,因此您必须正确缩进代码:
ration_enum={' ':' ','定性':'定性','定量':'定量'}
for val, key in ration_enum
if medi_type == 'edit' && key == common_index.ration
option(value='#{key}', selected) #{val}
else
option(value='#{key}') #{val}
Jade 具有灵活的缩进,您可以选择是否使用制表符或空格,以及多少个空格。但是,您必须在整个模板中保持一致的选择。
关于javascript - 500 错误 :expected "indent", 但得到 "newline",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17823858/