上代码
上传附件按钮
<table class="table table-bordered table-condensed" id="edit_accessory">
<thead>
<tr>
<td style="width:20%;">合同附件:</td>
<td colspan="3"><button type="button" class="btn btn-primary" @click="editAccessory()">添加附件</button></td>
</tr>
</thead>
<tbody></tbody>
<tfoot></tfoot>
</table>
把添加附件按钮写在你的vue下method方法下面
var addshebei=new Vue({
el:"#addshebei",
data:{
id:"",
file: []
},
methods: {
initTime(){
var mountedSelf = this; // 当前的vue对象
laydate.render({
elem: '#enterTime', //指定元素 绑定