Vue.component('consultation-list', { template: '', data: function() { return { chatList: "", curPage:1 } }, props:["consultaData"], methods: { viewDetail: function(list) { function subTime(d){ return d.substr(5,2)+d.substr(8,2) } var title = list.patientName+subTime(list.czrq)+"咨询" top.layer.open({ type: 2, title:title, maxmin: true, area: ['1000px', '600px'], shadeClose: false, content: 'consult-detail.html?consult='+list.code+'&type='+list.type }); } }, computed:{ }, watch:{ consultaData:function(val){ this.chatList=this.consultaData; } }, mounted: function() { var divH = $("#tab-iframe",parent.document).height() - 75; $(".consultation-list").slimScroll({ height: divH,color: '#666'}); } })