The meaning of having the vapors is to be emotionally overcome by something.
However having the vapors can mean a few other things as well although the most common meaning of the having the vapors is to be emotionally overcome.
Some other meanings of having the vapors are being creeped out, having gas or other things such as hysteria, mania, clinical depression, bipolar disorder, lightheadedness, fainting, flush, withdrawal syndrome, mood swings, or PMS.
Having the vapors or you're giving the vapors is a pretty old saying that was said and used mostly in the 1900s and 1950s to 1980s.
However some people even today use the saying having the vapors.