marcorombach/livewire-confirm-modal
Composer 安装命令:
composer require marcorombach/livewire-confirm-modal
包简介
Like the wire confirm directive but displayed as modal on your page.
README 文档
README
This is a simple package aiming to provide a Livewire directive like wire:confirm but without using the default javascript confirm() function.
This is useful if you need the same style for the confirm box across different browsers.
It's also possible to apply your own style by changing the view.
By default this package uses TailwindCSS to style the modal. The look of the modal was inspired by the components of Pines UI.
Installation
You can install the package via composer:
composer require marcorombach/livewire-confirm-modal
You need to add the following to your tailwind.config.js
"./vendor/marcorombach/livewire-confirm-modal/resources/views/components/*.php"
It should look something like this:
content: [ "./resources/**/*.blade.php", "./resources/**/*.js", ... "./vendor/marcorombach/livewire-confirm-modal/resources/views/components/*.php", ]
To include the necessary scripts and the modal itself, make sure this is present in all your views that should use wire:confirm-modal
<x-livewire-confirm-modal/>
Optionally, you can publish the view using
php artisan vendor:publish --tag="livewire-confirm-modal-views"
You should be careful changing the view, especially when touching alpine directives.
Usage
<button wire:confirm-modal="title|description" wire:click="doSomething(1,2)"> Test </button>
Replace title and description with what you want the confirm modal to display.
Now a modal is shown everytime the button is clicked. It will prevent wire:click from executing until the continue button in the modal is clicked.
Credits
License
The MIT License (MIT). Please see License File for more information.
marcorombach/livewire-confirm-modal 适用场景与选型建议
marcorombach/livewire-confirm-modal 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 581 次下载、GitHub Stars 达 3, 最近一次更新时间为 2024 年 08 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「wire」 「confirm」 「tailwind」 「livewire」 「marcorombach」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 marcorombach/livewire-confirm-modal 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 marcorombach/livewire-confirm-modal 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 marcorombach/livewire-confirm-modal 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This library helps you generate payment QR codes for Polish bank mobile applications
Generating SEPA Cuadernos standard files for wire transfers in Spain
Slim wrappers for Bootbox. Bootbox - JavaScript alert(), confirm() and other flexible dialogs using the Bootstrap framework
Symfony bundle to require the user to confirm her update email address by clicking on a link sent to the new address. This should be part of the FriendsOfSymfony/UserBundle, but was not accepted as new feature by a maintainer.
mvo/me-like integration for Contao
统计信息
- 总下载量: 581
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 22
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-08-14
