Browse Source

修复Action显示接口显示信息报错问题

jqh 5 years ago
parent
commit
55d1f0e8ab
2 changed files with 3 additions and 1 deletions
  1. 2 0
      src/Actions/Action.php
  2. 1 1
      src/Actions/HasActionHandler.php

+ 2 - 0
src/Actions/Action.php

@@ -195,6 +195,8 @@ abstract class Action implements Renderable
      */
     protected function html()
     {
+        $this->defaultHtmlAttribute('href', 'javascript:void(0)');
+
         return <<<HTML
 <a {$this->formatHtmlAttributes()}>{$this->title()}</a>
 HTML;

+ 1 - 1
src/Actions/HasActionHandler.php

@@ -193,7 +193,7 @@ function (data) {
     }
 
     if (typeof response.data.message === 'string' && response.data.type) {
-        LA[response.data.type](response.data.message);
+        Dcat[response.data.type](response.data.message);
     }
     
     if (response.data.then) {