zamay86 / yii2-bootstrap5
Twitter Bootstrap v5 扩展程序,用于 Yii 框架
v1
2022-06-30 13:14 UTC
Requires
- php: >=7.0
- ext-json: *
- yiisoft/yii2: ^2.0.42
Requires (Dev)
- phpunit/phpunit: ^6.5.14
- twbs/bootstrap-icons: ^1.7.2
- yiisoft/yii2-coding-standards: ~2.0
Suggests
- twbs/bootstrap-icons: Add this package to the `require` section of your `composer.json` if you'd like to use the bootstrap icon asset.
This package is auto-updated.
Last update: 2024-09-29 06:29:07 UTC
README
Twitter Bootstrap 5 扩展程序用于 Yii 2
这是 Twitter Bootstrap 扩展程序,适用于 Yii 框架 2.0。它将 Bootstrap 组件和插件封装为 Yii 小部件,从而使得在 Yii 应用程序中使用 Bootstrap 组件/插件变得极其简单。
有关许可证信息,请查看 LICENSE 文件。
文档位于 docs/guide/README.md。
安装
安装此扩展的最佳方式是通过 composer。
运行以下命令之一:
php composer.phar require --prefer-dist zamay86/yii2-bootstrap5
或者
"yiisoft/yii2-bootstrap5": "*"
将以下内容添加到您的 composer.json
文件的 require 部分:
翻译
i18n 配置将通过引导过程自动添加到您的应用程序配置中。
用法
例如,以下视图文件中的一行代码将渲染一个 Bootstrap 进度插件
<?= yii\bootstrap5\Progress::widget(['percent' => 60, 'label' => 'test']) ?>