zero-to-prod / blade-components
Laravel 框架的 Blade 组件
v2.0
2022-12-16 19:59 UTC
Requires
- php: ^8.1
- gajus/dindent: ^2.0
- illuminate/contracts: ^9.44
- spatie/laravel-package-tools: ^1.13
Requires (Dev)
- nunomaduro/collision: ^6.1
- orchestra/testbench: ^7.15
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpunit/phpunit: ^9.5
- roave/security-advisories: dev-latest
- spatie/laravel-ray: ^1.26
README
安装
您可以通过 composer 安装此包
composer require zero-to-prod/blade-components
您可以使用以下命令发布配置文件
php artisan vendor:publish --tag="blade-components-config"
这是发布配置文件的内容
return [
];
可选地,您可以使用以下命令发布视图
php artisan vendor:publish --tag="blade-components-views"
使用方法
注意
等效用法
<x-box hidden/> <x-box hidden="{{$hidden}}"/> <x-box hidden="1"/> <x-box :hidden="true"/> <x-box :hidden="$hidden"/>
盒子
<x-box>Foo</x-box> <!-- Attributes --> <x-box hidden/> <x-box flex/>
链接
<x-link href="www.foo.com">Foo</x-link> <!-- Attributes --> <x-link hidden/> <x-link underline="none"/> <x-link underline="always"/> <x-link underline="hover"/> <!-- Equivalent to target="_blank"--> <x-link new/> <x-link disableAutoTitle/>
容器
<x-container>Foo</x-container> <!-- Attributes --> <x-container hidden/> <x-container disableGutters/> <x-container hidden/> <x-container max-width="0"/> <x-container max-width="none"/> <x-container max-width="xs"/> <x-container max-width="sm"/> <x-container max-width="md"/> <x-container max-width="lg"/> <x-container max-width="xl"/> <x-container max-width="2"/> <x-container max-width="3"/> <x-container max-width="4"/> <x-container max-width="5"/> <x-container max-width="6"/> <x-container max-width="7"/> <x-container max-width="full"/> <x-container max-width="min"/> <x-container max-width="max"/> <x-container max-width="fit"/> <x-container max-width="prose"/> <x-container max-width="screen-sm"/> <x-container max-width="screen-md"/> <x-container max-width="screen-lg"/> <x-container max-width="screen-xl"/> <x-container max-width="screen-2xl"/>
测试
composer test
变更日志
请参阅CHANGELOG了解最近更改的详细信息。
贡献
请参阅CONTRIBUTING以获取详细信息。
安全漏洞
请查看我们的安全策略了解如何报告安全漏洞。
鸣谢
许可协议
MIT 许可协议(MIT)。请参阅许可文件以获取更多信息。