themeleaf中的th:switch条件判断语句用法示例

class="col-sm-9">
th:switch="${channel.enable}">

th:case="'1'"> id="enable" name="enable" type="radio" class="ace" value="1" checked="checked" /> class="lbl">启用 id="enable1" name="enable" type="radio" class="ace" value="0" /> class="lbl">停用

th:case="'0'"> id="enable2" name="enable" type="radio" class="ace" value="1" /> class="lbl">启用 id="enable3" name="enable" type="radio" class="ace" value="0" checked="checked" /> class="lbl">停用

你可能感兴趣的:(themeleaf)