src/Leevel/Http/Request.php
public function isAjax(): bool
    {
        $field = static::VAR_AJAX;

        if ($this->request->has($field) || $this->query->has($field)) {
            return true;
        }

        return $this->isRealAjax();
    }
public function isAjax(): bool
    {
        $field = static::VAR_AJAX;

        if ($this->request->has($field) || $this->query->has($field)) {
            return true;
        }

        return $this->isRealAjax();
    }
是否为 Ajax 请求行为.

@return bool