  The AMS-02 has just published the unprecedentedly precise measurement of the
cosmic electron and positron spectra. In this paper we try to give a
quantitative study on the AMS-02 results by a global fitting to the electron
and positron spectra, together with the updated positron fraction data. The
Markov Chain Monte Carlo algorithm is adopted to do the fitting. The primary
electron spectrum and the parameters for pulsars or dark matter which
contribute extra positrons are determined simultaneously. We find that there is
a hardening of the primary electron spectrum at $\sim 60$ GeV. With such a new
feature at the background spectrum both the pulsars and dark matter can explain
the AMS-02 results very well. The dark matter scenario shows a drop at positron
fraction at $\sim 300$ GeV, however, suffers very strong constraints from Fermi
$\gamma$-ray observations. The fitting results also suggest that the
propagation model with convection may be more favored by the lepton data than
the reacceleration model.
