  Void size function (VSF) contains information of the cosmic large-scale
structure (LSS), and can be used to derive the properties of dark energy and
dark matter. We predict the VSFs measured from the spectroscopic galaxy survey
operated by the China Space Station Telescope (CSST), and study the strength of
cosmological constraint. We employ a high-resolution Jiutian simulation to get
CSST galaxy mock samples based on an improved semi-analytical model. We
identify voids from this galaxy catalog using the watershed algorithm without
assuming a spherical shape, and estimate the VSFs at different redshift bins
from $z=0.5$ to 1.1. We propose a void selection method based on the
ellipticity, and assume the void linear underdensity threshold $\delta_{\rm v}$
in the theoretical model is redshift-dependent and set it as a free parameter
in each redshift bin. The Markov Chain Monte Carlo (MCMC) method is adopted to
implement the constraints on the cosmological and void parameters. We find that
the CSST VSF measurement can constrain the cosmological parameters to a few
percent level. The best-fit values of $\delta_{\rm v}$ are ranging from
$\sim-0.4$ to $-0.1$ as the redshift increases from 0.5 to 1.1, which has a
distinct difference from the theoretical calculation with $\delta_{\rm
v}\simeq-2.7$ assuming the spherical evolution and using particles as tracer.
Our method can provide a good reference for void identification and selection
in the VSF analysis of the spectroscopic galaxy surveys.
