@dcloudio/uni-app-x 0.7.20 → 0.7.22
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/{IUniObjectElement.d.ts → IUniNativeViewElement.d.ts} +21 -21
- package/types/native/UniPageManager.d.ts +8 -1
- package/types/native/global.d.ts +12 -12
- package/types/native/index.d.ts +1 -1
- package/types/uni/uts-plugin-api/global.d.ts +1 -1
- package/types/uni/uts-plugin-api/index.d.ts +1 -1
- package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/global.d.ts +2 -0
- package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/interface.d.ts +69 -1
- package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/interface.d.ts +3 -4
package/package.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { UniElement } from "./IUniElement"
|
|
2
2
|
import { UniCustomEvent } from "./UniCustomEvent"
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* native-view 元素对象
|
|
5
5
|
* @package io.dcloud.uniapp.runtime
|
|
6
6
|
* @uniPlatform {
|
|
7
7
|
* "app": {
|
|
8
8
|
* "android": {
|
|
9
9
|
* "osVer": "5.0",
|
|
10
10
|
* "uniVer": "x",
|
|
11
|
-
* "unixVer": "4.
|
|
11
|
+
* "unixVer": "4.26"
|
|
12
12
|
* },
|
|
13
13
|
* "ios": {
|
|
14
14
|
* "osVer": "12.0",
|
|
15
15
|
* "uniVer": "x",
|
|
16
|
-
* "unixVer": "4.
|
|
16
|
+
* "unixVer": "4.26"
|
|
17
17
|
* }
|
|
18
18
|
* }
|
|
19
19
|
* }
|
|
20
20
|
*/
|
|
21
|
-
export interface
|
|
21
|
+
export interface UniNativeViewElement extends UniElement {
|
|
22
22
|
/**
|
|
23
23
|
* 绑定安卓平台原生view
|
|
24
24
|
* @uniPlatform {
|
|
@@ -26,7 +26,7 @@ export interface UniObjectElement extends UniElement {
|
|
|
26
26
|
* "android": {
|
|
27
27
|
* "osVer": "5.0",
|
|
28
28
|
* "uniVer": "x",
|
|
29
|
-
* "unixVer": "4.
|
|
29
|
+
* "unixVer": "4.26"
|
|
30
30
|
* },
|
|
31
31
|
* "ios": {
|
|
32
32
|
* "osVer": "12.0",
|
|
@@ -49,7 +49,7 @@ export interface UniObjectElement extends UniElement {
|
|
|
49
49
|
* "ios": {
|
|
50
50
|
* "osVer": "12.0",
|
|
51
51
|
* "uniVer": "x",
|
|
52
|
-
* "unixVer": "4.
|
|
52
|
+
* "unixVer": "4.26"
|
|
53
53
|
* }
|
|
54
54
|
* }
|
|
55
55
|
* }
|
|
@@ -57,30 +57,30 @@ export interface UniObjectElement extends UniElement {
|
|
|
57
57
|
bindIOSView(view: UIView): void
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
export let
|
|
61
|
-
prototype:
|
|
62
|
-
new():
|
|
60
|
+
export let UniNativeViewElement: {
|
|
61
|
+
prototype: UniNativeViewElement;
|
|
62
|
+
new(): UniNativeViewElement;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
66
|
+
* native-view自定义事件
|
|
67
67
|
* @package io.dcloud.uniapp.runtime
|
|
68
68
|
* @uniPlatform {
|
|
69
69
|
* "app": {
|
|
70
70
|
* "android": {
|
|
71
71
|
* "osVer": "5.0",
|
|
72
72
|
* "uniVer": "x",
|
|
73
|
-
* "unixVer": "4.
|
|
73
|
+
* "unixVer": "4.26"
|
|
74
74
|
* },
|
|
75
75
|
* "ios": {
|
|
76
76
|
* "osVer": "12.0",
|
|
77
77
|
* "uniVer": "x",
|
|
78
|
-
* "unixVer": "4.
|
|
78
|
+
* "unixVer": "4.26"
|
|
79
79
|
* }
|
|
80
80
|
* }
|
|
81
81
|
* }
|
|
82
82
|
*/
|
|
83
|
-
export class
|
|
83
|
+
export class UniNativeViewEvent extends UniCustomEvent<UTSJSONObject> {
|
|
84
84
|
/**
|
|
85
85
|
* 事件类型
|
|
86
86
|
*/
|
|
@@ -94,31 +94,31 @@ export class UniObjectCustomEvent extends UniCustomEvent<UTSJSONObject> {
|
|
|
94
94
|
/**
|
|
95
95
|
* @package io.dcloud.uniapp.runtime
|
|
96
96
|
*/
|
|
97
|
-
export class
|
|
98
|
-
readonly element :
|
|
97
|
+
export class UniNativeViewInitEventDetail {
|
|
98
|
+
readonly element : UniNativeViewElement
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
|
-
*
|
|
102
|
+
* native-view 组件 init事件event
|
|
103
103
|
* @package io.dcloud.uniapp.runtime
|
|
104
104
|
* @uniPlatform {
|
|
105
105
|
* "app": {
|
|
106
106
|
* "android": {
|
|
107
107
|
* "osVer": "5.0",
|
|
108
108
|
* "uniVer": "x",
|
|
109
|
-
* "unixVer": "4.
|
|
109
|
+
* "unixVer": "4.26"
|
|
110
110
|
* },
|
|
111
111
|
* "ios": {
|
|
112
112
|
* "osVer": "12.0",
|
|
113
113
|
* "uniVer": "x",
|
|
114
|
-
* "unixVer": "4.
|
|
114
|
+
* "unixVer": "4.26"
|
|
115
115
|
* }
|
|
116
116
|
* }
|
|
117
117
|
* }
|
|
118
118
|
*/
|
|
119
|
-
export class
|
|
120
|
-
detail :
|
|
119
|
+
export class UniNativeViewInitEvent extends UniCustomEvent<UniNativeViewInitEventDetail> {
|
|
120
|
+
detail : UniNativeViewInitEventDetail
|
|
121
121
|
type: string
|
|
122
122
|
|
|
123
|
-
constructor(type: string, detail:
|
|
123
|
+
constructor(type: string, detail: UniNativeViewInitEventDetail)
|
|
124
124
|
}
|
|
@@ -12,7 +12,14 @@ export interface UniPageManager {
|
|
|
12
12
|
pageOptions?: Map<string, any> | null
|
|
13
13
|
): UniNativePage
|
|
14
14
|
|
|
15
|
-
createDialogPage(
|
|
15
|
+
createDialogPage(
|
|
16
|
+
pageUrl: string,
|
|
17
|
+
pageId: string,
|
|
18
|
+
pageStyle: Map<string, any | null>,
|
|
19
|
+
parentPage?: UniNativePage | null,
|
|
20
|
+
dialogOptions?: Map<string, any | null> | null,
|
|
21
|
+
pageOptions?: Map<string, any> | null
|
|
22
|
+
): UniNativePage
|
|
16
23
|
|
|
17
24
|
findPageById(pageId: string): UniNativePage | null
|
|
18
25
|
}
|
package/types/native/global.d.ts
CHANGED
|
@@ -166,10 +166,10 @@ import {
|
|
|
166
166
|
INodeData as INodeDataOrigin,
|
|
167
167
|
NativeLoadFontFaceFail as NativeLoadFontFaceFailOrigin,
|
|
168
168
|
NativeLoadFontFaceOptions as NativeLoadFontFaceOptionsOrigin,
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
169
|
+
UniNativeViewElement as UniNativeViewElementOrigin,
|
|
170
|
+
UniNativeViewEvent as UniNativeViewEventOrigin,
|
|
171
|
+
UniNativeViewInitEventDetail as UniNativeViewInitEventDetailOrigin,
|
|
172
|
+
UniNativeViewInitEvent as UniNativeViewInitEventOrigin,
|
|
173
173
|
IUniForm as IUniFormOrigin,
|
|
174
174
|
IUniError as IUniErrorOrigin,
|
|
175
175
|
UniElement as UniElementOrigin,
|
|
@@ -522,14 +522,14 @@ declare global {
|
|
|
522
522
|
type NativeLoadFontFaceFail = NativeLoadFontFaceFailOrigin
|
|
523
523
|
const NativeLoadFontFaceOptions: typeof NativeLoadFontFaceOptionsOrigin
|
|
524
524
|
type NativeLoadFontFaceOptions = NativeLoadFontFaceOptionsOrigin
|
|
525
|
-
const
|
|
526
|
-
const
|
|
527
|
-
type
|
|
528
|
-
const
|
|
529
|
-
type
|
|
530
|
-
const
|
|
531
|
-
type
|
|
532
|
-
type
|
|
525
|
+
const UniNativeViewElement: typeof UniNativeViewElementOrigin
|
|
526
|
+
const UniNativeViewEvent: typeof UniNativeViewEventOrigin
|
|
527
|
+
type UniNativeViewEvent = UniNativeViewEventOrigin
|
|
528
|
+
const UniNativeViewInitEventDetail: typeof UniNativeViewInitEventDetailOrigin
|
|
529
|
+
type UniNativeViewInitEventDetail = UniNativeViewInitEventDetailOrigin
|
|
530
|
+
const UniNativeViewInitEvent: typeof UniNativeViewInitEventOrigin
|
|
531
|
+
type UniNativeViewInitEvent = UniNativeViewInitEventOrigin
|
|
532
|
+
type UniNativeViewElement = UniNativeViewElementOrigin
|
|
533
533
|
type IUniForm = IUniFormOrigin
|
|
534
534
|
type IUniError = IUniErrorOrigin
|
|
535
535
|
const UniElement: typeof UniElementOrigin
|
package/types/native/index.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ export * from './Path2D'
|
|
|
60
60
|
export * from './PageNode'
|
|
61
61
|
export * from './NodeData'
|
|
62
62
|
export * from './NativeLoadFontFaceOptions'
|
|
63
|
-
export * from './
|
|
63
|
+
export * from './IUniNativeViewElement'
|
|
64
64
|
export * from './IUniForm'
|
|
65
65
|
export * from './IUniError'
|
|
66
66
|
export * from './IUniElement'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference path='./lib/uni-websocket/utssdk/global.d.ts' />
|
|
2
2
|
/// <reference path='./lib/uni-virtualPayment/utssdk/global.d.ts' />
|
|
3
|
-
/// <reference path='./lib/uni-tabBar/utssdk/global.d.ts' />
|
|
4
3
|
/// <reference path='./lib/uni-theme/utssdk/global.d.ts' />
|
|
4
|
+
/// <reference path='./lib/uni-tabBar/utssdk/global.d.ts' />
|
|
5
5
|
/// <reference path='./lib/uni-storage/utssdk/global.d.ts' />
|
|
6
6
|
/// <reference path='./lib/uni-scanCode/utssdk/global.d.ts' />
|
|
7
7
|
/// <reference path='./lib/uni-rpx2px/utssdk/global.d.ts' />
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from './lib/uni-websocket/utssdk'
|
|
2
2
|
export * from './lib/uni-virtualPayment/utssdk'
|
|
3
|
-
export * from './lib/uni-tabBar/utssdk'
|
|
4
3
|
export * from './lib/uni-theme/utssdk'
|
|
4
|
+
export * from './lib/uni-tabBar/utssdk'
|
|
5
5
|
export * from './lib/uni-storage/utssdk'
|
|
6
6
|
export * from './lib/uni-scanCode/utssdk'
|
|
7
7
|
export * from './lib/uni-rpx2px/utssdk'
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
CreateCanvasContextAsyncSuccessCallback as CreateCanvasContextAsyncSuccessCallbackOrigin,
|
|
4
4
|
CreateCanvasContextAsyncFailCallback as CreateCanvasContextAsyncFailCallbackOrigin,
|
|
5
5
|
CreateCanvasContextAsyncCompleteCallback as CreateCanvasContextAsyncCompleteCallbackOrigin,
|
|
6
|
+
UniRequestAnimationFrameCallback as UniRequestAnimationFrameCallbackOrigin,
|
|
6
7
|
CanvasContextToBlobCallback as CanvasContextToBlobCallbackOrigin,
|
|
7
8
|
CanvasContext as CanvasContextOrigin,
|
|
8
9
|
CreateCanvasContextAsyncOptions as CreateCanvasContextAsyncOptionsOrigin,
|
|
@@ -13,6 +14,7 @@ declare global {
|
|
|
13
14
|
type CreateCanvasContextAsyncSuccessCallback = CreateCanvasContextAsyncSuccessCallbackOrigin
|
|
14
15
|
type CreateCanvasContextAsyncFailCallback = CreateCanvasContextAsyncFailCallbackOrigin
|
|
15
16
|
type CreateCanvasContextAsyncCompleteCallback = CreateCanvasContextAsyncCompleteCallbackOrigin
|
|
17
|
+
type UniRequestAnimationFrameCallback = UniRequestAnimationFrameCallbackOrigin
|
|
16
18
|
type CanvasContextToBlobCallback = CanvasContextToBlobCallbackOrigin
|
|
17
19
|
type CanvasContext = CanvasContextOrigin
|
|
18
20
|
type CreateCanvasContextAsyncOptions = CreateCanvasContextAsyncOptionsOrigin
|
|
@@ -2,6 +2,8 @@ export type CreateCanvasContextAsyncSuccessCallback = (context: CanvasContext) =
|
|
|
2
2
|
export type CreateCanvasContextAsyncFailCallback = (error: UniError) => void
|
|
3
3
|
export type CreateCanvasContextAsyncCompleteCallback = () => void
|
|
4
4
|
|
|
5
|
+
export type UniRequestAnimationFrameCallback = (task: number) => void
|
|
6
|
+
|
|
5
7
|
// #ifdef WEB
|
|
6
8
|
export type CanvasContextToBlobCallback = (blob: Blob) => void
|
|
7
9
|
// #endif
|
|
@@ -9,7 +11,7 @@ export type CanvasContextToBlobCallback = (blob: Blob) => void
|
|
|
9
11
|
export interface CanvasContext {
|
|
10
12
|
getContext(type: '2d'): CanvasRenderingContext2D | null
|
|
11
13
|
|
|
12
|
-
// #ifdef WEB
|
|
14
|
+
// #ifdef WEB
|
|
13
15
|
/**
|
|
14
16
|
* 创造 Blob 对象
|
|
15
17
|
* @uniPlatform {
|
|
@@ -121,6 +123,72 @@ export interface CanvasContext {
|
|
|
121
123
|
* }
|
|
122
124
|
*/
|
|
123
125
|
createImage(): Image
|
|
126
|
+
/**
|
|
127
|
+
* 返回一个包含图片展示的 data URI
|
|
128
|
+
* @uniPlatform {
|
|
129
|
+
* "app": {
|
|
130
|
+
* "android": {
|
|
131
|
+
* "osVer": "5.0",
|
|
132
|
+
* "uniVer": "x",
|
|
133
|
+
* "unixVer": "4.25"
|
|
134
|
+
* },
|
|
135
|
+
* "ios": {
|
|
136
|
+
* "osVer": "10.0",
|
|
137
|
+
* "uniVer": "x",
|
|
138
|
+
* "unixVer": "4.25"
|
|
139
|
+
* }
|
|
140
|
+
* },
|
|
141
|
+
* "web": {
|
|
142
|
+
* "uniVer": "x",
|
|
143
|
+
* "unixVer": "4.25"
|
|
144
|
+
* }
|
|
145
|
+
* }
|
|
146
|
+
*/
|
|
147
|
+
createPath2D(): Path2D
|
|
148
|
+
/**
|
|
149
|
+
* 在下一次重绘之前,调用用户提供的回调函数
|
|
150
|
+
* @uniPlatform {
|
|
151
|
+
* "app": {
|
|
152
|
+
* "android": {
|
|
153
|
+
* "osVer": "5.0",
|
|
154
|
+
* "uniVer": "x",
|
|
155
|
+
* "unixVer": "4.25"
|
|
156
|
+
* },
|
|
157
|
+
* "ios": {
|
|
158
|
+
* "osVer": "12.0",
|
|
159
|
+
* "uniVer": "x",
|
|
160
|
+
* "unixVer": "4.25"
|
|
161
|
+
* }
|
|
162
|
+
* },
|
|
163
|
+
* "web": {
|
|
164
|
+
* "uniVer": "x",
|
|
165
|
+
* "unixVer": "4.25"
|
|
166
|
+
* }
|
|
167
|
+
* }
|
|
168
|
+
*/
|
|
169
|
+
requestAnimationFrame(callback: UniRequestAnimationFrameCallback): number;
|
|
170
|
+
/**
|
|
171
|
+
* 取消一个先前通过调用 uni.requestAnimationFrame() 方法添加到计划中的动画帧请求
|
|
172
|
+
* @uniPlatform {
|
|
173
|
+
* "app": {
|
|
174
|
+
* "android": {
|
|
175
|
+
* "osVer": "5.0",
|
|
176
|
+
* "uniVer": "x",
|
|
177
|
+
* "unixVer": "4.25"
|
|
178
|
+
* },
|
|
179
|
+
* "ios": {
|
|
180
|
+
* "osVer": "12.0",
|
|
181
|
+
* "uniVer": "x",
|
|
182
|
+
* "unixVer": "4.25"
|
|
183
|
+
* }
|
|
184
|
+
* },
|
|
185
|
+
* "web": {
|
|
186
|
+
* "uniVer": "x",
|
|
187
|
+
* "unixVer": "4.25"
|
|
188
|
+
* }
|
|
189
|
+
* }
|
|
190
|
+
*/
|
|
191
|
+
cancelAnimationFrame(taskId: number): void;
|
|
124
192
|
}
|
|
125
193
|
|
|
126
194
|
export type CreateCanvasContextAsyncOptions = {
|
|
@@ -49,7 +49,6 @@ export interface Uni {
|
|
|
49
49
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
|
|
53
52
|
/**
|
|
54
53
|
* 错误码
|
|
55
54
|
* - 1505003 系统定位未开启,请在系统设置中开启系统定位
|
|
@@ -64,9 +63,9 @@ export interface Uni {
|
|
|
64
63
|
* - 1505800 缺失高精度定位授权
|
|
65
64
|
* - 1505605 未通过配置预校验,通常是app key 配置错误
|
|
66
65
|
* - 1505606 需要打自定义基座
|
|
67
|
-
* -
|
|
66
|
+
* - 1505607 腾讯定位只支持GCJ-02
|
|
68
67
|
*/
|
|
69
|
-
export type LocationErrorCode = 1505003 | 1505004 | 1505600 | 1505601 | 1505602 | 1505603 | 1505604 | 1505700 | 1505701 | 1505800 | 1505605 | 1505606 |
|
|
68
|
+
export type LocationErrorCode = 1505003 | 1505004 | 1505600 | 1505601 | 1505602 | 1505603 | 1505604 | 1505700 | 1505701 | 1505800 | 1505605 | 1505606 | 1505607;
|
|
70
69
|
|
|
71
70
|
/**
|
|
72
71
|
* 网络请求失败的错误回调参数
|
|
@@ -305,7 +304,7 @@ export type GetLocationSuccess = {
|
|
|
305
304
|
address : any | null
|
|
306
305
|
};
|
|
307
306
|
type GetLocationSuccessCallback = (result : GetLocationSuccess) => void;
|
|
308
|
-
type GetLocationFailCallback = (result :
|
|
307
|
+
type GetLocationFailCallback = (result : GetLocationFail) => void;
|
|
309
308
|
type GetLocationComplete = any;
|
|
310
309
|
type GetLocationCompleteCallback = (result : GetLocationComplete) => void;
|
|
311
310
|
export type GetLocationOptions = {
|