Considering the mass splittings of three active neutrinos , we investigate how the nature of dark energy affects the cosmological constraints on the total neutrino mass \sum m _ { \nu } using the latest cosmological observations . In this paper , some typical dark energy models , including \Lambda CDM , w CDM , CPL , and HDE models , are discussed . In the analysis , we also consider the effects from the neutrino mass hierarchies , i.e. , the degenerate hierarchy ( DH ) , the normal hierarchy ( NH ) , and the inverted hierarchy ( IH ) . We employ the current cosmological observations to do the analysis , including the Planck 2018 temperature and polarization power spectra , the baryon acoustic oscillations ( BAO ) , the type Ia supernovae ( SNe ) , and the Hubble constant H _ { 0 } measurement . In the \Lambda CDM+ \sum m _ { \nu } model , we obtain the upper limits of the neutrino mass \sum m _ { \nu } < 0.123 eV ( DH ) , \sum m _ { \nu } < 0.156 eV ( NH ) , and \sum m _ { \nu } < 0.185 eV ( IH ) at the 95 \% C.L. , using the Planck+BAO+SNe data combination . For the w CDM+ \sum m _ { \nu } model and the CPL+ \sum m _ { \nu } model , larger upper limits of \sum m _ { \nu } are obtained compared to those of the \Lambda CDM+ \sum m _ { \nu } model . The most stringent constraint on the neutrino mass , \sum m _ { \nu } < 0.080 eV ( DH ) , is derived in the HDE+ \sum m _ { \nu } model . In addition , we find that the inclusion of the local measurement of the Hubble constant in the data combination leads to tighter constraints on the total neutrino mass in all these dark energy models .