【Layui】switch开关

版权声明:咔咔 来自https://blog.csdn.net/fangkang7 https://blog.csdn.net/fangkang7/article/details/85330697

author:咔咔

wechat:fangkangfk

html:

<input data-href="{:url('bootUpStatus')}?bu_id={$v['bu_id']}" type="checkbox" name="status" {if condition="$v['bu_status'] eq 0"} checked {/if} value="{$v['bu_status']}" lay-skin="switch" lay-filter="switchStatus" lay-text="开启|关闭"  ></td>

这个控件的checked 默认是text那个在前面就是那个

他会将val值传给后台,所以我们只需要传递一个id即可

后台处理需要切记的是需要做val的值

猜你喜欢

转载自blog.csdn.net/fangkang7/article/details/85330697