  Gamma-ray pulsar halos are ideal indicators of cosmic-ray propagation in
localized regions of the Galaxy and electron injection from pulsar wind
nebulae. HESS~J1831$-$098 is a candidate pulsar halo observed by both H.E.S.S.
and HAWC experiments. We adopt the flux map of the H.E.S.S. Galactic plane
survey and the spectrum measurements of H.E.S.S. and \textit{Fermi}-LAT to
study HESS~J1831$-$098. We find that HESS~J1831$-$098 meets all the criteria
for a pulsar halo. The diffusion coefficient inside the halo and the conversion
efficiency from the pulsar spin-down energy to the electron energy are both
similar to the Geminga halo, a canonical pulsar halo. The injection spectrum
can be well described by an exponentially-cutoff power law. However, the needed
power-law term is very hard with $p\lesssim1$ if the diffusion coefficient is
spatially and temporally independent. Considering the possible origins of the
slow-diffusion environment, we adopt the two-zone diffusion model and the
time-delayed slow-diffusion model. Both the models can interpret the H.E.S.S.
and \textit{Fermi}-LAT results with a milder $p$. A modified injection time
profile may have a similar effect.
