tachybase_todo/packages/plugins/@tachybase/plugin-mock-collections/src/server/field-interfaces/number.ts
sealday ede7ead8b1 chore(version): release v0.21.34 (#1045)
Co-authored-by: sealday <sealday@gmail.com>
Reviewed-on: daoyoucloud/tachybase#1045
2024-05-24 01:06:06 +08:00

19 lines
357 B
TypeScript

import { faker } from '@faker-js/faker';
export const number = {
options: () => ({
type: 'double',
// name,
uiSchema: {
type: 'number',
// title,
'x-component': 'InputNumber',
'x-component-props': {
stringMode: true,
step: '1',
},
},
}),
mock: () => faker.number.float({ max: 1000 }),
};