filters:{ getFileName (data) { if(data == undefined || data == null || data == '') { return '' }else{ return data.substring(0,data.indexOf('.')) } } }, <div class="gradingconditions_div"> <div class="div_left">测试程序</div> <div class="div_right"> {{ testFileName | getFileName }} </div> </div>