定制 kak/navmenu 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kak/navmenu

最新稳定版本:0.0.2

Composer 安装命令:

composer require kak/navmenu

包简介

Yii2 navmenu widgets

README 文档

README

Sidebar, TopMenu, Tabs, widgets for Yii2

Preview

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist kak/navmenu "*"

or add

"kak/navmenu": "*"

to the require section of your composer.json file.

Usage Sidebar

Once the extension is installed, simply use it in your code by :

use kak\widgets\navmenu\Sidebar;
use yii\web\View;
use yii\web\Controller;
/**
 * @var $this View 
 * @var $context Controller 
*/
$context =  $this->context;
?>
<body>
<div class="wrap">
    <!-- $this->render('_top-menu') -->
    <!-- $this->render('_alerts') -->
    <!-- $this->render('_breadcrumbs') -->

    <?= Sidebar::widget([
            'theme' => Sidebar::THEME_BLACK,
            'items' => [[
                   'active' =>  $context->id === 'rbac' && $context->action->id === 'index',
                   'label' => 'RBAC', 
                   'url' => ['/rbac'],
                   'icon' => 'fa fa-shield'
                ],[
                   'items' => [/* ... */] 
                ]]
        ]);?>
    <div class="content wrap-sidebar-page-content"> <!-- <-- add class "wrap-sidebar-page-content" -->
        <div class="container-fluid">
             <?= $content ?>
        </div>
        or 
        <div class="container">
            <?= $content ?>
        </div>
    </div> 

    <!-- $this->render('_footer') -->
</div>   

Usage Tabs (responsive bootstrap tabs)

use kak\widgets\navmenu\Tabs;

echo Tabs::widget([
    'options' => ['class' => 'nav nav-tabs '],
    'items' => [
        ['label' => 'Stat for Month', 'url' => ['month'], 'active' => true],
        // ...
    ]
]);

统计信息

  • 总下载量: 388
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: SCSS

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-09-29