diff --git a/library/think/Model.php b/library/think/Model.php index 221f6e90..9fbee3b4 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -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; }