mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
代码规范
This commit is contained in:
@@ -105,17 +105,16 @@ class Browser
|
|||||||
</script>
|
</script>
|
||||||
JS;
|
JS;
|
||||||
echo $js;
|
echo $js;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function output($type, $msg){
|
public function output($type, $msg)
|
||||||
$type = strtolower($type);
|
{
|
||||||
|
$type = strtolower($type);
|
||||||
$trace_tabs = array_values($this->config['trace_tabs']);
|
$trace_tabs = array_values($this->config['trace_tabs']);
|
||||||
$line[] = ($type == $trace_tabs[0] || '调试' == $type || '错误'== $type)?
|
$line[] = ($type == $trace_tabs[0] || '调试' == $type || '错误'== $type)
|
||||||
"console.group('{$type}');"
|
? "console.group('{$type}');"
|
||||||
:
|
: "console.groupCollapsed('{$type}');";
|
||||||
"console.groupCollapsed('{$type}');";//dump($msg);
|
|
||||||
|
|
||||||
foreach ((array)$msg as $key => $m) {
|
foreach ((array)$msg as $key => $m) {
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
@@ -138,7 +137,7 @@ JS;
|
|||||||
$line[] = "console.log(\"%c{$msg}\", \"{$style}\");";
|
$line[] = "console.log(\"%c{$msg}\", \"{$style}\");";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$m = is_string($key)? $key.' '.$m: $key+1 .' '.$m;
|
$m = is_string($key)? $key . ' ' . $m : $key+1 . ' ' . $m;
|
||||||
$msg = str_replace(PHP_EOL, '\n', $m);
|
$msg = str_replace(PHP_EOL, '\n', $m);
|
||||||
$line[] = "console.log(\"{$msg}\");";
|
$line[] = "console.log(\"{$msg}\");";
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user