Browse Source

增加admin_script和admin_style函数

jqh 4 years ago
parent
commit
b6d32c0f69
1 changed files with 25 additions and 0 deletions
  1. 25 0
      src/Support/helpers.php

+ 25 - 0
src/Support/helpers.php

@@ -494,6 +494,31 @@ if (! function_exists('admin_view')) {
     }
 }
 
+if (! function_exists('admin_script')) {
+    /**
+     * @param string $js
+     * @param bool   $direct
+     *
+     * @return void
+     */
+    function admin_script($script, bool $direct = false)
+    {
+        Admin::script($script, $direct);
+    }
+}
+
+if (! function_exists('admin_style')) {
+    /**
+     * @param string $style
+     *
+     * @return void
+     */
+    function admin_style($style)
+    {
+        Admin::style($style);
+    }
+}
+
 if (! function_exists('admin_js')) {
     /**
      * @param string|array $js