本文实例为大家分享了Yii2选项卡使用的具体代码,供大家参考,具体内容如下
PHP;">
'tabs','renderTabContent' => false,//如果是每个选项卡里要显示的是自定义的DIV或者Render其他页面文件,就设为false.
'linkOptions' => ['data-toggle' => "tab"],'items' => [
[
'label' => Yii::t('app','帐号设置'),'content' => '','headerOptions' => ["id" => 'li_account'],//可设可不设
'url' => '#tab_account','active' => true,],[
'label' => Yii::t('app','修改密码'),'headerOptions' => ["id" => 'li_password'],'url' => '#tab_password','active' => false,'绑定邮箱'),'headerOptions' => ["id" => 'li_email'],'url' => '#tab_email',]
]
]) ?>
<div class="tab-content">
<div class="tab-pane active"id="tab_account">
内容....
<div class="tab-pane"id="tab_password">
内容....