核心内容摘要
巜商务旅行3:解锁完美商旅体验的秘密
代码// 处理数字输入只能输入数字不能输入其他符号 const handleNumberInput (value: string) { // 过滤掉所有非数字字符只保留数字 const numbersOnly value.replace(/[^\d]/g, ); // 转换为数字空字符串设为0 localCapitalInfo.capitalYear numbersOnly ? 0 : parseInt(numbersOnly,
代码// 处理数字输入只能输入数字不能输入其他符号 const handleNumberInput (value: string) { // 过滤掉所有非数字字符只保留数字 const numbersOnly value.replace(/[^\d]/g, ); // 转换为数字空字符串设为0 localCapitalInfo.capitalYear numbersOnly ? 0 : parseInt(numbersOnly,