import { Component, VNode } from 'vue';
type HTMLString = string;
export type textSizeType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'small' | 'default' | 'large';
export interface TextProps {
/**
* 渲染的html标签, 大小为h1~h6是会设置为对应的标签
*/
tag?: string;
/**
* 文字提示, 为true是会根据文件截断自动添加tooltip功能
*/
tooltip?: HTMLString;
/**
* 文字对齐方式
*/
align?: 'left' | 'center' | 'right';
/**
* 字体粗细
*/
weight?: 'light' | 'medium' | 'bold';
/**
* 文字颜色
*/
color?: 'primary' | 'warning' | 'error' | 'info' | 'text-primary' | 'text-secondary' | 'text-disabled' | 'text-regular';
/**
* 字体大小
* @type {string}}
*/
size?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'small' | 'default' | 'large';
/**
* 文字溢出是否截断
*/
truncated?: boolean;
/**
* 文字换几行后截断
*/
lineClamp?: number;
/**
* 前置icon
*/
beforeIcon?: string | Component;
/**
* 后置icon
*/
afterIcon?: string | Component;
/**
* cope 功能
*/
copyable?: boolean | string;
/**
* truncated 模式下的外部容器的类名
*/
wrapperClass?: string;
}
export interface TextSlots {
before: () => VNode;
default: () => VNode;
after: () => VNode;
}
export {};