定制 raoul2000/yii2-sidr-widget 二次开发

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

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

raoul2000/yii2-sidr-widget

最新稳定版本:1.0.0

Composer 安装命令:

composer require raoul2000/yii2-sidr-widget

包简介

The Sidr widget is a wrapper for the Sidr jQuery plugin, for creating side menus.

README 文档

README

The Sidr widget is a wrapper around the Sidr jQuery plugin, for creating side menus and "the easiest way for doing your menu responsive".

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist raoul2000/yii2-sidr-widget "*"

or add

"raoul2000/yii2-sidr-widget": "*"

to the require section of your composer.json file.

Usage

Using Sidr widget is easy. For example :

<?php
use raoul2000\widget\sidr\SidrAsset;
use raoul2000\widget\sidr\Sidr;

// The Sidr plugin comes with 2 built-in theme : 'dark' and 'light'
// In this example we will use the light theme

SidrAsset::$theme = SidrAsset::THEME_LIGHT;
?>

<!-- This button will open/close the side menu -->
<button id="open-menu">open/close Menu</button>

<!-- This is the menu header and content -->
<header id="demoheader">
	<h1>Demos &amp; Usage</h1>
</header>

<div id="demo-content">
	<p>
		Lorem ipsum dolor sit amet, consectetur adipisicing elit.
		 Quasi nihil ab possimus temporibus 
		illum ullam molestiae aliquam maiores .
	</p>
</div>

<!-- include the Sidr Widget -->
<?= Sidr::widget([
	'selector' => '#open-menu',
	'pluginOptions' => [
		'name' =>  'sidr-menu',
		'source' => '#demoheader, #demo-content',
		'onClose' => new yii\web\JsExpression('
			function() {
				alert("bye bye side menu !");
			}
		')
	]
]); ?>

For more information on the plugin options, please refer to Sidr github page.

Alternative

License

yii2-sidr-widget is released under the BSD 3-Clause License. See the bundled LICENSE.md for details.

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-03-05