diff --git a/src/model/concern/Attribute.php b/src/model/concern/Attribute.php index 6265ae80..3fb8a52b 100644 --- a/src/model/concern/Attribute.php +++ b/src/model/concern/Attribute.php @@ -18,6 +18,7 @@ use Stringable; use think\db\Raw; use think\helper\Str; +use think\Model; use think\model\Relation; /** @@ -234,7 +235,7 @@ public function data(array|object $data, bool $set = false, array $allow = []) } elseif (is_object($data)) { $data = get_object_vars($data); } - + // 清空数据 $this->data = [];