第一种: 补位 0 | 2.5 // 2 第二种: 利用JS的API Math.trunc(2.5) // 2 parseInt(2.5) //2 Math.round(2.5) // 3 Number(2.5.toFixed()) // 3