performing / laravel-harmony
无头惯性组件
0.4.0
2024-09-06 20:16 UTC
Requires
- php: ^8.1
- illuminate/collections: ^10.0|^11.0
- illuminate/contracts: ^10.0|^11.0
- illuminate/support: ^10.0|^11.0
- inertiajs/inertia-laravel: ^0.6.10|^1.0
- laracasts/flash: ^3.2
- tightenco/ziggy: ^1.6
Requires (Dev)
- calebporzio/sushi: ^2.4
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.8
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.11
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- silber/bouncer: ^1.0
- spatie/laravel-data: ^3.9
- spatie/laravel-medialibrary: ^10.12
- spatie/laravel-package-tools: ^1.14.0
README
类和vue组件集合,以加速您对InertiaJs应用程序的开发。
安装
您可以通过composer安装此包
composer require performing/laravel-harmony
您可以使用以下命令发布配置文件
php artisan vendor:publish --tag="harmony-config"
安装npm依赖项
npm install tailwindcss @headlessui/vue @popperjs/core @vueuse/core @zag-js/checkbox @zag-js/combobox @zag-js/popover @zag-js/toast @zag-js/vue
按照以下方式更新您的vite配置
import { defineConfig } from 'vite'; import path from 'node:path'; import laravel from 'laravel-vite-plugin'; import vue from '@vitejs/plugin-vue'; import Components from "unplugin-vue-components/vite"; export default defineConfig({ resolve: { alias: { '@': path.resolve(__dirname, 'resources/js'), '~': path.resolve(__dirname, 'vendor/performing/laravel-harmony/resources'), } }, plugins: [ Components({ dirs: [ // Add other paths before if you want to // ovverride components with same name 'vendor/performing/laravel-harmony/resources/components', ], extensions: ["vue"], }), // ... ] })
更新您的tsconfig
{ "compilerOptions": { // ... "paths": { "~/*": ["./vendor/performing/laravel-harmony/resources/*"] } }, "include": [ "vendor/performing/laravel-harmony/resources/**/*" ] }
使用方法
use Performing\Harmony\Page; use Performing\Harmony\Components\TableComponent; class ModelController { public function index() : Inertia\Response { return [ Page::make('Title') ->table( TableComponent::make() ->rows(Model::query()) ->columns([ ... ]) ->filters([ ... ]) ->selectable() ) ->render('harmony::resources/index') ] } }
测试
composer test
变更日志
有关最近更改的更多信息,请参阅 变更日志。
贡献
有关详细信息,请参阅 贡献指南。
安全漏洞
有关如何报告安全漏洞的详细信息,请参阅 我们的安全策略。
许可证
MIT许可证(MIT)。有关更多信息,请参阅 许可证文件。