feat(Icon): add dot prop (#4425)

This commit is contained in:
neverland
2019-09-11 14:43:54 +08:00
committed by GitHub
parent e69e3d349a
commit 21d5127fd7
16 changed files with 70 additions and 26 deletions
+3 -1
View File
@@ -8,6 +8,7 @@ import { CreateElement, RenderContext } from 'vue/types';
import { DefaultSlots } from '../utils/types';
export type IconProps = {
dot?: boolean;
tag: keyof HTMLElementTagNameMap | string;
name: string;
size?: string | number;
@@ -47,12 +48,13 @@ function Icon(
{imageIcon && (
<Image class={bem('image')} fit="contain" src={props.name} showLoading={false} />
)}
<Info info={props.info} />
<Info dot={props.dot} info={props.info} />
</props.tag>
);
}
Icon.props = {
dot: Boolean,
name: String,
size: [Number, String],
info: [Number, String],