yii2 常用组件 -- tab切换

来源:互联网 发布:oracle数据库cpu过高 编辑:程序博客网 时间:2024/06/04 17:52

简介

如何用yii2-bootstrap自带的组件tabs实现tab切换的功能,今天就用一个简单的实例以及效果演示来告诉大家如果应用tabs这个组件

实例

echo Tabs::widget([  'items' => [      [          'label' => 'One',          'content' => 'Anim pariatur cliche...',          'active' => true      ],      [          'label' => 'Two',          'content' => 'Anim pariatur cliche...',          'headerOptions' => [...],          'options' => ['id' => 'myveryownID'],      ],      [          'label' => 'Example',          'url' => 'http://www.example.com',      ],      [          'label' => 'Dropdown',          'items' => [               [                   'label' => 'DropdownA',                   'content' => 'DropdownA, Anim pariatur cliche...',               ],               [                   'label' => 'DropdownB',                   'content' => 'DropdownB, Anim pariatur cliche...',               ],          ],      ],  ],]);

效果图

112233.png

原创粉丝点击