marcorombach/livewire-confirm-modal 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

marcorombach/livewire-confirm-modal

最新稳定版本:0.2.6

Composer 安装命令:

composer require marcorombach/livewire-confirm-modal

包简介

Like the wire confirm directive but displayed as modal on your page.

README 文档

README

Latest Version on Packagist Total Downloads

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.

alt text

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.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-08-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固