精度:小数点后十位
长度:30
<el-input v-if="node.pattern.rightSource == 'Custom'" v-model.number="node.pattern.rightValue" placeholder="请输入右值" style="width: 240px" maxlength="30" @input="handleInput" show-word-limit />
const handleInput = (value) => { // 正则表达式:禁止单独的小数点 const regex = /^(\d+(\.\d{0,10})?|\.\d{1,10})$/; // 如果不符合格式,移除最后一个字符 if (!regex.test(value)) { value = value.slice(0, -1); } // 更新绑定值 props.node.pattern.rightValue = value }


不能以小数点开头。
浙公网安备 33010602011771号