feat(client): integer field
This commit is contained in:
parent
70ab4dcf1f
commit
9928424f5a
@ -6,9 +6,11 @@ export * from './createdAt';
|
||||
export * from './createdBy';
|
||||
export * from './datetime';
|
||||
export * from './email';
|
||||
export * from './formula';
|
||||
export * from './icon';
|
||||
export * from './id';
|
||||
export * from './input';
|
||||
export * from './integer';
|
||||
export * from './linkTo';
|
||||
export * from './m2m';
|
||||
export * from './m2o';
|
||||
@ -28,5 +30,4 @@ export * from './textarea';
|
||||
export * from './time';
|
||||
export * from './updatedAt';
|
||||
export * from './updatedBy';
|
||||
export * from './formula';
|
||||
|
||||
|
@ -0,0 +1,31 @@
|
||||
import { defaultProps, operators } from './properties';
|
||||
import { IField } from './types';
|
||||
|
||||
export const integer: IField = {
|
||||
name: 'integer',
|
||||
type: 'object',
|
||||
group: 'basic',
|
||||
order: 5,
|
||||
title: '{{t("Integer")}}',
|
||||
sortable: true,
|
||||
default: {
|
||||
type: 'integer',
|
||||
// name,
|
||||
uiSchema: {
|
||||
type: 'number',
|
||||
// title,
|
||||
'x-component': 'InputNumber',
|
||||
'x-component-props': {
|
||||
stringMode: true,
|
||||
step: '0',
|
||||
},
|
||||
'x-validator': 'integer',
|
||||
},
|
||||
},
|
||||
properties: {
|
||||
...defaultProps,
|
||||
},
|
||||
filterable: {
|
||||
operators: operators.number,
|
||||
},
|
||||
};
|
@ -120,6 +120,7 @@ export default {
|
||||
"Phone": "Phone",
|
||||
"Email": "Email",
|
||||
"Number": "Number",
|
||||
"Integer": "Integer",
|
||||
"Percent": "Percent",
|
||||
"Password": "Password",
|
||||
"Formula": "Formula",
|
||||
|
@ -123,6 +123,7 @@ export default {
|
||||
"Phone": "手机号码",
|
||||
"Email": "电子邮箱",
|
||||
"Number": "数字",
|
||||
"Integer": "整数",
|
||||
"Percent": "百分比",
|
||||
"Password": "密码",
|
||||
"Formula": "公式",
|
||||
|
Loading…
Reference in New Issue
Block a user