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

在配置文件中配置了

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

        ],

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

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

天蓬老师
天蓬老师

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

Antworte allen(1)
Ty80

app/assets/AppAsset.php

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

注释下试试亲。

Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!