第一种 颜色不变 无法选择
style=“pointer-events: none;”
1. <select name="yijiShenhe" class="form-control m-b" style="pointer-events: none;">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{yijiShenhe}"></option>
</select>
第二种 下拉框 变成灰色
disabled="disabled"
2.
<select name="yijiShenhe" class="form-control m-b" disabled="disabled">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"> </option>
</select>
同理
在input输入框时也是可以生效
<input name="erjiShenhesj" th:value="${#dates.format(jxNmyyc.erjiShenhesj, 'yyyy-MM-dd')}"
class="form-control"
placeholder="yyyy-MM-dd" type="text" disabled="disabled">