  Recently, from 12 $\gamma$-ray Galactic sources, the LHAASO has detected
ultrahigh-energy photons up to 1.4PeV. The $\gamma$-ray spectra of the sources
J2226+6057, J1908+0621, J1825-1326 and the suggested origin pulsars near the
sources have been published. In our previous work, we studied the hadronic
$\gamma$-ray spectra of the sources J2226+6057, J1908+0621, J1825-1326 in terms
of the Hertzian dipole model of pulsar. In this paper, we investigate the
possibility of the leptonic origin of the $\gamma$-ray. We use the Hertzian
dipole model to describe the pulsars around the sources. The electrons around
the pulsars can be accelerated to PeV by the electromagnetic fields of pulsars.
Under the assumption that the initial electrons are uniform distributed in a
spherical shell between $10^{7}$ to $10^{9}$m around the pulsar, we obtain the
energy distribution of electrons. The leptonic $\gamma$-ray spectra can be
calculated through inverse Compton scattering processes. The leptonic
$\gamma$-ray can roughly conform to the observation of LHAASO.
