在给定的基础上,增加了一个限制最大值为100的条件。

<el-input 
  v-on:input='item.devCostRatio = item.devCostRatio.replace(/[^0-9.]/g, '').replace(/(..*)./g, '$1')' 
  v-model='item.devCostRatio' 
  placeholder='请输入研发费用支付比例' 
  :disabled='powerFlag'
  :max='100'
/>

通过添加:max='100'属性,我们设置了输入框的最大值为100。

Vue.js el-input组件限制最大值100 - 研发费用支付比例示例

原文地址: https://www.cveoy.top/t/topic/pgdJ 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录