@dcloudio/uni-app-x 0.4.1 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types/native/AsyncApiResult.d.ts +6 -0
- package/types/native/UTSError.d.ts +3 -0
- package/types/native/UniError.d.ts +6 -2
- package/types/native/index.d.ts +1 -0
- package/types/uni/core/lib/interface.d.ts +0 -11
- package/types/uni/core/lib/route/interface.d.ts +2 -2
- package/types/uni/core/lib/ui/load-font-face/interface.d.ts +1 -5
- package/types/uni/core/lib/ui/page-scroll-to/interface.d.ts +4 -6
- package/types/uni/core/lib/ui/pull-down-refresh/interface.d.ts +2 -6
- package/types/uni/core/lib/ui/set-navigation-bar-color/interface.d.ts +1 -5
- package/types/uni/core/lib/ui/tab-bar/interface.d.ts +3 -7
package/package.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/// <reference path="./UTSError.d.ts" />
|
|
2
|
+
/// <reference path="./AsyncApiResult.d.ts" />
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
/**
|
|
5
|
+
* @package io.dcloud.uniapp
|
|
6
|
+
*/
|
|
7
|
+
declare class UniError extends UTSError implements AsyncApiResult {
|
|
4
8
|
constructor ();
|
|
5
9
|
constructor (message: string);
|
|
6
10
|
constructor (message: string, options: UTSJSONObject);
|
|
@@ -9,5 +13,5 @@ declare class UniError extends UTSError {
|
|
|
9
13
|
errSubject: string;
|
|
10
14
|
errCode: number;
|
|
11
15
|
errMsg: string;
|
|
12
|
-
data: any;
|
|
16
|
+
data: any | null;
|
|
13
17
|
}
|
package/types/native/index.d.ts
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
export interface AsyncApiResult {
|
|
2
|
-
errMsg: string
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
export interface AsyncApiSuccessResult extends AsyncApiResult {}
|
|
6
2
|
|
|
7
|
-
export interface UniError extends AsyncApiResult {
|
|
8
|
-
errCode: number
|
|
9
|
-
errSubject: string
|
|
10
|
-
data: any | null
|
|
11
|
-
cause: any | null
|
|
12
|
-
}
|
|
13
|
-
|
|
14
3
|
export type OnLaunchOptions = {
|
|
15
4
|
path: string
|
|
16
5
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AsyncApiSuccessResult } from '../interface'
|
|
2
2
|
|
|
3
3
|
export type NavigateTo = (options: NavigateToOptions) => void
|
|
4
4
|
/**
|
|
@@ -129,7 +129,7 @@ export type SwitchTabOptions = {
|
|
|
129
129
|
*/
|
|
130
130
|
complete?: SwitchTabCompleteCallback | null
|
|
131
131
|
}
|
|
132
|
-
export type NavigateBack = (options: NavigateBackOptions) => void
|
|
132
|
+
export type NavigateBack = (options: NavigateBackOptions | null) => void
|
|
133
133
|
export type NavigateBackSuccess = AsyncApiSuccessResult
|
|
134
134
|
type NavigateBackSuccessCallback = (result: NavigateBackSuccess) => void
|
|
135
135
|
export type NavigateBackFail = UniError
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AsyncApiResult,
|
|
3
|
-
AsyncApiSuccessResult,
|
|
4
|
-
UniError
|
|
5
|
-
} from '../../interface'
|
|
1
|
+
import { AsyncApiSuccessResult } from '../../interface'
|
|
6
2
|
|
|
7
3
|
export type PageScrollTo = (options: PageScrollToOptions) => void
|
|
8
4
|
export type PageScrollToSuccess = AsyncApiSuccessResult
|
|
@@ -10,7 +6,9 @@ export type PageScrollToSuccessCallback = (result: PageScrollToSuccess) => void
|
|
|
10
6
|
export type PageScrollToFail = UniError
|
|
11
7
|
export type PageScrollToFailCallback = (result: PageScrollToFail) => void
|
|
12
8
|
export type PageScrollToComplete = AsyncApiResult
|
|
13
|
-
export type PageScrollToCompleteCallback = (
|
|
9
|
+
export type PageScrollToCompleteCallback = (
|
|
10
|
+
result: PageScrollToComplete
|
|
11
|
+
) => void
|
|
14
12
|
export type PageScrollToOptions = {
|
|
15
13
|
/**
|
|
16
14
|
* 滚动到页面的目标位置
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AsyncApiResult,
|
|
3
|
-
AsyncApiSuccessResult,
|
|
4
|
-
UniError
|
|
5
|
-
} from '../../interface'
|
|
1
|
+
import { AsyncApiSuccessResult } from '../../interface'
|
|
6
2
|
|
|
7
3
|
export type StartPullDownRefresh = (
|
|
8
|
-
options: StartPullDownRefreshOptions
|
|
4
|
+
options: StartPullDownRefreshOptions | null
|
|
9
5
|
) => void
|
|
10
6
|
export type StartPullDownRefreshOptions = {
|
|
11
7
|
/**
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AsyncApiResult,
|
|
3
|
-
AsyncApiSuccessResult,
|
|
4
|
-
UniError
|
|
5
|
-
} from '../../interface'
|
|
1
|
+
import { AsyncApiSuccessResult } from '../../interface'
|
|
6
2
|
|
|
7
3
|
export type SetTabBarBadge = (options: SetTabBarBadgeOptions) => void
|
|
8
4
|
export type SetTabBarBadgeSuccess = AsyncApiSuccessResult
|
|
@@ -262,7 +258,7 @@ export type SetTabBarStyleOptions = {
|
|
|
262
258
|
complete?: SetTabBarStyleCompleteCallback
|
|
263
259
|
}
|
|
264
260
|
|
|
265
|
-
export type HideTabBar = (options: HideTabBarOptions) => void
|
|
261
|
+
export type HideTabBar = (options: HideTabBarOptions | null) => void
|
|
266
262
|
export type HideTabBarSuccess = AsyncApiSuccessResult
|
|
267
263
|
export type HideTabBarSuccessCallback = (result: HideTabBarSuccess) => void
|
|
268
264
|
export type HideTabBarFail = UniError
|
|
@@ -288,7 +284,7 @@ export type HideTabBarOptions = {
|
|
|
288
284
|
complete?: HideTabBarCompleteCallback
|
|
289
285
|
}
|
|
290
286
|
|
|
291
|
-
export type ShowTabBar = (options: ShowTabBarOptions) => void
|
|
287
|
+
export type ShowTabBar = (options: ShowTabBarOptions | null) => void
|
|
292
288
|
export type ShowTabBarSuccess = AsyncApiSuccessResult
|
|
293
289
|
export type ShowTabBarSuccessCallback = (result: ShowTabBarSuccess) => void
|
|
294
290
|
export type ShowTabBarFail = UniError
|