返回博客列表

v-ui-pro.d.ts

2026-01-29
2 min read
v-ui-pro

import {TableColumnData} from "@arco-design/web-vue";

export type FormType = 'input' | 'input-number' | 'data' | 'slot' | 'switch'
    | 'date-picker' | 'month-picker' | 'year-picker' | 'quarter-picker' | 'week-picker' | 'select';

export interface VOption {
    label: string;
    value: string;
}

export type StatusType = 'success' | 'info' | 'warning' | 'error';

export interface StatusItem {
    label: string;
    slotName?: string;
    count: number;
    type: string;
    trend?: string;
}

export interface FormSearchProps {
    modelValue: Record<string, any>;
    loading: boolean;
    formItemAttributes: FormItemAttribute[]
}

export interface FormItemAttribute {

    /**
     * 属性名
     */
    field: string;

    /**
     * 默认值:当有默认值,表单操作重置后默认值不会清除
     */
    defaultValue?: any;

    /**
     * 属性中文名
     */
    label: string;

    /**
     * 类型
     */
    type: FormType;

    /**
     * 组件配置
     */
    options?: VOption[];

    attrs?: object;
}


export interface RouteJumpAction {
    /**
     * 向哪里跳转,如果是 http开头则认为是外链
     */
    jumpTo?: string;

    /**
     * 跳转时候的 query 参数名
     */
    queryName?: string;
}


type MoreTrigger = 'hover' | 'click';

export interface MoreAction {
    /**
     * 更多信息
     */
    moreContent: string;
    /**
     * 触发的方式,默认用hover触发
     */
    trigger?: MoreTrigger | 'hover';
    /**
     * 如果是click触发,按钮文字
     */
    clickText?: string | '查看详情';
}

export interface TableColumn extends TableColumnData {

    /**
     * 是否跳转
     */
    jump?: RouteJumpAction,

    /**
     * 是否加粗
     */
    bold?: boolean;

    /**
     * 更多信息
     */
    more?: MoreAction;

    /**
     * 后缀
     */
    suffix?: string;

    /**
     * 前缀
     */
    prefix?: string;

    /**
     * 组件类型
     */
    componentType?: FormType;
}

返回博客列表
最后更新于 2026-01-29
想法或问题?在 GitHub Issue 下方参与讨论
去评论