<el-table-column label="最高高度(m)" width="130px">
<template slot-scope="scope">
<span v-show="scope.$index != show">{{scope.row.MaxAltitude}}</span>
<el-input v-show="scope.$index == show" type="text" v-model.number="scope.row.MaxAltitude" placeholder="<=20000"></el-input>
</template>
</el-table-column>
数字类型的验证需要在 v-model 处加上 .number 的修饰符,这是 Vue 自身提供的用于将绑定值转化为 number 类型的修饰符。