// 隐藏点击按钮 input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; } input[type='number'] { -moz-appearance: textfield; } // 解决输入中文后光标上移的问题 .el-input__inner { line-height: 1px !important; } // 限制输入大小 oninput="if(value){value=value.replace(/[^\d]/g,'')} if(value<=0){value=''} if(value>10000){value=10000}" // 同时适用于el-input和input <el-input class="input-box" v-model="radius" type="number" oninput="if(value){value=value.replace(/[^\d]/g,'')} if(value<=0){value=''} if(value>10000){value=10000}" @change="change" > <template #suffix> <span class="icon">m</span> </template> </el-input>