vue判断点击元素是否有指定class
vue判断点击元素是否有指定class<div class="ku-menu-item-group active"@click="clickFold"></div>clickFold: function (e) {e = e || window.event;let isActive = e.currentTarget.getAttribute("class").includ
·
vue判断点击元素是否有指定class
<div class="ku-menu-item-group active" @click="clickFold"></div>
clickFold: function (e) {
e = e || window.event;
let isActive = e.currentTarget.getAttribute("class").includes("active");
console.log("isActive----------------",isActive);
}
更多推荐
已为社区贡献2条内容
所有评论(0)