定制 performing/laravel-harmony 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

performing/laravel-harmony

最新稳定版本:0.10.1

Composer 安装命令:

composer require performing/laravel-harmony

包简介

Headless inertia components

README 文档

README

Collection of classes and vue components to speed your development of InertiaJs applications.

Installation

You can install the package via composer:

composer require performing/laravel-harmony

You can publish the config file with:

php artisan vendor:publish --tag="harmony-config"

Install npm dependencies:

npm install tailwindcss @headlessui/vue @popperjs/core @vueuse/core @zag-js/checkbox @zag-js/combobox @zag-js/popover @zag-js/toast @zag-js/vue

Update your vite configuraiton as follows:

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"],
        }),
        // ...
    ]
})

Update your tsconfig

{
    "compilerOptions": {
        // ...
        "paths": {
            "~/*": ["./vendor/performing/laravel-harmony/resources/*"]
        }
    },
    "include": [
        "vendor/performing/laravel-harmony/resources/**/*"
    ]
}

Usage

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')
        ]
    }
}

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 2.76k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固