mirror of
https://github.com/XiaoDaiGua-Ray/ray-template.git
synced 2026-11-19 17:53:36 +08:00
20 lines
471 B
TypeScript
20 lines
471 B
TypeScript
import { faker } from '@faker-js/faker/locale/zh_CN'
|
|
|
|
/**
|
|
*
|
|
* @param option 自定义配置
|
|
*
|
|
* 基础表格数据
|
|
*/
|
|
export function tableMock(option?: object) {
|
|
return {
|
|
...option,
|
|
id: faker.string.uuid(),
|
|
address: faker.location.state() + faker.location.city(),
|
|
email: faker.internet.email(),
|
|
name: faker.person.fullName(),
|
|
age: faker.number.int({ min: 18, max: 60 }),
|
|
createDate: faker.date.past().toISOString().slice(0, 10),
|
|
}
|
|
}
|