Skip to content

Commit

Permalink
改进模板变量赋值
Browse files Browse the repository at this point in the history
  • Loading branch information
liu21st committed Mar 15, 2016
1 parent a496cf3 commit 3918ca3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion library/think/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public function theme($theme)
public function fetch($template = '', $vars = [], $config = [], $renderContent = false)
{
// 模板变量
$vars = $vars ? $vars : $this->data;
$vars = array_merge($this->data, $vars);
if (!$renderContent) {
// 获取模板文件名
$template = $this->parseTemplate($template);
Expand Down
4 changes: 2 additions & 2 deletions tpl/think_exception.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
padding: 20px;
}
h1{
margin: 0;
margin: 10px 0 0;
font-size: 28px;
font-weight: 500;
line-height: 32px;
Expand All @@ -22,7 +22,7 @@
color: #4288ce;
font-weight: 400;
padding: 6px 0;
margin: 10px 6px 0 0;
margin: 6px 0 0;
font-size: 18px;
border-bottom: 1px solid #eee;
}
Expand Down

0 comments on commit 3918ca3

Please sign in to comment.