简介


yii2 bootstrap扩展组件,下拉按钮(ButtonDropdown),该组件的应用场景并不多,但还是需要了解的,直接看源码吧


实例


<?php
use yii\bootstrap\ButtonDropdown;
 
echo ButtonDropdown::widget([
  'label' => 'Action',
  'dropdown' => [
      'items' => [
          ['label' => 'DropdownA', 'url' => '/'],
          ['label' => 'DropdownB', 'url' => '#'],
      ],
  ],
]);


演示