定制 johnsnook/yii2-stacked 二次开发

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

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

johnsnook/yii2-stacked

Composer 安装命令:

composer require johnsnook/yii2-stacked

包简介

A tabbed initerface alternative using a jquery plugin I also wrote

README 文档

README

Latest Stable Versionimg img img img

I was testing some software the other day, and was having trouble remembering where I'd put a particular feature when I realized it had been under my nose the whole time, in a tab pane. So I started thinking about a new way to put content out of the way without putting it out of sight, and this is what I came up with.

Requirements

  • PHP >= v5.4
  • Yii2 v2.14
  • jQuery v3.x
  • Bootstrap 3

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist johnsnook/yii2-stacked "*"

or add

"johnsnook/yii2-stacked": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, you can start using it in views immediately:

<?php
	use johnsnook\stacked\StackedWidget;
	use johnsnook\stacked\PanelWidget;
?>
....

The PanelWidget is completely optional since the jQuery plugin will assume all top level children of the selected container are to be displayed, but PanelWidget makes panels quickly. Then main thing is that the nesting is kept clean and everything is between the StackedWidget::begin() and StackedWidget::end()

...
<?php
    StackedWidget::begin([
        'gutterSize' => 35,
        'containerOptions' => ['style' => 'margin-top:40px; margin-bottom:40px;'],
    ]);
    /** the panel widget makes nice and easy bootstrap 3 panels */
    PanelWidget::begin([
        'containerOptions' => ['class' => 'panel-success'],
        'title' => "Panel #1"
    ]);
?>
<p>The two British divers who found 12 missing boys and their football coach alive in a flooded cave in Thailand boast extensive experience. Rick Stanton and John Volanthen, who reached the group nine days after they vanished, are so well known among cave rescuers that they had reportedly been requested specially. Yet their work is entirely voluntary; one is a firefighter, the other a computer engineer. And far from glorying in their role, Mr Volanthen had brushed off reporters as he entered the cave, saying only: “We’ve got a job to do.”</p>
<?php
    PanelWidget::end();

    PanelWidget::begin([
        'containerOptions' => ['class' => 'panel-primary'],
        'title' => "Panel #2"
    ]);
?>
<p>An intensifying debate over Judge Brett M. Kavanaugh, a front-runner in President Trump’s search for a Supreme Court nominee, gripped Republicans on Tuesday, with conservative critics highlighting past rulings and his links to GOP leaders while his allies — including inside the White House — forcefully defended him.</p>
<?php
	PanelWidget::end();
	/** all panels should be closed with ::end() before closing the StackedWidget. */
    StackedWidget::end();
?>

Screenshot

stacked bs 3

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-07-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固