import { VNode } from 'vue' ; import { CreateElement , UnknowField } from '../../types' ; export const Field = { renderMessages ( h , field , nodes , renderAtTop = false ) { field . messages . forEach ( ( { text , type = 3 } ) => { const messageNode = h ( field . descriptor . components . get ( 'message' ) , { props : { text , type } } , text ) ; if ( renderAtTop ) { nodes . unshift ( messageNode ) ; } else { nodes . push ( messageNode ) ; } } ) ; } } ;