vue 获取绑定值
<ul class="product-time clearfix pull-right" style="margin-right: 10px;"><li><a class="btn btn-white btn-sm active" @click="search
·
<ul class="product-time clearfix pull-right" style="margin-right: 10px;"> <li> <a class="btn btn-white btn-sm active" @click="searchData($event)" value="1">今日</a> </li> <li> <a class="btn btn-white btn-sm" @click="searchData($event)" value="2">本周</a> </li> <li> <a class="btn btn-white btn-sm" @click="searchData($event)" value="3">本月</a> </li> <li> <a class="btn btn-white btn-sm" @click="searchData($event)" value="4">全年</a> </li> </ul>
searchData: function (event) { console.log(event.target.getAttribute("value")); },
更多推荐
已为社区贡献2条内容
所有评论(0)