yii 为何无法禁用加载bootstrap.js这个文件?

WBOY
Release: 2016-06-06 20:17:09
Original
1413 people have browsed it

在配置文件中配置了

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

        ],</code>
Copy after login
Copy after login

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

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

回复内容:

在配置文件中配置了

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

        ],</code>
Copy after login
Copy after login

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

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

app/assets/AppAsset.php

<code>    public $depends = [
        'yii\web\YiiAsset',
        'yii\bootstrap\BootstrapAsset',
    ];</code>
Copy after login

注释下试试亲。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
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!