Browse Source

Admin::html

jqh 5 years ago
parent
commit
4732717d61

+ 1 - 0
resources/views/content.blade.php

@@ -47,6 +47,7 @@
     {!! admin_section(AdminSection::APP_INNER_AFTER) !!}
 
     {!! Dcat\Admin\Admin::script() !!}
+    {!! Dcat\Admin\Admin::html() !!}
 @endsection
 
 

+ 1 - 0
resources/views/contents/dialog-form.blade.php

@@ -14,6 +14,7 @@
 @yield('content')
 
 {!! Dcat\Admin\Admin::script() !!}
+{!! Dcat\Admin\Admin::html() !!}
 
 {{--select2下拉选框z-index必须大于弹窗的值--}}
 <style>.select2-dropdown {z-index: 99999999999}</style>

+ 1 - 0
resources/views/contents/simple.blade.php

@@ -19,6 +19,7 @@
     {!! admin_section(AdminSection::APP_INNER_AFTER) !!}
 
     {!! Dcat\Admin\Admin::script() !!}
+    {!! Dcat\Admin\Admin::html() !!}
 @endsection
 
 

+ 1 - 1
resources/views/grid/dropdown-actions.blade.php

@@ -2,7 +2,7 @@
     <a href="#" style="padding:0 10px;" class="dropdown-toggle " data-toggle="dropdown">
         <i class="fa fa-ellipsis-v"></i>
     </a>
-    <ul class="dropdown-menu" style="min-width: 50px !important;box-shadow: 0 2px 3px 0 rgba(0,0,0,.2);border-radius:0;left: -65px;top: 5px;">
+    <ul class="dropdown-menu" style="min-width:120px !important;left: -65px;">
 
         @foreach($default as $action)
             <li>{!! \Dcat\Admin\Support\Helper::render($action) !!}</li>

+ 21 - 0
src/Traits/HasAssets.php

@@ -27,6 +27,11 @@ trait HasAssets
      */
     protected static $js = [];
 
+    /**
+     * @var array
+     */
+    protected static $html = [];
+
     /**
      * @var array
      */
@@ -262,6 +267,22 @@ trait HasAssets
         return $js;
     }
 
+    /**
+     * @param string $html
+     *
+     * @return null|string
+     */
+    public static function html($html = '')
+    {
+        if (!empty($html)) {
+            static::$html = array_merge(static::$html, (array) $html);
+
+            return;
+        }
+
+        return implode('', array_unique(static::$html));
+    }
+
     /**
      * Add js or get all js.
      *