@Repeat()
2.0 新增生成重复值数组
数组起始版本 2.0.0
参数
| 名称 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| value | String | ✓ | — | 要重复的值 |
| count | Integer | — | 1 | 重复次数,默认1 |
用法
@Repeat(value)重复值1次
示例:
@Repeat(hello)
输出:
["hello"]@Repeat(value,count)重复值N次
示例:
@Repeat(hello,3)
输出:
["hello","hello","hello"]