function realized，but the effect isn't good

mouseenter the list, it collapses and mouseleave the list, it will
expand.