浏览代码

删除菜单自动刷新页面

jqh 4 年之前
父节点
当前提交
fb31201773
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      src/Tree/Actions/Delete.php

+ 6 - 1
src/Tree/Actions/Delete.php

@@ -8,8 +8,13 @@ class Delete extends RowAction
 {
     public function html()
     {
+        $url = request()->fullUrl();
+
         return <<<HTML
-<a href="javascript:void(0);" data-message="ID - {$this->getKey()}" data-url="{$this->resource()}/{$this->getKey()}" data-action="delete"><i class="feather icon-trash"></i>&nbsp;</a>
+<a href="javascript:void(0);" 
+    data-message="ID - {$this->getKey()}" 
+    data-redirect="{$url}"
+    data-url="{$this->resource()}/{$this->getKey()}" data-action="delete"><i class="feather icon-trash"></i>&nbsp;</a>
 HTML;
     }
 }