Ultralight bosonic fields (ULBFs) are predicted by various theories beyond the standard model of particle physics and are viable candidates of cold dark matter. There have been increasing interests to search for the ULBFs in physical and astronomical experiments. In this paper, we investigate the sensitivity of several planned space-based gravitational-wave interferometers to ultralight scalar and vector fields. Using time-delay interferometry (TDI) to suppress the overwhelming laser frequency noise, we derive the averaged transfer functions of different TDI combinations to scalar and vector fields, and estimate the impacts of bosonic field's velocities. We obtain the sensitivity curves for LISA, Taiji and TianQin, and explore their projected constraints on the couplings between ULBFs and standard model particles, illustrating with the ULBFs as dark matter.