<div class="project-card even" @click="project(1)">
<p class="project-name">project2</p>
<div class="project-content">
<p>xxxxxxxxxxxxxxxxxxxxx</p>
<span @click="closeProject(1)">返回</span>
</div></div>closeProject:function (index) {
$('.project-card').eq(index).css({ 'height':'100px',
}) console.log($('.project-card').eq(index).css('height'))
}, project:function (index) {
$('.project-card').eq(index).css({ 'height':'100%'
})
$('.scroll').animate({ scrollTop:document.getElementsByClassName('project-card')[index].offsetTop
});
},代碼如上,closeProject方法無(wú)法修改height高度為100px,為什么?,打印出的高度還是為原來(lái)的高度
在vue中,jquery css方法不會(huì)生效嗎?
三國(guó)紛爭(zhēng)
2018-07-10 13:13:44