coolsnowwolf / luci

LuCI - OpenWrt Configuration Interface
Apache License 2.0
317 stars 601 forks source link

官方版luci框架支持cbi控件retain属性,大雕是否考虑支持一下? #145

Closed AngusLkc closed 2 years ago

AngusLkc commented 2 years ago

当cbi控件开启了depends依赖检查和rmempty=false属性时,提交表单的时候luci会从uci配置清掉不满足depends的项的值, 那么表单提交完成重载的时候会提示错误:"一个或多个必选项值为空", 有了这个属性可以在提交表单的时候不清掉依赖不满足的配置项,前端也不会提示错误,也能正常隐藏html元素, 据我所知luci官方版所有cbi控件都是支持这个属性的。 参考: https://www.right.com.cn/forum/thread-640942-1-1.html https://openwrt.github.io/luci/jsapi/LuCI.form.Value.html#retain https://github.com/openwrt/luci/pull/4921