A wireless charger, comprising: a housing, defining a mounting cavity, a first vent, and a second vent, wherein the housing is configured to hold an electronic device with the second vent facing the electronic device; a baffle, disposed in the mounting cavity and dividing the mounting cavity into a first chamber and a second chamber, wherein both the first vent and the second vent are fluidly coupled to the first chamber, a part of the housing defining the first chamber defines the first vent; a coil module, disposed in the second chamber; a circuit board, disposed in the mounting cavity and electrically connected to the coil module; and a fan, disposed in the first chamber, the fan having a third vent and a fourth vent, the third vent being fluidly coupled to the first chamber and being isolated from the second chamber by the baffle, the fourth vent being fluidly coupled to the second vent, the fan being configured to guide the air to flow in the fan from one of the third vent and the fourth vent, and further guide the air to flow out of the fan from the other of the third vent and the fourth vent, to guide air to flow into the first chamber from one of the first vent and the second vent and guide the air to flow out of the first chamber from the other of the first vent and the second vent, such that the air at the second vent exchanges heat with the electronic device; characterized in that: the fourth vent is fluidly coupled to the second chamber, a part of the housing defining the second chamber defines a fifth vent fluidly coupled to the second chamber; the fan is further configured to guide the air to flow in the first chamber and the second chamber from one of the first vent and the fifth vent and guide the air to flow out of the mounting cavity from the other of the first vent and the fifth vent. a housing, defining a mounting cavity, a first vent, and a second vent, wherein the housing is configured to hold an electronic device with the second vent facing the electronic device; a baffle, disposed in the mounting cavity and dividing the mounting cavity into a first chamber and a second chamber, wherein both the first vent and the second vent are fluidly coupled to the first chamber, a part of the housing defining the first chamber defines the first vent; a coil module, disposed in the second chamber; a circuit board, disposed in the mounting cavity and electrically connected to the coil module; and a fan, disposed in the first chamber, the fan having a third vent and a fourth vent, the third vent being fluidly coupled to the first chamber and being isolated from the second chamber by the baffle, the fourth vent being fluidly coupled to the second vent, the fan being configured to guide the air to flow in the fan from one of the third vent and the fourth vent, and further guide the air to flow out of the fan from the other of the third vent and the fourth vent, to guide air to flow into the first chamber from one of the first vent and the second vent and guide the air to flow out of the first chamber from the other of the first vent and the second vent, such that the air at the second vent exchanges heat with the electronic device; characterized in that: the fourth vent is fluidly coupled to the second chamber, a part of the housing defining the second chamber defines a fifth vent fluidly coupled to the second chamber; the fan is further configured to guide the air to flow in the first chamber and the second chamber from one of the first vent and the fifth vent and guide the air to flow out of the mounting cavity from the other of the first vent and the fifth vent. the fourth vent is fluidly coupled to the second chamber, a part of the housing defining the second chamber defines a fifth vent fluidly coupled to the second chamber; the fan is further configured to guide the air to flow in the first chamber and the second chamber from one of the first vent and the fifth vent and guide the air to flow out of the mounting cavity from the other of the first vent and the fifth vent.