mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进模板变量赋值
This commit is contained in:
@@ -169,7 +169,7 @@ class View
|
||||
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);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
padding: 20px;
|
||||
}
|
||||
h1{
|
||||
margin: 0;
|
||||
margin: 10px 0 0;
|
||||
font-size: 28px;
|
||||
font-weight: 500;
|
||||
line-height: 32px;
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user