Browse Source

如果没有值则不显示相应图标

Abbotton 5 years ago
parent
commit
60ad5a5c5e
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/Grid/Displayers/Copyable.php

+ 2 - 1
src/Grid/Displayers/Copyable.php

@@ -37,10 +37,11 @@ JS;
 
         $content = $this->column->getOriginal();
 
-        return <<<HTML
+        $html = <<<HTML
 <a href="javascript:void(0);" class="grid-column-copyable text-muted" data-content="{$content}" title="Copied!" data-placement="bottom">
     <i class="fa fa-copy"></i>
 </a>&nbsp;{$this->value}
 HTML;
+        return $this->value ? $html : '-';
     }
 }