请问大佬们,如何对一行el-form-item内多个el-input输入框的进行只能输入整数或者小数的校验?
<li>
<el-form ref="ruleFormRef" :model="RtkForm" :rules="rules" label-width="120px">
<div class="OverView_header">
<h1>rtk杆臂</h1>
</div>
<div class="OverView_SerialConfig_Part">
<div>
<el-form-item label="主天线杆臂(mm):">
<el-input v-model.number="RtkForm.x" />
<el-input v-model.number="RtkForm.y" />
<el-input v-model.number="RtkForm.z" />
</el-form-item>
</div>
<div>
<el-form-item label="测量误差估计(mm):">
<el-input v-model.number="RtkForm.mis_x" />
<el-input v-model.number="RtkForm.mis_y" />
<el-input v-model.number="RtkForm.mis_z" />
</el-form-item>
</div>
<div>
<el-form-item label="副天线杆臂(mm):">
<el-input v-model.number="RtkForm.x_s" />
<el-input v-model.number="RtkForm.y_s" />
<el-input v-model.number="RtkForm.z_s" />
</el-form-item>
</div>
<div>
<el-form-item label="测量误差估计(mm):">
<el-input v-model.number="RtkForm.mis_x_s" />
<el-input v-model.number="RtkForm.mis_y_s" />
<el-input v-model.number="RtkForm.mis_z_s" />
</el-form-item>
</div>
<!-- rtk杆臂设置 -->
<el-button @click="saveRtkSetting">保存</el-button>
</div>
</el-form>
</li>
我只写一个主天线的示例,经过验证可以,你就续写下去就可以:
更新:
我发现这样写更简单粗暴,只不过没提示了