在 mounted 办法里写上 var that = thisdocument.addEventListener(‘click’, function (e) { if (document.getElementsByClassName(‘contentCon’)[0]) {} })