html部分,注意一定要放到layui-form中,不然无法正确渲染
<div class="layui-form ba-search-box" id="IndicatorType">
<input type="radio" name="IndicatorType" value="0" title="按月(M)" lay-filter="IndicatorType" checked>
<input type="radio" name="IndicatorType" value="1" title="按日(D)" lay-filter="IndicatorType">
</div>
上面默认会选中按月选项。
现在有这样一个需求,当我右侧表格数据有更改时,点击切换类型,通过询问是否要切换。可以点击确认切换,也可以取消。
确认直接执行接下来的操作就好了,取消则需要将类型还原,不然后续就乱了(涉及到时间控件laydate的传参与渲染&#x