jqhph / dcat-admin

🔥 基于 Laravel 的后台系统构建工具 (Laravel Admin),使用很少的代码快速构建一个功能完善的高颜值后台系统,内置丰富的后台常用组件,开箱即用,让开发者告别冗杂的HTML代码
http://www.dcatadmin.com
MIT License
3.9k stars 713 forks source link

工具表单按钮能动态传参吗 #2104

Closed mbdmt closed 3 months ago

mbdmt commented 10 months ago

Description:

例如先选 产品 取得id 传到Modal::make的payload中 我看好像页面载入时就已经把Modal按钮网址参数设死 参数如在按钮上还能复写 但只能设在php参数不知道有变通方式吗 谢谢

Steps To Reproduce:

$table->select('product_id')->options($option);

$po_modal = Modal::make() ->lg() ->title('Options') ->body(ProductOptions::make()->payload(['id' => '123'])) // 传递自定义参数 ->button('Options');

$table->display('optionss')->with(function() use ($po_modal){ return $po_modal.Session('orderOptionModel'); });

CoderHuu commented 9 months ago

亲,这个是可以的哟。

stale[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.