//定义String var str = "0" //String 转Int 正确 var i:Int = str.toInt() //String 转Int 错误 var i:Int = str as Int 复制代码