首頁 > php框架 > YII > yii2禁用bootstrap庫

yii2禁用bootstrap庫

王林
發布: 2020-02-19 11:18:09
原創
3010 人瀏覽過

yii2禁用bootstrap庫

1、編輯 frontend\asset\AppAsset.php 文件,註解掉變數 $depends 裡的 'yii\bootstrap\BootstrapAsset' 值。

2、編輯frontend\config\main.php 文件,在欄位 'components' 下方新增設定:

(相關教學建議:yii框架

'assetManager' => [
 'bundles' => [
      'yii\bootstrap\BootstrapAsset' => [         'css' => [],  // 去除 bootstrap.css
         'sourcePath' => null, // 防止在 frontend/web/asset 下生产文件
     ],
           'yii\bootstrap\BootstrapPluginAsset' => [
               'js' => [],  // 去除 bootstrap.js
         'sourcePath' => null,  // 防止在 frontend/web/asset 下生产文件
     ],
 ],
],
登入後複製

更多程式相關內容,請關注php中文網程式設計入門欄位!

以上是yii2禁用bootstrap庫的詳細內容。更多資訊請關注PHP中文網其他相關文章!

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
最新問題
yii2怎樣用mongodb做rbac
來自於 1970-01-01 08:00:00
0
0
0
yii2 - 如何修改他人在github.com上的原始碼
來自於 1970-01-01 08:00:00
0
0
0
yii2連接mongodb3.2.4出錯
來自於 1970-01-01 08:00:00
0
0
0
php - yii2-ueditor-widget
來自於 1970-01-01 08:00:00
0
0
0
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板