Hazrat Imam Mahdi (as) bears the special characteristics and more from the previous prophets. He is the embodiment of their virtues and qualities. He carries their signs and is the inheritor of all that they stood for and what was revealed upon them. The following article mentions the similarity between Hazrat Haroon (as) and Imam Mahdi (as).
Almighty Allah raised Haroon (as) up to the sky and then brought him back to the earth as mentioned in a report quoted in Beharul Anwar from Imam Sadiq (as) that he said, “Musa said to Haroon: Come, let us go to the Mt. Sina. So they went together and all of a sudden they saw a house at the door of which was a tree and two garments were upon it. So Musa said to Haroon: Remove your clothes, enter this house, put on these two garments and go to sleep on the bed. Haroon did as he was told. Thus when he rested on the wooden bed, the Almighty Allah captured his soul and the house and the bed were taken away, and Musa returned to Bani Israel and informed them that the Almighty Allah has taken away the soul of Haroon and taken him up to himself. They said: You are lying, you have murdered him. So Musa complained to Allah. The Almighty Allah ordered the angels to take him on the wooden platform between the earth and the sky so that the Bani Israel may see him and understand that he was dead.” (Beharul Anwar volume 13 page 368)
A narration somewhat similar to this is mentioned by the author of Kaamil. The Almighty Allah also took Qaem (as) up in the sky after his birth and brought him back to the earth – as has been already explained in the topic of the resemblance to Musa (as).
Haroon (as) was able to hear the voice of Musa (as) from a long distance just as Musa (as) could hear the voice of Haroon from a great distance. The author of the book, Badaa az-Zahoor has mentioned this point.
About Qaem (as) also it is mentioned by Imam Sadiq (as) that, “When our Qaim rises up Allah, the Mighty and Sublime would sharpen the sight and hearing of Shiahs to such an extent that there would be no correspondence between them. He would speak and they shall hear and they would see him while he would be where he was.” (Rauzat Al-Kafi volume 8, page 240)
(The above article was taken and adapted from the book Mikyalul Makarim Fee Fawaedid Dua Lil Qaem)