基于Bootstrap的标签页组件及bootstrap-tab使用说明

前端之家收集整理的这篇文章主要介绍了基于Bootstrap的标签页组件及bootstrap-tab使用说明前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

bootstrap-tab

bootstrap-tab

bootstrap-tab组件是对原生的bootstrap-tab组件的封装,方便开发者更方便地使用,主要包含以下功能

tab页初始化 关闭tab页 新增tab 显示tab页 获取tab页ID

使用

Step1 :引入样式

Step2:引入脚本

Step3:使用

参数和方法说明

参数说明

Box-sizing: border-Box; font-size: 15px; max-width: 100%; border-top: rgb(238,238,238) 1px solid; font-family: "microsoft yahei"; border-right: rgb(238,238) 1px solid; width: 1000px; vertical-align: baseline; background: none transparent scroll repeat 0% 0%; word-spacing: 0px; border-collapse: collapse; border-bottom: rgb(238,238) 1px solid; text-transform: none; outline-width: 0px; padding-bottom: 0px; padding-top: 0px; outline-style: none; padding-left: 0px; margin: 0px; border-spacing: 0px; border-left: rgb(238,238) 1px solid; orphans: 2; widows: 2; letter-spacing: normal; outline-color: invert; padding-right: 0px; text-indent: 0px; -webkit-text-stroke-width: 0px"> Box-sizing: border-Box; font-size: 15px; border-top: 0px; border-right: 0px; vertical-align: baseline; background: none transparent scroll repeat 0% 0%; border-bottom: 0px; outline-width: 0px; padding-bottom: 0px; padding-top: 0px; outline-style: none; padding-left: 0px; margin: 0px; border-left: 0px; outline-color: invert; padding-right: 0px"> Box-sizing: border-Box; font-size: 15px; border-top: 0px; border-right: 0px; vertical-align: baseline; background: none transparent scroll repeat 0% 0%; border-bottom: 0px; outline-width: 0px; padding-bottom: 0px; padding-top: 0px; outline-style: none; padding-left: 0px; margin: 0px; border-left: 0px; outline-color: invert; padding-right: 0px"> Box-sizing: border-Box; font-size: 15px; border-top: 0px; border-right: 0px; vertical-align: baseline; background: none transparent scroll repeat 0% 0%; border-bottom: 0px; outline-width: 0px; padding-bottom: 0px; padding-top: 0px; outline-style: none; padding-left: 0px; margin: 0px; border-left: 0px; outline-color: invert; padding-right: 0px"> Box-sizing: border-Box; font-size: 15px; border-top: 0px; border-right: 0px; vertical-align: baseline; background: none transparent scroll repeat 0% 0%; border-bottom: 0px; outline-width: 0px; padding-bottom: 0px; padding-top: 0px; outline-style: none; padding-left: 0px; margin: 0px; border-left: 0px; outline-color: invert; padding-right: 0px">
Box-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; border-right: rgb(238,238) 1px solid; vertical-align: top; background: none transparent scroll repeat 0% 0%; border-bottom: rgb(238,238) 1px solid; outline-width: 0px; padding-bottom: 8px; text-align: left; padding-top: 8px; outline-style: none; padding-left: 8px; margin: 0px; border-left: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">参数名称 Box-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">默认值 Box-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">可选值 Box-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">说明
Box-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-width: 0px; padding-bottom: 8px; padding-top: 8px; outline-style: none; padding-left: 8px; margin: 0px; border-left: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">dataBox-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">Box-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">tab页数据来源(对象列表),包含id,text,url,closeable属性Box-sizing: border-Box; font-size: 15px; border-top: 0px; border-right: 0px; vertical-align: baseline; background: none transparent scroll repeat 0% 0%; border-bottom: 0px; outline-width: 0px; padding-bottom: 0px; padding-top: 0px; outline-style: none; padding-left: 0px; margin: 0px; border-left: 0px; outline-color: invert; padding-right: 0px"> Box-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">idBox-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">必须,单个tab的idBox-sizing: border-Box; font-size: 15px; border-top: 0px; border-right: 0px; vertical-align: baseline; background: none transparent scroll repeat 0% 0%; border-bottom: 0px; outline-width: 0px; padding-bottom: 0px; padding-top: 0px; outline-style: none; padding-left: 0px; margin: 0px; border-left: 0px; outline-color: invert; padding-right: 0px"> Box-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">textBox-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">必须,单个tab页的标题Box-sizing: border-Box; font-size: 15px; border-top: 0px; border-right: 0px; vertical-align: baseline; background: none transparent scroll repeat 0% 0%; border-bottom: 0px; outline-width: 0px; padding-bottom: 0px; padding-top: 0px; outline-style: none; padding-left: 0px; margin: 0px; border-left: 0px; outline-color: invert; padding-right: 0px"> Box-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">urlBox-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">必须,单个tab页的内容urlBox-sizing: border-Box; font-size: 15px; border-top: 0px; border-right: 0px; vertical-align: baseline; background: none transparent scroll repeat 0% 0%; border-bottom: 0px; outline-width: 0px; padding-bottom: 0px; padding-top: 0px; outline-style: none; padding-left: 0px; margin: 0px; border-left: 0px; outline-color: invert; padding-right: 0px"> Box-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">closeableBox-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">falseBox-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">true,falseBox-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">单个tab页是否可关闭Box-sizing: border-Box; font-size: 15px; border-top: 0px; border-right: 0px; vertical-align: baseline; background: none transparent scroll repeat 0% 0%; border-bottom: 0px; outline-width: 0px; padding-bottom: 0px; padding-top: 0px; outline-style: none; padding-left: 0px; margin: 0px; border-left: 0px; outline-color: invert; padding-right: 0px"> Box-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">showIndexBox-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">0Box-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">默认显示页的索引Box-sizing: border-Box; font-size: 15px; border-top: 0px; border-right: 0px; vertical-align: baseline; background: none transparent scroll repeat 0% 0%; border-bottom: 0px; outline-width: 0px; padding-bottom: 0px; padding-top: 0px; outline-style: none; padding-left: 0px; margin: 0px; border-left: 0px; outline-color: invert; padding-right: 0px"> Box-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">loadAllBox-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">trueBox-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">true=一次全部加在页面,false=只加在showIndex指定的页面,其他点击时加载,提高响应速度

