[improvement] Tag: optimize type definitions

This commit is contained in:
陈嘉涵 2019-05-04 16:45:10 +08:00
parent 681887d2bf
commit 47e75410a9
2 changed files with 7 additions and 3 deletions

View File

@ -10,7 +10,7 @@ import { DefaultSlots } from '../utils/use/sfc';
export type IconProps = {
tag: keyof HTMLElementTagNameMap | string;
name: string;
size?: string;
size?: string | number;
color?: string;
info?: string | number;
classPrefix: string;

View File

@ -6,9 +6,13 @@ import { RED, BLUE, GREEN, GRAY_DARK } from '../utils/color';
import { CreateElement, RenderContext } from 'vue/types';
import { DefaultSlots } from '../utils/use/sfc';
export type TagType = 'primary' | 'success' | 'danger';
export type TagSize = 'large' | 'medium';
export type TagProps = {
size?: string;
type?: string;
size?: TagSize;
type?: TagType;
mark?: boolean;
color?: string;
plain?: boolean;