Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SmileZXLee committed May 10, 2024
2 parents 5e6241b + 8851f9b commit ca1bc42
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
11 changes: 5 additions & 6 deletions demo/z-paging-demo/uni_modules/z-paging/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
declare global {

type Arrayable<T> = T | T[];
type _Arrayable<T> = T | T[];

declare global {
/**
* z-paging返回数据
*
Expand Down Expand Up @@ -40,7 +39,7 @@ declare global {
/**
* z-paging组件实例
*/
interface ZPagingInstance<T> {
interface ZPagingInstance<T = any> {
/**
* 重新加载分页数据,pageNo恢复为默认值,相当于下拉刷新的效果
*
Expand Down Expand Up @@ -128,7 +127,7 @@ declare global {
* @param [scrollToTop=true] 是否滚动到顶部,不填默认为true
* @param [animate=true] 是否使用动画滚动到顶部
*/
addDataFromTop: (data: Arrayable<T>, scrollToTop?: boolean, animate?: boolean) => void;
addDataFromTop: (data: _Arrayable<T>, scrollToTop?: boolean, animate?: boolean) => void;

/**
* 【不推荐】重新设置列表数据,调用此方法不会影响pageNo和pageSize,也不会触发请求
Expand Down Expand Up @@ -247,7 +246,7 @@ declare global {
* @param [scrollToBottom=true] 是否滚动到底部
* @param [animate=true] 是否使用动画滚动到底部
*/
addChatRecordData: (data: Arrayable<T>, scrollToBottom?: boolean, animate?: boolean) => void;
addChatRecordData: (data: _Arrayable<T>, scrollToBottom?: boolean, animate?: boolean) => void;

/**
* 滚动到顶部
Expand Down
11 changes: 5 additions & 6 deletions demo/z-paging-vue3-demo/uni_modules/z-paging/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
declare global {

type Arrayable<T> = T | T[];
type _Arrayable<T> = T | T[];

declare global {
/**
* z-paging返回数据
*
Expand Down Expand Up @@ -40,7 +39,7 @@ declare global {
/**
* z-paging组件实例
*/
interface ZPagingInstance<T> {
interface ZPagingInstance<T = any> {
/**
* 重新加载分页数据,pageNo恢复为默认值,相当于下拉刷新的效果
*
Expand Down Expand Up @@ -128,7 +127,7 @@ declare global {
* @param [scrollToTop=true] 是否滚动到顶部,不填默认为true
* @param [animate=true] 是否使用动画滚动到顶部
*/
addDataFromTop: (data: Arrayable<T>, scrollToTop?: boolean, animate?: boolean) => void;
addDataFromTop: (data: _Arrayable<T>, scrollToTop?: boolean, animate?: boolean) => void;

/**
* 【不推荐】重新设置列表数据,调用此方法不会影响pageNo和pageSize,也不会触发请求
Expand Down Expand Up @@ -247,7 +246,7 @@ declare global {
* @param [scrollToBottom=true] 是否滚动到底部
* @param [animate=true] 是否使用动画滚动到底部
*/
addChatRecordData: (data: Arrayable<T>, scrollToBottom?: boolean, animate?: boolean) => void;
addChatRecordData: (data: _Arrayable<T>, scrollToBottom?: boolean, animate?: boolean) => void;

/**
* 滚动到顶部
Expand Down
11 changes: 5 additions & 6 deletions z-paging/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
declare global {

type Arrayable<T> = T | T[];
type _Arrayable<T> = T | T[];

declare global {
/**
* z-paging返回数据
*
Expand Down Expand Up @@ -40,7 +39,7 @@ declare global {
/**
* z-paging组件实例
*/
interface ZPagingInstance<T> {
interface ZPagingInstance<T = any> {
/**
* 重新加载分页数据,pageNo恢复为默认值,相当于下拉刷新的效果
*
Expand Down Expand Up @@ -128,7 +127,7 @@ declare global {
* @param [scrollToTop=true] 是否滚动到顶部,不填默认为true
* @param [animate=true] 是否使用动画滚动到顶部
*/
addDataFromTop: (data: Arrayable<T>, scrollToTop?: boolean, animate?: boolean) => void;
addDataFromTop: (data: _Arrayable<T>, scrollToTop?: boolean, animate?: boolean) => void;

/**
* 【不推荐】重新设置列表数据,调用此方法不会影响pageNo和pageSize,也不会触发请求
Expand Down Expand Up @@ -247,7 +246,7 @@ declare global {
* @param [scrollToBottom=true] 是否滚动到底部
* @param [animate=true] 是否使用动画滚动到底部
*/
addChatRecordData: (data: Arrayable<T>, scrollToBottom?: boolean, animate?: boolean) => void;
addChatRecordData: (data: _Arrayable<T>, scrollToBottom?: boolean, animate?: boolean) => void;

/**
* 滚动到顶部
Expand Down

0 comments on commit ca1bc42

Please sign in to comment.