项目概况

v-ui-pro.d.ts

2026-01-292 min read前端技术
v-ui-pro
text
1import {TableColumnData} from "@arco-design/web-vue"; 2 3export type FormType = 'input' | 'input-number' | 'data' | 'slot' | 'switch' 4 | 'date-picker' | 'month-picker' | 'year-picker' | 'quarter-picker' | 'week-picker' | 'select'; 5 6export interface VOption { 7 label: string; 8 value: string; 9} 10 11export type StatusType = 'success' | 'info' | 'warning' | 'error'; 12 13export interface StatusItem { 14 label: string; 15 slotName?: string; 16 count: number; 17 type: string; 18 trend?: string; 19} 20 21export interface FormSearchProps { 22 modelValue: Record<string, any>; 23 loading: boolean; 24 formItemAttributes: FormItemAttribute[] 25} 26 27export interface FormItemAttribute { 28 29 /** 30 * 属性名 31 */ 32 field: string; 33 34 /** 35 * 默认值:当有默认值,表单操作重置后默认值不会清除 36 */ 37 defaultValue?: any; 38 39 /** 40 * 属性中文名 41 */ 42 label: string; 43 44 /** 45 * 类型 46 */ 47 type: FormType; 48 49 /** 50 * 组件配置 51 */ 52 options?: VOption[]; 53 54 attrs?: object; 55} 56 57 58export interface RouteJumpAction { 59 /** 60 * 向哪里跳转,如果是 http开头则认为是外链 61 */ 62 jumpTo?: string; 63 64 /** 65 * 跳转时候的 query 参数名 66 */ 67 queryName?: string; 68} 69 70 71type MoreTrigger = 'hover' | 'click'; 72 73export interface MoreAction { 74 /** 75 * 更多信息 76 */ 77 moreContent: string; 78 /** 79 * 触发的方式,默认用hover触发 80 */ 81 trigger?: MoreTrigger | 'hover'; 82 /** 83 * 如果是click触发,按钮文字 84 */ 85 clickText?: string | '查看详情'; 86} 87 88export interface TableColumn extends TableColumnData { 89 90 /** 91 * 是否跳转 92 */ 93 jump?: RouteJumpAction, 94 95 /** 96 * 是否加粗 97 */ 98 bold?: boolean; 99 100 /** 101 * 更多信息 102 */ 103 more?: MoreAction; 104 105 /** 106 * 后缀 107 */ 108 suffix?: string; 109 110 /** 111 * 前缀 112 */ 113 prefix?: string; 114 115 /** 116 * 组件类型 117 */ 118 componentType?: FormType; 119} 120