Skip to content

Releases: caijf/mockjs-extend

v1.9.0

13 Nov 11:35

Choose a tag to compare

  • feat: mock工具类 mockPageData 实例方法支持自定义分页数据对象键名

Full Changelog: v1.8.0...v1.9.0

v1.8.0

29 Oct 07:03

Choose a tag to compare

  • feat: 新增生成随机省市区编码方法 provinceCode cityCode areaCode

Full Changelog: v1.7.1...v1.8.0

v1.7.1

24 Sep 01:57

Choose a tag to compare

  • feat: MockUtilClass 实例支持对象解构 mockData mockPageData 方法调用

Full Changelog: v1.7.0...v1.7.1

v1.7.0

31 Jul 02:20

Choose a tag to compare

  • feat: 优化 mockData 回调函数处理逻辑

Full Changelog: v1.6.1...v1.7.0

v1.6.1

28 Jul 03:38

Choose a tag to compare

  • chore: update deps
    • lcn v6 to v7

Full Changelog: v1.6.0...v1.6.1

v1.6.0

13 Jun 10:54

Choose a tag to compare

  • 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

v1.5.1

04 Jun 03:28

Choose a tag to compare

  • chore: update deps

Full Changelog: v1.5.0...v1.5.1

v1.5.0

25 Apr 03:08

Choose a tag to compare

  • feat: 新增 utc 方法
  • feat: 部分中英文字段调整,原字段继续保留至下个大版本
    • countryName 调整为 ccountry
    • companyName 调整为 ccompany
  • feat: 新增随机生成数据方法
    • getRandomGlobalBank
    • getRandomBankCard
    • getRandomCountry
    • getRandomCurrency

Full Changelog: v1.4.4...v1.5.0

v1.4.4

24 Jan 08:25

Choose a tag to compare

  • refactor: 优化银行卡号生成方法

Full Changelog: v1.4.3...v1.4.4

v1.4.3

20 Jan 09:59

Choose a tag to compare

  • feat: 生成社会统一信用代码工具方法名称调整

Full Changelog: v1.4.2...v1.4.3