2021-07-09 17:53:24 +08:00
|
|
|
直接使用Bootstrap的.sass文件
|
|
|
|
=======================================
|
|
|
|
|
2022-12-27 15:09:38 +08:00
|
|
|
如果引入 [直接使用Bootstrap的.sass文件](https://getbootstrap.com/getting-started/#customizing)
|
2021-07-09 17:53:24 +08:00
|
|
|
则需要禁用原始加载的 css 文件.
|
2021-08-03 16:22:50 +08:00
|
|
|
通过设置 [[yii\bootstrap5\BootstrapAsset|BootstrapAsset]] 的 css 属性为空即可.
|
2021-07-09 17:53:24 +08:00
|
|
|
为此,需要配置 `assetManager` [应用组件](https://github.com/yiisoft/yii2/blob/master/docs/guide/structure-application-components.md) 为如下:
|
|
|
|
|
|
|
|
```php
|
|
|
|
'assetManager' => [
|
|
|
|
'bundles' => [
|
2021-08-03 16:22:50 +08:00
|
|
|
'yii\bootstrap5\BootstrapAsset' => [
|
2021-07-09 17:53:24 +08:00
|
|
|
'css' => [],
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
```
|