luc1/yii2-tourist

Yii 2 的 Tourist 扩展

安装次数: 3,293

依赖关系: 0

建议者: 0

安全性: 0

星级: 1

关注者: 1

分支: 0

开放性问题: 0

类型:yii2-extension

dev-master 2019-10-31 20:51 UTC

This package is auto-updated.

Last update: 2024-09-29 04:49:04 UTC


README

用于 Tourist 组件的 Yii2 扩展:[GitHub 仓库链接](https://github.com/IGreatlyDislikeJavascript/bootstrap-tourist)

Tourist 组件是 Bootstrap Tour 的分支:[GitHub 仓库链接](https://github.com/sorich87/bootstrap-tour)

此扩展重用了 yii2-bootstrap-tour 扩展的代码:[GitHub 仓库链接](https://github.com/MyCademy/yii2-bootstrap-tour)

安装

安装此扩展的首选方式是通过 composer

运行以下命令:

php composer.phar require --prefer-dist luc1/yii2-tourist "*"

"luc1/yii2-tourist": "*"

将以下内容添加到您的 composer.json 文件的 require 部分:

注册资源

class AppAsset extends yii\web\AssetBundle
{
    public $depends = [
        // other dependencies
        'luc\tourist\TouristAsset'        
    ];
}

用法

安装扩展后,只需在您的代码中通过以下方式使用它:

use luc\tourist\Tourist;

<?= Tourist::widget::widget(
    'clientOptions' => [ //Bootstrap Tour Options, see: http://bootstraptour.com/api/
        'steps' => [
            [
                'element' => "#element1",
                'title' => "Step 1",
                'content' => "Content of my step 1",
            ],
            [
                'element' => "#element2",
                'title' => "Step 2",
                'content' => "Content of my step 2",
            ],
        ],
    ]); 
?>