定制 yxx/laravel-alpine-components 二次开发

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

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

yxx/laravel-alpine-components

Composer 安装命令:

composer require yxx/laravel-alpine-components

包简介

README 文档

README

About

This is about laravel blade and alpinejs related components

Function

  • combobox
  • remote-combobox
  • select

Installation

composer require yxx/laravel-alpine-components

View Local Example

  • Execute:
php artisan vendor:publish --provider="Yxx\LaravelAlpineComponents\Providers\LaravelAlpineComponentServiceProvider
  • Accessed at the {your domain}/alp-examples/ route.

Code example

@php
    $options = [
        ["id" => 1, "name" => 'Alabama'],
        ["id" => 2, "name" => 'Colorado'],
        ["id" => 3, "name" => 'Indiana'],
        ["id" => 4, "name" => 'Nevada'],
        ["id" => 5, "name" => 'NewYork'],
        ["id" => 6, "name" => 'Oklahoma'],
        ["id" => 7, "name" => 'Pennsylvania'],
        ["id" => 8, "name" => 'Guam']
   ];
@endphp
<x-alp-select class="w-96" options="{!! json_encode($options) !!}" defaultOption="{!! json_encode($options[3]) !!}">
    <x-slot:label class="block text-sm font-medium text-gray-700">Select Options</x-slot:label>
    <x-slot:div class="relative mt-1" >
        <x-slot:button type="button" @click="onClick" class="relative w-full cursor-default rounded-md border border-gray-300 bg-white py-2 pl-3 pr-10 text-left shadow-sm focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500 sm:text-sm" aria-haspopup="listbox" aria-expanded="true" aria-labelledby="listbox-label">
            <span class="block truncate" x-text="selectedOption.name"></span>
            <span class="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2">
                <svg class="h-5 w-5 text-gray-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
                  <path fill-rule="evenodd" d="M10 3a.75.75 0 01.55.24l3.25 3.5a.75.75 0 11-1.1 1.02L10 4.852 7.3 7.76a.75.75 0 01-1.1-1.02l3.25-3.5A.75.75 0 0110 3zm-3.76 9.2a.75.75 0 011.06.04l2.7 2.908 2.7-2.908a.75.75 0 111.1 1.02l-3.25 3.5a.75.75 0 01-1.1 0l-3.25-3.5a.75.75 0 01.04-1.06z" clip-rule="evenodd" />
                </svg>
            </span>
        </x-slot:button>
        <x-slot:ul class="absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm" id="options" role="listbox">
            <x-slot:content>
                <template x-for="option in options" :key="option.id">
                    <li @click="onSelected(option)"  class="group text-gray-900 relative cursor-default select-none py-2 pl-3 pr-9 hover:text-white hover:bg-gray-700">
                        <span class="block truncate" x-text="option.name"></span>
                        <template x-if="selectedOption.id === option.id">
                            <span class="text-gray-700 absolute inset-y-0 right-0 flex items-center pr-4 group-hover:text-white">
                                <svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
                                    <path fill-rule="evenodd" d="M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z" clip-rule="evenodd" />
                                </svg>
                            </span>
                        </template>
                    </li>
                </template>
            </x-slot:content>
        </x-slot:ul>
    </x-slot:div>
</x-alp-select>

yxx/laravel-alpine-components 适用场景与选型建议

yxx/laravel-alpine-components 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 601 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 02 月 18 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 yxx/laravel-alpine-components 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 yxx/laravel-alpine-components 我们能提供哪些服务?
定制开发 / 二次开发

基于 yxx/laravel-alpine-components 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-02-18