1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
| const complexSchema: ISchema = { type: 'object', properties: { basicInfo: { type: 'object', title: 'Basic Information', 'x-decorator': 'FormItem', 'x-component': 'Card', properties: { name: { type: 'string', title: 'Name', required: true, 'x-decorator': 'FormItem', 'x-component': 'Input' }, gender: { type: 'string', title: 'Gender', enum: ['male', 'female'], 'x-decorator': 'FormItem', 'x-component': 'Radio.Group', 'x-component-props': { options: [ { label: 'Male', value: 'male' }, { label: 'Female', value: 'female' } ] } } } },
contact: { type: 'object', title: 'Contact Information', 'x-decorator': 'FormItem', 'x-component': 'Card', properties: { phone: { type: 'string', title: 'Phone Number', pattern: '^1[3-9]\\d{9}$', 'x-decorator': 'FormItem', 'x-component': 'Input', 'x-component-props': { placeholder: 'Please enter 11-digit phone number' } }, address: { type: 'object', title: 'Address', properties: { province: { type: 'string', title: 'Province', 'x-decorator': 'FormItem', 'x-component': 'Select', 'x-component-props': { placeholder: 'Please select province' } }, city: { type: 'string', title: 'City', 'x-decorator': 'FormItem', 'x-component': 'Select', 'x-component-props': { placeholder: 'Please select city' } } } } } },
skills: { type: 'array', title: 'Skills List', 'x-decorator': 'FormItem', 'x-component': 'ArrayCards', items: { type: 'object', properties: { name: { type: 'string', title: 'Skill Name', 'x-decorator': 'FormItem', 'x-component': 'Input' }, level: { type: 'string', title: 'Proficiency Level', enum: ['beginner', 'intermediate', 'advanced', 'expert'], 'x-decorator': 'FormItem', 'x-component': 'Select', 'x-component-props': { options: [ { label: 'Beginner', value: 'beginner' }, { label: 'Intermediate', value: 'intermediate' }, { label: 'Advanced', value: 'advanced' }, { label: 'Expert', value: 'expert' } ] } } } } } } }
|