Space-charge effects limit the beam-extraction capability of the ion optics and thus hindering the miniaturization and other performance improvements of ion thrusters. This paper numerically studies the space-charge effects in ion optics using hybrid and full particle-in-cell (PIC) simulations and proposes a modified Child-Langmuir (CL) law. As the injected current increases, the parallel-plane electrode system which corresponds to the classical CL law will reach an unstable and oscillatory state, while the ion optics system remains stable because the electrons from the bulk plasma will compensate for the space-charge effects. Furthermore, the radial expansion of ion beam and the loss of ions on the grids can counteract the space-charge effects when the injected current increases. In general, the space-charge effects in ion optics are self-consistently adjusted by the compensating electrons and the variation of the beam radius. Accordingly, we identify a region in ion optics where generally no electrons exist to exclude the influence of electron compensation, and then we modify the CL law of this region by taking into account the effect of the change in the beam radius. We validate the modified CL law and demonstrate its effectiveness in predicting the operating points of the ion optics, such as the perveance-limit point.