提交 e354b6d3 编写于 作者: F Filipa Lacerda

Use vue .prevent to prevent the click

上级 9803579e
......@@ -46,8 +46,6 @@ export default {
},
methods: {
changePage(e) {
e.preventDefault();
if (e.target.parentElement.classList.contains('disabled')) return;
const text = e.target.innerText;
......@@ -134,7 +132,7 @@ export default {
active: item.active,
disabled: item.disabled
}">
<a @click="changePage($event)">{{item.title}}</a>
<a @click.prevent="changePage($event)">{{item.title}}</a>
</li>
</ul>
</div>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册