fix(client): non-empty judgment
This commit is contained in:
		
							parent
							
								
									22c6591162
								
							
						
					
					
						commit
						3f6f510e4f
					
				| @ -16,9 +16,11 @@ export const FormItem: any = (props) => { | ||||
|   return ( | ||||
|     <BlockItem className={'nb-form-item'}> | ||||
|       <Item | ||||
|        className={`${css`& .ant-space{
 | ||||
|         flex-wrap:wrap; | ||||
|       }`}`} | ||||
|         className={`${css` | ||||
|           & .ant-space { | ||||
|             flex-wrap: wrap; | ||||
|           } | ||||
|         `}`} | ||||
|         {...props} | ||||
|         extra={ | ||||
|           field.description ? ( | ||||
| @ -185,13 +187,15 @@ FormItem.Designer = () => { | ||||
|           }} | ||||
|         /> | ||||
|       )} | ||||
|       {!form.readPretty && collectionField.interface !== 'o2m' && ( | ||||
|       {!form?.readPretty && collectionField?.interface !== 'o2m' && ( | ||||
|         <SchemaSettings.SelectItem | ||||
|           key="pattern" | ||||
|           title={t('Pattern')} | ||||
|         options={ | ||||
|           [{ label: t('Editable'), value: 'editable' }, { label: t('Readonly'), value: 'readonly' }, { label: t('Easy-reading'), value: 'read-pretty' }] | ||||
|         } | ||||
|           options={[ | ||||
|             { label: t('Editable'), value: 'editable' }, | ||||
|             { label: t('Readonly'), value: 'readonly' }, | ||||
|             { label: t('Easy-reading'), value: 'read-pretty' }, | ||||
|           ]} | ||||
|           value={readOnlyMode} | ||||
|           onChange={(v) => { | ||||
|             console.log('v', v); | ||||
| @ -199,7 +203,7 @@ FormItem.Designer = () => { | ||||
|               ['x-uid']: fieldSchema['x-uid'], | ||||
|             }; | ||||
| 
 | ||||
|           switch(v) { | ||||
|             switch (v) { | ||||
|               case 'readonly': { | ||||
|                 fieldSchema['x-read-pretty'] = false; | ||||
|                 fieldSchema['x-disabled'] = true; | ||||
| @ -229,7 +233,7 @@ FormItem.Designer = () => { | ||||
|               } | ||||
|             } | ||||
|             dn.emit('patch', { | ||||
|             schema | ||||
|               schema, | ||||
|             }); | ||||
| 
 | ||||
|             dn.refresh(); | ||||
| @ -268,7 +272,7 @@ FormItem.Designer = () => { | ||||
|         key="remove" | ||||
|         removeParentsIfNoChildren | ||||
|         confirm={{ | ||||
|           title: t('Delete field') | ||||
|           title: t('Delete field'), | ||||
|         }} | ||||
|         breakRemoveOn={{ | ||||
|           'x-component': 'Grid', | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user