mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
改进Model类data方法
This commit is contained in:
@@ -153,6 +153,10 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
||||
throw new Exception('data type invalid', 10300);
|
||||
}
|
||||
$this->data = $data;
|
||||
// 标记字段为更改
|
||||
foreach ($data as $key => $val) {
|
||||
$this->change[] = $key;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user