php - yii 为何无法禁用加载bootstrap.js这个文件?
天蓬老师
天蓬老师 2017-04-10 16:52:31
0
1
474

在配置文件中配置了

'assetManager' => [
            'bundles' => [
                'yii\bootstrap\BootstrapAsset'=>false
            ]

        ],

结果依然会加载bootstrap.js这个文件(bootstrap.css这个文件并没有加载),不知道是怎么回事?

更新:bootstrap.js在yii\bootstrap\BootstrapPluginAsset这个资源包中,因此该禁用yii\bootstrap\BootstrapPluginAsset。

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(1)
Ty80

app/assets/AppAsset.php

    public $depends = [
        'yii\web\YiiAsset',
        'yii\bootstrap\BootstrapAsset',
    ];

注释下试试亲。

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!