chenkby / yii2-swiper
为 Yii 框架的 swiper 组件
v1.0
2016-03-25 12:47 UTC
Requires
- bower-asset/swiper: >=3.3.1
- fxp/composer-asset-plugin: >=1.0.0
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-09-15 00:37:43 UTC
README
为 Yii 框架提供的 swiper 滑块组件。
更多信息请见此处:http://idangero.us/swiper
安装
推荐通过 composer 安装此扩展。
运行以下命令:
$ php composer.phar require chenkby/yii2-swiper:dev-master
或添加以下内容到您的 composer.json
文件的 require
部分:
"chenkby/yii2-swiper": "dev-master"
用法
echo \chenkby\swiper\Swiper::widget([ 'items'=>[ Html::img('http://p2.wmpic.me/article/2016/03/07/1457340934_IhOzsopM.jpg'), Html::img('http://p3.wmpic.me/article/2016/03/07/1457340935_xESOHFOa.jpg'), Html::img('http://p3.wmpic.me/article/2016/03/07/1457340935_VoZtYoSk.jpg') ], 'clientOptions'=>[ 'loop'=>true, ] ]);