v1.6.0
- feat: 新增
countryCode2方法
避免递归引用数据模板中的属性
参考 mockjs 代码片段
示例如下:
Mockjs.mock({
"data|2-5": [{
countryNameEn: "@country",
countryName: "@ccountry",
twoCode: "@countryCode(2)",
countryCode: "@countryCode",
}]
})会导致 twoCode 的值都和 countryCode 字段一样。
改成下面这样就没问题:
Mockjs.mock({
"data|2-5": [{
countryNameEn: "@country",
countryName: "@ccountry",
twoCode: "@countryCode2",
countryCode: "@countryCode",
}]
})Full Changelog: v1.5.1...v1.6.0