limefamily/yii2-limetheme
Composer 安装命令:
composer require limefamily/yii2-limetheme
包简介
This is a partial the theme files and some functional components of quietly elegant, if you want to modify, please modify the source code provided in the package to the editor
关键字:
README 文档
README
Custom theme components and parts of function group
这是一套基于bootstrap框架编写的后台模板主题,和PHP小部件
use yii\web\AssetBundle; class LimeFamilyAsset extends AssetBundle { public $sourcePath = '@vendor/limefamily/static-theme/dist'; public $css = [ 'css/limefamily.min.css', 'css/limefamily-skins.min.css', ]; public $js = [ 'js/limefamily.min.js' ]; public $depends = [ 'yii\web\JqueryAsset', 'yii\bootstrap\BootstrapAsset', 'yii\bootstrap\BootstrapPluginAsset', ]; }
左侧 sidebarMenu 组件示例:
左侧 SidebarMenu 组件调用和数据事例
/** * $pparam 'itmes'. 数组内字段包括(详情去查看组件源码): * * - label: string, required, the nav item label. * - url: optional, the item's URL. Defaults to "#". * - left-icon: 可以根据 "Font Awesome"或"bootstrap ui自带的" 图标来填充 默认的是:"fa-pie-chart". * - visible: boolean, optional, whether this menu item is visible. Defaults to true. * - linkOptions: array, optional, the HTML attributes of the item's link. * - options: array, optional, the HTML attributes of the item container (LI). * - small-icon:当没有字列表时可设置对应的标志 类型 "array" * - active: boolean, optional, whether the item should be on active state or not. * - treeviewMenuOptions: array, optional, the HTML options that will passed to the [[Dropdown]] widget. * - items: array|string, optional, the configuration array for creating a [[Dropdown]] widget, * or a string representing the dropdown menu. Note that Bootstrap does not support sub-dropdown menus. */ $menuItems = array(); if (Yii::$app->user->isGuest) { $menuItems[] = ['label' => '登录', 'url' => ['/site/login']]; } else { $menuItems = Yii::$app->user->identity->getAssignedMenu(); $products = Yii::$app->user->identity->getAssignedProducts(); $menuItems[] = ['label' => Yii::$app->user->identity->true_name, 'left-icon' => 'fa-cog', 'items' =>[ ['label' => '修改密码', 'url' => ['/site/reset-password']], ['label' => '退出 (' . Yii::$app->user->identity->login_code . ')', 'url' => ['/site/logout']], ] ]; } echo limefamily\limetheme\widgets\SidebarMenu::widget([ 'items' => $menuItems ])
单一条件搜索框示例:
多配合ActiveForm小部件应用,使用示例:
use ActiveForm; $form = ActiveForm::begin(['id' => 'search','method'=>'get','action'=>'index.php?r=***']); echo limefamily\limetheme\widgets\SearchComponent::widget([ 'placeholder'=>'客户姓名/合同编号', 'searchName'=>'param', 'inputOptions'=>['value'=>isset($searchParams['param']) ? $searchParams['param'] : ''], ]); ActiveForm::end();
在GridView 中使用分页组件:
GridView::widget([ 'dataProvider' => $dataProvider, 'pager'=>[ 'class'=>'limefamily\limetheme\widgets\LinkPager', ], ... ]) 或直接用:(使用默认配置) limefamily\limetheme\widgets\GridView::widget([ 'dataProvider' => $dataProvider, ... ])
limefamily/yii2-limetheme 适用场景与选型建议
limefamily/yii2-limetheme 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 77 次下载、GitHub Stars 达 2, 最近一次更新时间为 2018 年 01 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「theme」 「bootstrap」 「yii2」 「lime」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 limefamily/yii2-limetheme 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 limefamily/yii2-limetheme 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 limefamily/yii2-limetheme 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A custom URL rule class for Yii 2 which allows to create translated URL rules
Views for the package MedicOneSystems Livewire Datatables with Bootstrap 4
A Bootstrap 4.x base theme for SilverStripe
Lucency Theme
bootstrap select field module implementing http://silviomoreto.github.io/bootstrap-select/
SCEditor, a lightweight WYSIWYG BBCode & HTML editor extension for Yii 2.0 Framework
统计信息
- 总下载量: 77
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-01-22
