update:优化基础组件

This commit is contained in:
JaguarJack
2021-04-20 08:45:08 +08:00
parent be91cfbc4f
commit ceb5a396d8
7 changed files with 60 additions and 7 deletions

View File

@@ -46,6 +46,6 @@ abstract class CatchModel extends \think\Model
*/
public function hasField(string $field)
{
return property_exists($this, 'field') ? in_array($field, $this->field) : false;
return property_exists($this, 'field') && in_array($field, $this->field);
}
}