@arco-vue-pro-components/pro-components
Version:
基于@arco-design/web-vue组件的高级组件,包括pro-table
406 lines (405 loc) • 10.9 kB
TypeScript
import { PropType } from 'vue';
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
/**
* @zh 是否使用 swr 来缓存 缓存可能导致数据更新不及时,请谨慎使用,尤其是页面中多个组件 name 相同
* @en Whether to open request by keyword search
* @defaultValue false
*/
cacheForSwr: {
type: BooleanConstructor;
default: boolean;
};
columnKey: {
type: StringConstructor;
default: string;
};
/**
* @zh 是否开启 request 远程搜索
* @en Whether to open request by keyword search
* @defaultValue false
*/
requestSearch: {
type: BooleanConstructor;
default: boolean;
};
mode: {
type: PropType<"read" | undefined>;
default: undefined;
};
/**
* @zh 是否开启多选模式(多选模式默认开启搜索)
* @en Whether to open multi-select mode (The search is turned on by default in the multi-select mode)
* @defaultValue undefined
*/
multiple: {
type: BooleanConstructor;
default: undefined;
};
/**
* @zh 绑定值
* @en Value
*/
modelValue: {
type: PropType<string | number | Record<string, any> | (string | number | Record<string, any>)[]>;
};
/**
* @zh 自定义值中不存在的选项
* @en Options that do not exist in custom values
* @defaultValue false
*/
fallbackOption: {
type: BooleanConstructor[];
default: boolean;
};
/**
* @zh 默认值(非受控模式)
* @en Default value (uncontrolled mode)
* @defaultValue '' \| []
*/
defaultValue: {
type: PropType<string | number | Record<string, any> | (string | number | Record<string, any>)[]>;
default: (props: Record<string, any>) => "" | never[];
};
/**
* @zh 占位符
* @en Placeholder
*/
placeholder: StringConstructor;
/**
* @zh 是否显示输入框的边框
* @en Whether to display the border of the input box
* @defaultValue true
*/
bordered: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh 是否禁用
* @en Whether to disable
* @defaultValue false
*/
disabled: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh 是否为错误状态
* @en Whether it is an error state
* @defaultValue false
*/
error: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh 选项数据
* @en Option data
* @defaultValue []
*/
options: {
type: PropType<any[]>;
default: () => never[];
};
/**
* @zh 用于确定选项键值的属性名
* @en Used to determine the option key value attribute name
* @defaultValue 'value'
*/
valueKey: {
type: StringConstructor;
default: string;
};
/**
* @zh 选择框的大小
* @en The size of the select
* @values 'mini','small','medium','large'
* @defaultValue 'medium'
*/
size: {
type: PropType<"mini" | "small" | "medium" | "large">;
};
/**
* @zh 触发搜索事件的延迟时间
* @en Delay time to trigger search event
* @defaultValue 500
*/
searchDelay: {
type: NumberConstructor;
default: number;
};
/**
* @zh label 字段名
* @en label field name
* @defaultValue 'label'
*/
labelKey: {
type: StringConstructor;
default: string;
};
/**
* @zh 是否显示清除按钮
* @en Whether the Clear button is displayed
* @defaultValue true
*/
allowClear: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh 是否可以搜索
* @en Whether can search
* @defaultValue true
*/
allowSearch: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh 请求数据
* @en request data
* @param {string | undefined} keyword
* @returns Promise<any[]>
*/
request: {
type: PropType<(keyword: string | undefined) => Promise<any[]>>;
};
/**
* @zh 多选模式下,最多显示的标签数量。0 表示不限制
* @en In multi-select mode, the maximum number of labels displayed. 0 means unlimited
* @defaultValue 0
*/
maxTagCount: {
type: NumberConstructor;
default: number;
};
/**
* @zh 触发change时是否返回选中的option
* @en Whether the selected option is returned when change is triggered
* @defaultValue false
*/
valueOption: {
type: BooleanConstructor;
default: boolean;
};
}>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
/**
* @zh 更新v-model值
* @en Triggered when value changes
* @param {any} value
*/
'update:modelValue': (value: any) => true;
/**
* @zh 更新时触发
* @en Triggered when value changes
* @param {any} value
* @param {Record<string, any>} option
*/
change: (value: any, option?: any[] | Record<string, any> | undefined) => true;
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
/**
* @zh 是否使用 swr 来缓存 缓存可能导致数据更新不及时,请谨慎使用,尤其是页面中多个组件 name 相同
* @en Whether to open request by keyword search
* @defaultValue false
*/
cacheForSwr: {
type: BooleanConstructor;
default: boolean;
};
columnKey: {
type: StringConstructor;
default: string;
};
/**
* @zh 是否开启 request 远程搜索
* @en Whether to open request by keyword search
* @defaultValue false
*/
requestSearch: {
type: BooleanConstructor;
default: boolean;
};
mode: {
type: PropType<"read" | undefined>;
default: undefined;
};
/**
* @zh 是否开启多选模式(多选模式默认开启搜索)
* @en Whether to open multi-select mode (The search is turned on by default in the multi-select mode)
* @defaultValue undefined
*/
multiple: {
type: BooleanConstructor;
default: undefined;
};
/**
* @zh 绑定值
* @en Value
*/
modelValue: {
type: PropType<string | number | Record<string, any> | (string | number | Record<string, any>)[]>;
};
/**
* @zh 自定义值中不存在的选项
* @en Options that do not exist in custom values
* @defaultValue false
*/
fallbackOption: {
type: BooleanConstructor[];
default: boolean;
};
/**
* @zh 默认值(非受控模式)
* @en Default value (uncontrolled mode)
* @defaultValue '' \| []
*/
defaultValue: {
type: PropType<string | number | Record<string, any> | (string | number | Record<string, any>)[]>;
default: (props: Record<string, any>) => "" | never[];
};
/**
* @zh 占位符
* @en Placeholder
*/
placeholder: StringConstructor;
/**
* @zh 是否显示输入框的边框
* @en Whether to display the border of the input box
* @defaultValue true
*/
bordered: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh 是否禁用
* @en Whether to disable
* @defaultValue false
*/
disabled: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh 是否为错误状态
* @en Whether it is an error state
* @defaultValue false
*/
error: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh 选项数据
* @en Option data
* @defaultValue []
*/
options: {
type: PropType<any[]>;
default: () => never[];
};
/**
* @zh 用于确定选项键值的属性名
* @en Used to determine the option key value attribute name
* @defaultValue 'value'
*/
valueKey: {
type: StringConstructor;
default: string;
};
/**
* @zh 选择框的大小
* @en The size of the select
* @values 'mini','small','medium','large'
* @defaultValue 'medium'
*/
size: {
type: PropType<"mini" | "small" | "medium" | "large">;
};
/**
* @zh 触发搜索事件的延迟时间
* @en Delay time to trigger search event
* @defaultValue 500
*/
searchDelay: {
type: NumberConstructor;
default: number;
};
/**
* @zh label 字段名
* @en label field name
* @defaultValue 'label'
*/
labelKey: {
type: StringConstructor;
default: string;
};
/**
* @zh 是否显示清除按钮
* @en Whether the Clear button is displayed
* @defaultValue true
*/
allowClear: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh 是否可以搜索
* @en Whether can search
* @defaultValue true
*/
allowSearch: {
type: BooleanConstructor;
default: boolean;
};
/**
* @zh 请求数据
* @en request data
* @param {string | undefined} keyword
* @returns Promise<any[]>
*/
request: {
type: PropType<(keyword: string | undefined) => Promise<any[]>>;
};
/**
* @zh 多选模式下,最多显示的标签数量。0 表示不限制
* @en In multi-select mode, the maximum number of labels displayed. 0 means unlimited
* @defaultValue 0
*/
maxTagCount: {
type: NumberConstructor;
default: number;
};
/**
* @zh 触发change时是否返回选中的option
* @en Whether the selected option is returned when change is triggered
* @defaultValue false
*/
valueOption: {
type: BooleanConstructor;
default: boolean;
};
}>> & Readonly<{
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
onChange?: ((value: any, option?: any[] | Record<string, any> | undefined) => any) | undefined;
}>, {
defaultValue: string | number | Record<string, any> | (string | number | Record<string, any>)[];
error: boolean;
labelKey: string;
valueKey: string;
mode: "read" | undefined;
cacheForSwr: boolean;
columnKey: string;
requestSearch: boolean;
multiple: boolean;
fallbackOption: boolean;
bordered: boolean;
disabled: boolean;
options: any[];
searchDelay: number;
allowClear: boolean;
allowSearch: boolean;
maxTagCount: number;
valueOption: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;