import { use, noop } from '../utils'; import Icon from '../icon'; const [sfc, bem] = use('nav-bar'); export default sfc({ functional: true, props: { title: String, fixed: Boolean, leftText: String, rightText: String, leftArrow: Boolean, border: { type: Boolean, default: true }, zIndex: { type: Number, default: 1 } }, render(h, context, inherit) { const { props, listeners } = context; const slots = context.slots(); return (
{slots.left || [ props.leftArrow && , props.leftText && {props.leftText} ]}
{slots.title || props.title}
{slots.right || (props.rightText && {props.rightText})}
); } });