0

html:

<tbody class="fixed-table-body">
    <tr v-for="item in items" @click="fn(item.code)">
        <td>{{item.code}}</td>
        <td>{{item.shopname}}</td>
        <td>{{item.location}}</td>
        <td>{{item.amount}}</td>
    </tr>
</tbody>

js :

var vue = new Vue({
    el: "#report",
    data: {...},
    methods: {
        fn(data){
            console.log(data);
        }
    }
});

$('table').bootstrapTable({
    height: 250,
    toolbarAlign:"left",
    sortName:3,
    sortOrder:"asc"
});

1个回答

0

$('table').bootstrapTable({

height: 250,
toolbarAlign:"left",
sortName:3,
sortOrder:"asc"

});
这个写在Vue的mounted里试试

撰写答案