废话少说 上代码 (点个赞谢谢)
<el-input
class="inputDeep"
@change="hanleChange"
type="number"
oninput="if(isNaN(value)) { value = null } if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+3)}"
style="width: 60px; height: 40px"
v-model="zbValue"
>
<!-- <template #append>%</template> -->
</el-input>
样式
<style lang="less" scoped>
.inputDeep {
:deep(.el-input__wrapper) {
box-shadow: 0 0 0 0px var(--el-input-border-color, var(--el-border-color)) inset;
cursor: default;
.el-input__inner {
cursor: default !important;
}
}
}
</style >