dever 6 years ago
parent
commit
cb397cbc10
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/Api.php

+ 7 - 1
src/Api.php

@@ -47,7 +47,13 @@ class Api
 
 
 			if ($model) {
 			if ($model) {
 				$config = array();
 				$config = array();
-				$config['background'] = Dever::local($template['background']);
+				if (isset($set['background']) && $set['background']) {
+					$config['background'] = Dever::local($set['background']);
+					unset($set['background']);
+				} else {
+					$config['background'] = Dever::local($template['background']);
+				}
+				
 				$config['param'] = array();
 				$config['param'] = array();
 				foreach ($model as $k => $v) {
 				foreach ($model as $k => $v) {
 					$param = $this->getConfig($v, $set);
 					$param = $this->getConfig($v, $set);