How do you use confirm dialogues in a custom Laravel Nova tool?

不羁的心 提交于 2019-12-21 07:06:33

问题


Is it possible to use the built in Laravel Nova confirm dialogue in your own tool? All I would like to use is interact with it how Nova does itself.

The docs are quite light on the JS topic, as the only built in UI you seem to be able to work with is the toasted plugin: https://nova.laravel.com/docs/1.0/customization/frontend.html#javascript


回答1:


You can use <modal> component whenever you want.

Here is how it work internally in Nova: https://gist.github.com/sanasol/fa7441ceb4da9c6c71f9586ec1d04a5a

Here is simplified example: https://gist.github.com/sanasol/b3790b8041fb2dfaa0a5b921ff46f5f3



来源:https://stackoverflow.com/questions/54823989/how-do-you-use-confirm-dialogues-in-a-custom-laravel-nova-tool

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!