🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
## 表单样式 [TOC] ## 文件表单 个性定制请参考依赖的组件: [http://markusslima.github.io/bootstrap-filestyle/](http://markusslima.github.io/bootstrap-filestyle/) ![](https://box.kancloud.cn/999a1cd1128ee5e3ea239405487d487a_774x102.png) ``` <input type="file" class="filestyle" data-text="上传图片" data-placeholder="请选择上传文件" data-btnClass="btn-primary"> <script> require(['hdjs','bootstrap], function (hdjs) { hdjs.bootstrapfilestyle(':file'); }) </script> ``` ## 列表框 本组件用于实现列表框选择样式。 个性定制请参考依赖的组件: [http://select2.github.io/examples.html](http://select2.github.io/examples.html) ![](https://box.kancloud.cn/c274f51a4b469b133a856cc97f1a4659_988x146.png) ``` <div> <select class="js-example-basic-single form-control" multiple="multiple"> <option value="hdr">后盾人</option> <option value="hdphp">HDPHP</option> <option value="hdy">后盾云</option> </select> </div> <script> require(['hdjs','bootstrap'], function (hdjs) { hdjs.select2('.js-example-basic-single'); }) </script> ``` ## 复选框 参考文档: [http://bootstrapswitch.com/](http://bootstrapswitch.com/) ![](https://box.kancloud.cn/db58e26f15e8532260fa2f1a088162df_266x140.png) ``` <input type="checkbox" name="status" class="bootstrap-switch"> <script> require(['hdjs','bootstrap'],function(hdjs){ hdjs.bootstrapswitch('.bootstrap-switch'); }) </script> ```