标签:ons ring col man log 下标 递增 OLE 结果
1.枚举emun
enum Sex { //默认元素的下标从0开始递增(可指定) man = 1, woman = 2 } let sex1: Sex = Sex.man; let sex2: Sex = Sex.woman;
console.log(sex1, sex2);
//编译结果 var Sex; (function (Sex) { Sex[Sex["man"] = 1] = "man"; Sex[Sex["woman"] = 2] = "woman"; })(Sex || (Sex = {}));
标签:ons ring col man log 下标 递增 OLE 结果
原文地址:https://www.cnblogs.com/lianchenxi/p/11540053.html