mockjs

2019/12/12

https://github.com/nuysoft/Mock/wiki

占位符:

@占位符
@占位符(参数 [, 参数])

如:

{
    'list|10': [
        {'text':  '@ctitle()'}
    ]
}
  • url
    • @url
  • 中文文本
    • @cword()
  • 中文标题
    • @ctitle
  • 自然数
    • @natural
  • 布尔
    • @boolean
  • 随机整数
    • @integer
  • 随机字符
    • @string
  • 中文名
    • @cname
  • 时间