核心内容摘要
Go生成唯一ID的标准方案:github.com/google/uuid使用详解
代码// 处理数字输入只能输入数字不能输入其他符号 const handleNumberInput (value: string) { // 过滤掉所有非数字字符只保留数字 const numbersOnly value.replace(/[^\d]/g, ); // 转换为数字空字符串设为0 localCapitalInfo.capitalYear numbersOnly ? 0 : parseInt(numbersOnly,