<ul :style="{'height':toggleMenu[index] ? 0 : `${item.subMenus.length*45}px`}"></ul>
【1】当需要过渡的属性初始值为 auto 时,不会进行过渡。