Study on the meniscus-induced motion of droplets and bubbles by a three-phase Lattice Boltzmann model