vue bootstrapTable不能点击v-on:点击



挂载.bootstrapTable()后无法点击v-on:click但没有使用.bootstrapTable(),使用v-on是正常的:点击

我需要收听其他功能吗?或者我应该写什么样的代码?

file.vue

<template>
<div>
<table id="table">
<tr>
<th>#</th>
</tr>
<tr v-for="(d, index) in data" :key="index">
<td><a class="btn btn-secondary" type="button" @click="callText(d.text)">{{d.text}}</a></td>
</tr>
</table>
</div>
</template>
<script>
export default {
name: 'file',
data () {
return {
data: [{"text":'1'},{"text":'2'},{"text":'3'}]
}
},
methods: {
buildTable() {
$('#table').bootstrapTable('destroy').bootstrapTable({})
},
callText(t){
console.log(t);
}
},
mounted: function(){
this.buildTable();
}
}
</script>

可以,而且它仍然有效。你有没有看你的游戏机?唯一的问题是光标没有像实际的按钮那样变成指针。

最新更新