dareks84 / yii2-swiper
Swiper 滑块扩展
v1.0.1
2023-04-24 14:00 UTC
Requires
- php: >=7.4.0
- bower-asset/swiper: >=v3.0.4
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-09-24 19:05:21 UTC
README
Yii2 的 Swiper 滑块小部件。更多内容请见:https://github.com/nolimits4web/Swiper/。
示例可以在 demos 文件夹中找到。
您还可以阅读 文档。
安装
您可以通过 Composer 获取此扩展。
在终端中运行
$ php composer.phar require "dareks84/yii2-swiper" "*"
或者添加
"dareks84/yii2-swiper" : "*"
到您的应用程序的 composer.json
文件的 require 部分。
###使用方法
<?php /** * @var \yii\web\View $this */ use dareks84\yii2\swiper\Swiper; echo Swiper::widget( [ 'items' => [ [ 'background' => 'http://lorempixel.com/600/600/nature/1' ], [ 'background' => 'http://lorempixel.com/600/600/nature/2' ], [ 'background' => 'http://lorempixel.com/600/600/nature/3' ], [ 'background' => 'http://lorempixel.com/600/600/nature/4' ], [ 'background' => 'http://lorempixel.com/600/600/nature/5' ] ], 'behaviours' => [ 'pagination' ], 'pluginOptions' => [ 'grabCursor' => true, 'centeredSlides' => true, 'slidesPerView' => 'auto', 'effect' => 'coverflow', 'coverflow' => [ 'rotate' => 50, 'stretch' => 0, 'depth' => 100, 'modifier' => 1, 'slideShadows' => true ] ] ] );
问题
如果出现任何问题,您可以创建 问题。
感谢您的关注。