方法说明

Box-sizing: border-Box; font-size: 15px; max-width: 100%; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">方法名称Box-sizing: border-Box; font-size: 15px; border-top: 0px; border-right: 0px; vertical-align: baseline; background: none transparent scroll repeat 0% 0%; border-bottom: 0px; outline-width: 0px; padding-bottom: 0px; padding-top: 0px; outline-style: none; padding-left: 0px; margin: 0px; border-left: 0px; outline-color: invert; padding-right: 0px"> Box-sizing: border-Box; font-size: 15px; border-top: 0px; border-right: 0px; vertical-align: baseline; background: none transparent scroll repeat 0% 0%; border-bottom: 0px; outline-width: 0px; padding-bottom: 0px; padding-top: 0px; outline-style: none; padding-left: 0px; margin: 0px; border-left: 0px; outline-color: invert; padding-right: 0px">
Box-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">参数 Box-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">参数说明 Box-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">方法说明
Box-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">initBox-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">tab组件初始化入口方法Box-sizing: border-Box; font-size: 15px; border-top: 0px; border-right: 0px; vertical-align: baseline; background: none transparent scroll repeat 0% 0%; border-bottom: 0px; outline-width: 0px; padding-bottom: 0px; padding-top: 0px; outline-style: none; padding-left: 0px; margin: 0px; border-left: 0px; outline-color: invert; padding-right: 0px"> Box-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">builderBox-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">tab数据Box-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">构建tab页的主方法Box-sizing: border-Box; font-size: 15px; border-top: 0px; border-right: 0px; vertical-align: baseline; background: none transparent scroll repeat 0% 0%; border-bottom: 0px; outline-width: 0px; padding-bottom: 0px; padding-top: 0px; outline-style: none; padding-left: 0px; margin: 0px; border-left: 0px; outline-color: invert; padding-right: 0px"> Box-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">loadDataBox-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">加载tab页的内容,根据loadAll即时加载或者点击时加载Box-sizing: border-Box; font-size: 15px; border-top: 0px; border-right: 0px; vertical-align: baseline; background: none transparent scroll repeat 0% 0%; border-bottom: 0px; outline-width: 0px; padding-bottom: 0px; padding-top: 0px; outline-style: none; padding-left: 0px; margin: 0px; border-left: 0px; outline-color: invert; padding-right: 0px"> Box-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">addTabBox-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">objBox-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">单个tab的数据Box-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">增加一个tab页Box-sizing: border-Box; font-size: 15px; border-top: 0px; border-right: 0px; vertical-align: baseline; background: none transparent scroll repeat 0% 0%; border-bottom: 0px; outline-width: 0px; padding-bottom: 0px; padding-top: 0px; outline-style: none; padding-left: 0px; margin: 0px; border-left: 0px; outline-color: invert; padding-right: 0px"> Box-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">showTabBox-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">tabIdBox-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">tab的idBox-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">根据id显示tab页Box-sizing: border-Box; font-size: 15px; border-top: 0px; border-right: 0px; vertical-align: baseline; background: none transparent scroll repeat 0% 0%; border-bottom: 0px; outline-width: 0px; padding-bottom: 0px; padding-top: 0px; outline-style: none; padding-left: 0px; margin: 0px; border-left: 0px; outline-color: invert; padding-right: 0px"> Box-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">getCurrentTabIdBox-sizing: border-Box; font-size: 15px; border-top: rgb(238,238) 1px solid; outline-color: invert; line-height: 20px; padding-right: 8px">获取当前活动tab页的ID

相关链接

bootstrap-tab的Github地址:

总结

以上所述是小编给大家介绍的基于Bootstrap的标签页组件及bootstrap-tab使用说明。编程之家 jb51.cc 收集整理的教程希望能对你有所帮助,如果觉得编程之家不错,可分享给好友!感谢支持

原文链接:https://www.f2er.com/bootstrap/37605.html

猜你在找的Bootstrap相关文章