An approximation based on moving least squares for vector-valued functions satisfying the divergence-free property was employed in [67] by Trask, Maxey, and Hu. They changed the traditional polynomial bases in moving least squares approximation to the vector-valued polynomial basis functions satisfying the divergence-free property for constructing a new vector-valued approximation. In this paper, we adopt [67], but we consider another approach, i.e., a direct method based on the generalized moving least squares (GMLS) approximation for vector-valued functions, which satisfy the divergence-free property. This GMLS approximation produces diffuse or uncertain derivatives for each component of the proposed vector-valued approximation satisfying the divergence-free property. Using the new approach, the linear functionals such as the derivatives act only on each row of the vector-valued polynomial basis functions, which reduces the computational cost comparing with the divergence-free moving least squares approximation. The pointwise error estimates of the presented approximation are obtained for the bounded sub-domains in Rd(d≥2) with an interior cone condition. Some numerical results are provided to confirm the obtained theoretical results. As an application, the Cahn-Hilliard-Hele-Shaw (CHHS) equation is solved numerically via a stabilized semi-implicit scheme in time that holds the mass conservative and energy dissipative properties and also the GMLS approximation in space. Besides, the developed vector-valued approximation has been used to compute the Leray-Helmholtz projection of the advective velocity.