Skip to content

Commit 69e674a

Browse files
Create constants.js
1 parent d2b78d7 commit 69e674a

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
export const typeComponentsMap = {
2+
STRING: { component: 'TinyInput' },
3+
TEXT: { component: 'TinyInput' },
4+
BOOLEAN: {
5+
component: 'TinySelect',
6+
props: {
7+
options: [
8+
{
9+
label: 'true',
10+
value: true,
11+
},
12+
{
13+
label: 'false',
14+
value: false,
15+
},
16+
],
17+
},
18+
},
19+
DATETIME: { component: 'TinyDatePicker'},
20+
INTERGER: { component: 'TinyInput', props: { type: 'number' } },
21+
LONG: { component: 'TinyInput', props: { type: 'number' } },
22+
DECIMAL: { component: 'TinyInput', props: { type: 'number' } },
23+
DECIMAL_WITH_PRECISION: { component: 'TinyInput', props: { type: 'number' } },
24+
DOUBLE: { component: 'TinyInput', props: { type: 'number' } },
25+
BIGINTEGER: { component: 'TinyInput', props: { type: 'number' } },
26+
ENUM: {
27+
component: 'TinySelect',
28+
props: { valueField: 'alias', textField: 'name' },
29+
},
30+
};
31+
32+
export const modelType = {
33+
FORM: 'ModelForm',
34+
TABLE: 'ModelTable',
35+
PAGE: 'ModelPage',
36+
};

0 commit comments

Comments
 (0)