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"
});
oytoyt 7
2017-09-12 提问
1 个回答
0

$('table').bootstrapTable({

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

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

撰写答案

你可能感兴趣的

推广链接