1 2 3 4 5 6 7 8 9 | checkDate(id){ //判断该元素是否存在,不存在择移除 if ( this .form.peitao.indexOf(id)>0){ this .form.peitao.splice( this .form.peitao.indexOf(id), 1); return ; } this .form.peitao.push(id); return ; }, |