import { tag, WeElement, h, extractClass } from 'omi' import * as css from './index.scss' //@ts-ignore import '../theme.ts' interface Props { } interface Data { } @tag('m-breadcrumb') export default class Breadcrumb extends WeElement{ static css = css static defaultProps = { split: '/' } static propTypes = { items: Object, split: String } render(props) { const items = [] props.items.forEach((item, index) => { if (index !== props.items.length - 1) { items.push(,
  • {props.split}
  • ) } else { items.push(
  • {item.icon && {item.icon}}{item.text}
  • ) } }) return ( ) } }