el-input 限制只能输入纯数字

<el-input
    v-model="queryParams.businessId"
     maxlength="30"
     style="flex: 1; margin-right: 16px"
     :formatter="(value) => value.replace(/[^\d]/g, '')"
     placeholder="询报盘ID"
 />

你可能感兴趣的:(前端)