default {Export Functional: to true, name: 'ElDivider', The props: { // set the dividing line direction Horizontal direction Boolean / Vertical Horizontal direction: { type: String, default: 'Horizontal', Validator (Val) { return [ 'Horizontal ',' Vertical '] the indexOf (Val) == -1;.! } }, the position // content-position disposed left dividing line copy of the String / right / Center Center ContentPosition: { type: String, default:' Center ' , Validator (Val) { .! return [ 'left', 'Center', 'right'] the indexOf (Val) == -1; } } }, render (h, context) { const $slots = context.slots(); const { direction, contentPosition } = context.props; return ( <div class={['el-divider', `el-divider--${direction}`]}> { $slots.default && direction !== 'vertical' ? <div class={['el-divider__text', `is-${contentPosition}`]}>{$slots.default}</div> : null } </div> ); } };