  Quantum spin liquids are exotic many-body states featured with long-range
entanglement and fractional anyon quasiparticles. Quantum phase transitions of
spin liquids are particularly interesting problems related with novel phenomena
of anyon condensation and anyon confinement. Here we study a quantum dimer
model which implements a transition between a $\mathbb{Z}_2$ spin liquid
($\mathbb{Z}_2$SL) and a valence bond solid (VBS) on the kagome lattice. The
transition is driven by the condensation of vison excitation of the
$\mathbb{Z}_2$ spin liquid, which impacts on other anyon excitations especially
leading to the confinement of spinon excitations. By numerical exact
diagonalization of the dimer model, we directly measure the vison condensation
using vison string operators, and explicitly check a confining potential acting
on spinon excitations in the VBS state. It is observed that topological
degeneracy of the spin-liquid state is lifted concomitantly with the vison
condensation. The dimer ordering pattern of the VBS state is identified by
investigating dimer structure factor. Furthermore, we find an interesting state
that exhibits features of spin liquid and VBS simultaneously. We discuss the
origin of the mixed behaviors and possible scenarios expected in thermodynamic
limit. This work complements the previous analytical studies on the dimer model
[Phys. Rev. B 87, 104408 (2013) and Phys. Rev. B 92, 205131 (2015)] by
providing numerical evidences on the vison condensation and the spinon
confinement in the $\mathbb{Z}_2$SL-to-VBS transition.
