mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 15:02:47 +08:00
改进模板变量赋值
This commit is contained in:
@@ -169,7 +169,7 @@ class View
|
|||||||
public function fetch($template = '', $vars = [], $config = [], $renderContent = false)
|
public function fetch($template = '', $vars = [], $config = [], $renderContent = false)
|
||||||
{
|
{
|
||||||
// 模板变量
|
// 模板变量
|
||||||
$vars = $vars ? $vars : $this->data;
|
$vars = array_merge($this->data, $vars);
|
||||||
if (!$renderContent) {
|
if (!$renderContent) {
|
||||||
// 获取模板文件名
|
// 获取模板文件名
|
||||||
$template = $this->parseTemplate($template);
|
$template = $this->parseTemplate($template);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
h1{
|
h1{
|
||||||
margin: 0;
|
margin: 10px 0 0;
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
color: #4288ce;
|
color: #4288ce;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
padding: 6px 0;
|
padding: 6px 0;
|
||||||
margin: 10px 6px 0 0;
|
margin: 6px 0 0;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
border-bottom: 1px solid #eee;
|
border-bottom: 1px solid #eee;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user