import { tag, h, WeElement, extractClass } from 'omi' import * as css from './index.scss' import '../icon' //@ts-ignore import '../theme.ts' interface Props { dot?: boolean, content?: string, x?: number, y?: number } interface Data { } @tag('m-badge') export default class Badge extends WeElement{ static css = css static defaultProps = { x: 0, y: 0 } static propTypes = { dot: Boolean, content: String, x: Number, y: Number } installed() { } uninstall() { } render(props) { if (props.content) { return
{props.children ? props.children[0] : } {props.content}
} if (props.dot) { return (
{props.children ? props.children[0] : }
) } return
{props.children ? props.children[0] : }
} }