@minto-ai/mt-ui
Version:
UI组件库
117 lines (116 loc) • 3.04 kB
TypeScript
import { ExtractPropTypes, PropType } from 'vue';
declare const infiniteScrollProps: {
/**
* 绑定最终的列表渲染变量(页面data中声明的值),当列表数据改变时,所绑定的变量会跟着改变
*/
readonly modelValue: {
readonly type: ArrayConstructor;
readonly default: () => never[];
};
/**
* 滚动区域高度
*/
readonly height: {
readonly type: PropType<number | string>;
readonly validator: (value: number | string) => boolean;
readonly default: "100%";
};
/**
* 默认页码
*/
readonly upScrollPageNum: {
readonly type: NumberConstructor;
readonly default: 1;
};
/**
* 默认每页加载数量
*/
readonly upScrollPageSize: {
readonly type: NumberConstructor;
readonly default: 10;
};
/**
* 是否开启加载更多数据
*/
readonly upScrollEnabled: {
readonly type: BooleanConstructor;
readonly default: true;
};
/**
* 是否立即上拉加载
*/
readonly upScrollImmediate: {
readonly type: BooleanConstructor;
readonly default: true;
};
/**
* 滚动节流时延,单位为ms
*/
readonly scrollEventDelay: {
readonly type: NumberConstructor;
readonly default: 30;
};
/**
* 上拉加载的阈值
*/
readonly upScrollDistance: {
readonly type: NumberConstructor;
readonly default: 75;
};
/**
* 当没有更多数据且分页数组长度少于这个值时,隐藏没有更多
*/
readonly hideNoMoreByLimit: {
readonly type: NumberConstructor;
readonly default: 5;
};
/**
* 滑动到底部"加载中"文字
*/
readonly loadingMoreLoadingText: {
readonly type: StringConstructor;
readonly default: "加载中...";
};
/**
* 滑动到底部"没有更多"文字
*/
readonly loadingMoreNoMoreText: {
readonly type: StringConstructor;
readonly default: "没有更多了";
};
/**
* 空数据图描述文字
*/
readonly emptyText: {
readonly type: StringConstructor;
readonly default: "没有数据哦~";
};
/**
* 空数据图图片地址
*/
readonly emptyImg: {
readonly type: StringConstructor;
readonly default: "";
};
/**
* 空数据图图片宽度
*/
readonly emptyImageWidth: {
readonly type: PropType<number | string>;
readonly validator: (value: number | string) => boolean;
readonly default: 200;
};
readonly queryMinDelay: {
readonly type: NumberConstructor;
readonly default: 0;
};
};
declare enum UpScrollStatusEnum {
DEFAULT = 0,
LOADING = 1,
NO_MORE = 2,
EMPTY = 3,
FAIL = 4
}
export type InfiniteScrollProps = ExtractPropTypes<typeof infiniteScrollProps>;
export { infiniteScrollProps, UpScrollStatusEnum };