fix: chinaRegions association fieldName (#3600)
* fix: chinaRegions association fieldName * fix: useAssociatedFormItemInitializerFields fieldName
This commit is contained in:
		
							parent
							
								
									56d4d240a1
								
							
						
					
					
						commit
						f619c4e6c0
					
				@ -418,7 +418,6 @@ export const useAssociatedFormItemInitializerFields = (options?: any) => {
 | 
			
		||||
        ?.map((subField) => {
 | 
			
		||||
          const interfaceConfig = getInterface(subField.interface);
 | 
			
		||||
          const isFileCollection = field?.target && getCollection(field?.target)?.template === 'file';
 | 
			
		||||
          const isAssociationField = ['hasOne', 'hasMany', 'belongsTo', 'belongsToMany'].includes(subField?.type);
 | 
			
		||||
          const schema = {
 | 
			
		||||
            type: 'string',
 | 
			
		||||
            name: `${field.name}.${subField.name}`,
 | 
			
		||||
@ -429,9 +428,9 @@ export const useAssociatedFormItemInitializerFields = (options?: any) => {
 | 
			
		||||
            'x-read-pretty': readPretty,
 | 
			
		||||
            'x-component-props': {
 | 
			
		||||
              'pattern-disable': block === 'Form' && readPretty,
 | 
			
		||||
              fieldNames: isAssociationField
 | 
			
		||||
              fieldNames: isFileCollection
 | 
			
		||||
                ? {
 | 
			
		||||
                    label: isFileCollection ? 'preview' : 'id',
 | 
			
		||||
                    label: 'preview',
 | 
			
		||||
                    value: 'id',
 | 
			
		||||
                  }
 | 
			
		||||
                : undefined,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user