关于设置表单中select 选项的 disabled 属性问题,建议增加一个API #1904
HuangLei0x2e5
started this conversation in
建议
Replies: 1 comment
-
自行封装一下吧
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
我在表单中要按一定条件来决定某个 select 是否可用,是通过
layui.$("#id").attr("disabled", "disabled");
layui.$("#id").removeAttr("disabled");
来切换,发现无效,后来折腾好久,又想到上次也碰到类似的问题,发现要这样才行:
layui.$("#id").attr("disabled", "disabled");
layui.form.render('select');
layui.$("#id").removeAttr("disabled");
layui.form.render('select');
是不是在表格属性里增加一个API来简化操作:
alyui.form.disabled("my-filter",true)
Beta Was this translation helpful? Give feedback.
All reactions