let regex = hash.match(/=[0-9]*/)
let id = Number(regex[0].substring(1, regex[0].length))
会出现
提示错误
let regex = hash.match(/=[0-9]*/) as string[] //加入断言判断
let id = Number(regex[0].substring(1, regex[0].length))
let regex = hash.match(/=[0-9]*/)
let id = Number(regex[0].substring(1, regex[0].length))
会出现
提示错误
let regex = hash.match(/=[0-9]*/) as string[] //加入断言判断
let id = Number(regex[0].substring(1, regex[0].length))