@dcloudio/uni-app-x 0.5.16 → 0.6.0

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.
Files changed (84) hide show
  1. package/options.d.ts +9 -0
  2. package/package.json +4 -3
  3. package/types/app.d.ts +59 -166
  4. package/types/index.d.ts +1 -2
  5. package/types/native/AsyncApiResult.d.ts +1 -1
  6. package/types/native/CSSStyleDeclaration.d.ts +15 -12
  7. package/types/native/CustomEvent.d.ts +3 -3
  8. package/types/native/DOMRect.d.ts +2 -2
  9. package/types/native/DrawableContext.d.ts +149 -149
  10. package/types/native/Element.d.ts +7 -5
  11. package/types/native/Event.d.ts +38 -38
  12. package/types/native/IApp.d.ts +2 -2
  13. package/types/native/IDocument.d.ts +3 -3
  14. package/types/native/INavigationBar.d.ts +1 -1
  15. package/types/native/IPage.d.ts +15 -10
  16. package/types/native/IPageManager.d.ts +2 -2
  17. package/types/native/IUniError.d.ts +18 -18
  18. package/types/native/ImageErrorEvent.d.ts +2 -2
  19. package/types/native/ImageLoadEvent.d.ts +2 -2
  20. package/types/native/InputBlurEvent.d.ts +8 -8
  21. package/types/native/InputConfirmEvent.d.ts +8 -8
  22. package/types/native/InputEvent.d.ts +20 -20
  23. package/types/native/InputFocusEvent.d.ts +13 -13
  24. package/types/native/InputKeyboardHeightChangeEvent.d.ts +12 -12
  25. package/types/native/MouseEvent.d.ts +58 -58
  26. package/types/native/NestedPreScrollEvent.d.ts +22 -22
  27. package/types/native/NodeData.d.ts +2 -2
  28. package/types/native/PageEvent.d.ts +2 -2
  29. package/types/native/PageScrollEvent.d.ts +5 -5
  30. package/types/native/RefresherEvent.d.ts +2 -2
  31. package/types/native/ResizeEvent.d.ts +27 -27
  32. package/types/native/RichTextItemClickEvent.d.ts +2 -2
  33. package/types/native/ScrollEvent.d.ts +28 -28
  34. package/types/native/ScrollToLowerEvent.d.ts +6 -6
  35. package/types/native/ScrollToUpperEvent.d.ts +6 -6
  36. package/types/native/SnapshotOptions.d.ts +8 -8
  37. package/types/native/SourceError.d.ts +1 -1
  38. package/types/native/StartNestedScrollEvent.d.ts +7 -7
  39. package/types/native/SwiperAnimationFinishEvent.d.ts +6 -6
  40. package/types/native/SwiperChangeEvent.d.ts +6 -6
  41. package/types/native/SwiperTransitionEvent.d.ts +6 -6
  42. package/types/native/TabTapEvent.d.ts +11 -9
  43. package/types/native/TextareaBlurEvent.d.ts +12 -12
  44. package/types/native/TextareaFocusEvent.d.ts +12 -12
  45. package/types/native/TextareaLineChangeEvent.d.ts +16 -16
  46. package/types/native/TouchEvent.d.ts +43 -43
  47. package/types/native/UTSAndroidHookProxy.d.ts +6 -6
  48. package/types/native/UniAggregateError.d.ts +4 -2
  49. package/types/native/UniAppManager.d.ts +3 -3
  50. package/types/native/UniElement.d.ts +30 -15
  51. package/types/native/UniError.d.ts +7 -7
  52. package/types/native/UniTabsElement.d.ts +4 -3
  53. package/types/native/UniTextElement.d.ts +3 -3
  54. package/types/native/UniVideoElement.d.ts +4 -4
  55. package/types/native/UniWebViewElement.d.ts +3 -3
  56. package/types/native/WebViewDownloadEvent.d.ts +3 -3
  57. package/types/native/WebViewErrorEvent.d.ts +3 -3
  58. package/types/native/WebViewLoadedEvent.d.ts +3 -3
  59. package/types/native/WebViewLoadingEvent.d.ts +4 -3
  60. package/types/native/WebViewMessageEvent.d.ts +3 -3
  61. package/types/native/WebViewStyles.d.ts +3 -3
  62. package/types/native/global.d.ts +254 -0
  63. package/types/native/index.d.ts +57 -58
  64. package/types/native-global/index.d.ts +1 -0
  65. package/types/page.d.ts +26 -8
  66. package/types/uni/core/lib/route/index.d.ts +12 -0
  67. package/types/uni/core/lib/route/interface.d.ts +31 -5
  68. package/types/uni/core/lib/ui/get-element-by-id/interface.d.ts +1 -1
  69. package/types/uni/core/lib/ui/page-scroll-to/index.d.ts +4 -0
  70. package/types/uni/core/lib/ui/page-scroll-to/interface.d.ts +10 -1
  71. package/types/uni/core/lib/ui/set-navigation-bar-color/index.d.ts +4 -0
  72. package/types/uni/core/lib/ui/set-navigation-bar-color/interface.d.ts +9 -1
  73. package/types/uni/core/lib/ui/set-navigation-bar-title/index.d.ts +4 -0
  74. package/types/uni/core/lib/ui/set-navigation-bar-title/interface.d.ts +10 -1
  75. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +4 -4
  76. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +27 -6
  77. package/types/uni/uts-plugin-api/lib/uni-push/utssdk/interface.d.ts +10 -10
  78. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/index.d.ts +4 -4
  79. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +21 -11
  80. package/types/uni/uts-plugin-modules/lib/uni-facialRecognitionVerify/utssdk/index.d.ts +10 -0
  81. package/types/uni/uts-plugin-modules/lib/uni-facialRecognitionVerify/utssdk/interface.d.ts +63 -12
  82. package/types/vue/UniCloudDBElement.d.ts +1 -1
  83. package/uts-plugin.d.ts +1 -0
  84. package/types/shims-vue.d.ts +0 -14
@@ -1,18 +1,18 @@
1
1
  /**
2
2
  * web-view组件的样式
3
3
  */
4
- declare class WebViewStyles {
4
+ export class WebViewStyles {
5
5
  /**
6
6
  * 网络地址页面加载进度条样式,设置为 false 时表示不显示加载进度条。
7
7
  * @default false
8
8
  */
9
- progress: WebViewProgressStyles|boolean
9
+ progress: WebViewProgressStyles | boolean
10
10
  }
11
11
 
12
12
  /**
13
13
  * web-view组件的进度条样式
14
14
  */
15
- declare class WebViewProgressStyles {
15
+ export class WebViewProgressStyles {
16
16
  /**
17
17
  * 网页加载进度条颜色,默认值为 #00FF00 。
18
18
  */
@@ -0,0 +1,254 @@
1
+ import {
2
+ WebViewStyles as WebViewStylesOrigin,
3
+ WebViewProgressStyles as WebViewProgressStylesOrigin,
4
+ WebViewMessageEventDetail as WebViewMessageEventDetailOrigin,
5
+ WebViewMessageEvent as WebViewMessageEventOrigin,
6
+ WebViewLoadingEventDetail as WebViewLoadingEventDetailOrigin,
7
+ WebViewLoadingEvent as WebViewLoadingEventOrigin,
8
+ WebViewLoadedEventDetail as WebViewLoadedEventDetailOrigin,
9
+ WebViewLoadedEvent as WebViewLoadedEventOrigin,
10
+ WebViewErrorEventDetail as WebViewErrorEventDetailOrigin,
11
+ WebViewErrorEvent as WebViewErrorEventOrigin,
12
+ WebViewDownloadEventDetail as WebViewDownloadEventDetailOrigin,
13
+ WebViewDownloadEvent as WebViewDownloadEventOrigin,
14
+ UniWebViewElement as UniWebViewElementOrigin,
15
+ IWebViewNode as IWebViewNodeOrigin,
16
+ UniVideoElement as UniVideoElementOrigin,
17
+ Danmu as DanmuOrigin,
18
+ RequestFullScreenOptions as RequestFullScreenOptionsOrigin,
19
+ UniTextElement as UniTextElementOrigin,
20
+ TextElement as TextElementOrigin,
21
+ UniTabsElement as UniTabsElementOrigin,
22
+ ITabsNode as ITabsNodeOrigin,
23
+ UniError as UniErrorOrigin,
24
+ UniElement as UniElementOrigin,
25
+ UniViewElement as UniViewElementOrigin,
26
+ UniScrollViewElement as UniScrollViewElementOrigin,
27
+ UniListViewElement as UniListViewElementOrigin,
28
+ UniListItemElement as UniListItemElementOrigin,
29
+ UniSwiperElement as UniSwiperElementOrigin,
30
+ UniSwiperItemElement as UniSwiperItemElementOrigin,
31
+ UniImageElement as UniImageElementOrigin,
32
+ UniInputElement as UniInputElementOrigin,
33
+ UniTextareaElement as UniTextareaElementOrigin,
34
+ UniRichTextElement as UniRichTextElementOrigin,
35
+ UniStickyHeaderElement as UniStickyHeaderElementOrigin,
36
+ UniStickySectionElement as UniStickySectionElementOrigin,
37
+ UniAppManager as UniAppManagerOrigin,
38
+ CurrentApp as CurrentAppOrigin,
39
+ UniAggregateError as UniAggregateErrorOrigin,
40
+ UTSAndroidHookProxy as UTSAndroidHookProxyOrigin,
41
+ Touch as TouchOrigin,
42
+ TouchEvent as TouchEventOrigin,
43
+ TextareaLineChangeEvent as TextareaLineChangeEventOrigin,
44
+ TextareaFocusEvent as TextareaFocusEventOrigin,
45
+ TextareaBlurEvent as TextareaBlurEventOrigin,
46
+ TabTapEvent as TabTapEventOrigin,
47
+ SwiperTransitionEvent as SwiperTransitionEventOrigin,
48
+ SwiperChangeEvent as SwiperChangeEventOrigin,
49
+ SwiperAnimationFinishEvent as SwiperAnimationFinishEventOrigin,
50
+ StartNestedScrollEvent as StartNestedScrollEventOrigin,
51
+ SourceError as SourceErrorOrigin,
52
+ TakeSnapshotOptions as TakeSnapshotOptionsOrigin,
53
+ TakeSnapshotSuccess as TakeSnapshotSuccessOrigin,
54
+ TakeSnapshotFail as TakeSnapshotFailOrigin,
55
+ TakeSnapshotSuccessCallback as TakeSnapshotSuccessCallbackOrigin,
56
+ TakeSnapshotFailCallback as TakeSnapshotFailCallbackOrigin,
57
+ TakeSnapshotCompleteCallback as TakeSnapshotCompleteCallbackOrigin,
58
+ ScrollToUpperEvent as ScrollToUpperEventOrigin,
59
+ ScrollToLowerEvent as ScrollToLowerEventOrigin,
60
+ ScrollEvent as ScrollEventOrigin,
61
+ RichTextItemClickEvent as RichTextItemClickEventOrigin,
62
+ ResizeEvent as ResizeEventOrigin,
63
+ RefresherEvent as RefresherEventOrigin,
64
+ PageScrollEvent as PageScrollEventOrigin,
65
+ PageEvent as PageEventOrigin,
66
+ NodeData as NodeDataOrigin,
67
+ INodeData as INodeDataOrigin,
68
+ NestedPreScrollEvent as NestedPreScrollEventOrigin,
69
+ MouseEvent as MouseEventOrigin,
70
+ InputKeyboardHeightChangeEvent as InputKeyboardHeightChangeEventOrigin,
71
+ InputFocusEvent as InputFocusEventOrigin,
72
+ InputEvent as InputEventOrigin,
73
+ InputConfirmEvent as InputConfirmEventOrigin,
74
+ InputBlurEvent as InputBlurEventOrigin,
75
+ ImageLoadEvent as ImageLoadEventOrigin,
76
+ ImageErrorEvent as ImageErrorEventOrigin,
77
+ IUniError as IUniErrorOrigin,
78
+ IPageManager as IPageManagerOrigin,
79
+ UniCallbackWrapper as UniCallbackWrapperOrigin,
80
+ NavigationBarButtonTapEvent as NavigationBarButtonTapEventOrigin,
81
+ WebViewServiceMessageEvent as WebViewServiceMessageEventOrigin,
82
+ ViewToTempFilePathOptions as ViewToTempFilePathOptionsOrigin,
83
+ NavigationBarSearchInputEvent as NavigationBarSearchInputEventOrigin,
84
+ IPage as IPageOrigin,
85
+ INavigationBar as INavigationBarOrigin,
86
+ IDocument as IDocumentOrigin,
87
+ IApp as IAppOrigin,
88
+ Event as EventOrigin,
89
+ Element as ElementOrigin,
90
+ INode as INodeOrigin,
91
+ DrawableContext as DrawableContextOrigin,
92
+ DOMRect as DOMRectOrigin,
93
+ CustomEventOptions as CustomEventOptionsOrigin,
94
+ CustomEvent as CustomEventOrigin,
95
+ CSSStyleDeclaration as CSSStyleDeclarationOrigin,
96
+ AsyncApiResult as AsyncApiResultOrigin,
97
+ } from './index'
98
+
99
+ declare global {
100
+ const WebViewStyles: typeof WebViewStylesOrigin
101
+ type WebViewStyles = WebViewStylesOrigin
102
+ const WebViewProgressStyles: typeof WebViewProgressStylesOrigin
103
+ type WebViewProgressStyles = WebViewProgressStylesOrigin
104
+ const WebViewMessageEventDetail: typeof WebViewMessageEventDetailOrigin
105
+ type WebViewMessageEventDetail = WebViewMessageEventDetailOrigin
106
+ const WebViewMessageEvent: typeof WebViewMessageEventOrigin
107
+ type WebViewMessageEvent = WebViewMessageEventOrigin
108
+ const WebViewLoadingEventDetail: typeof WebViewLoadingEventDetailOrigin
109
+ type WebViewLoadingEventDetail = WebViewLoadingEventDetailOrigin
110
+ const WebViewLoadingEvent: typeof WebViewLoadingEventOrigin
111
+ type WebViewLoadingEvent = WebViewLoadingEventOrigin
112
+ const WebViewLoadedEventDetail: typeof WebViewLoadedEventDetailOrigin
113
+ type WebViewLoadedEventDetail = WebViewLoadedEventDetailOrigin
114
+ const WebViewLoadedEvent: typeof WebViewLoadedEventOrigin
115
+ type WebViewLoadedEvent = WebViewLoadedEventOrigin
116
+ const WebViewErrorEventDetail: typeof WebViewErrorEventDetailOrigin
117
+ type WebViewErrorEventDetail = WebViewErrorEventDetailOrigin
118
+ const WebViewErrorEvent: typeof WebViewErrorEventOrigin
119
+ type WebViewErrorEvent = WebViewErrorEventOrigin
120
+ const WebViewDownloadEventDetail: typeof WebViewDownloadEventDetailOrigin
121
+ type WebViewDownloadEventDetail = WebViewDownloadEventDetailOrigin
122
+ const WebViewDownloadEvent: typeof WebViewDownloadEventOrigin
123
+ type WebViewDownloadEvent = WebViewDownloadEventOrigin
124
+ type UniWebViewElement = UniWebViewElementOrigin
125
+ type IWebViewNode = IWebViewNodeOrigin
126
+ type UniVideoElement = UniVideoElementOrigin
127
+ type Danmu = DanmuOrigin
128
+ type RequestFullScreenOptions = RequestFullScreenOptionsOrigin
129
+ const UniTextElement: typeof UniTextElementOrigin
130
+ type UniTextElement = UniTextElementOrigin
131
+ type TextElement = TextElementOrigin
132
+ type UniTabsElement = UniTabsElementOrigin
133
+ type ITabsNode = ITabsNodeOrigin
134
+ const UniError: typeof UniErrorOrigin
135
+ type UniError = UniErrorOrigin
136
+ const UniElement: typeof UniElementOrigin
137
+ type UniElement = UniElementOrigin
138
+ type UniViewElement = UniViewElementOrigin
139
+ type UniScrollViewElement = UniScrollViewElementOrigin
140
+ type UniListViewElement = UniListViewElementOrigin
141
+ type UniListItemElement = UniListItemElementOrigin
142
+ type UniSwiperElement = UniSwiperElementOrigin
143
+ type UniSwiperItemElement = UniSwiperItemElementOrigin
144
+ type UniImageElement = UniImageElementOrigin
145
+ type UniInputElement = UniInputElementOrigin
146
+ type UniTextareaElement = UniTextareaElementOrigin
147
+ type UniRichTextElement = UniRichTextElementOrigin
148
+ type UniStickyHeaderElement = UniStickyHeaderElementOrigin
149
+ type UniStickySectionElement = UniStickySectionElementOrigin
150
+ const UniAppManager: typeof UniAppManagerOrigin
151
+ type CurrentApp = CurrentAppOrigin
152
+ const UniAggregateError: typeof UniAggregateErrorOrigin
153
+ type UniAggregateError = UniAggregateErrorOrigin
154
+ type UTSAndroidHookProxy = UTSAndroidHookProxyOrigin
155
+ const Touch: typeof TouchOrigin
156
+ type Touch = TouchOrigin
157
+ const TouchEvent: typeof TouchEventOrigin
158
+ type TouchEvent = TouchEventOrigin
159
+ const TextareaLineChangeEvent: typeof TextareaLineChangeEventOrigin
160
+ type TextareaLineChangeEvent = TextareaLineChangeEventOrigin
161
+ const TextareaFocusEvent: typeof TextareaFocusEventOrigin
162
+ type TextareaFocusEvent = TextareaFocusEventOrigin
163
+ const TextareaBlurEvent: typeof TextareaBlurEventOrigin
164
+ type TextareaBlurEvent = TextareaBlurEventOrigin
165
+ const TabTapEvent: typeof TabTapEventOrigin
166
+ type TabTapEvent = TabTapEventOrigin
167
+ const SwiperTransitionEvent: typeof SwiperTransitionEventOrigin
168
+ type SwiperTransitionEvent = SwiperTransitionEventOrigin
169
+ const SwiperChangeEvent: typeof SwiperChangeEventOrigin
170
+ type SwiperChangeEvent = SwiperChangeEventOrigin
171
+ const SwiperAnimationFinishEvent: typeof SwiperAnimationFinishEventOrigin
172
+ type SwiperAnimationFinishEvent = SwiperAnimationFinishEventOrigin
173
+ const StartNestedScrollEvent: typeof StartNestedScrollEventOrigin
174
+ type StartNestedScrollEvent = StartNestedScrollEventOrigin
175
+ const SourceError: typeof SourceErrorOrigin
176
+ type SourceError = SourceErrorOrigin
177
+ const TakeSnapshotOptions: typeof TakeSnapshotOptionsOrigin
178
+ type TakeSnapshotOptions = TakeSnapshotOptionsOrigin
179
+ type TakeSnapshotSuccess = TakeSnapshotSuccessOrigin
180
+ type TakeSnapshotFail = TakeSnapshotFailOrigin
181
+ type TakeSnapshotSuccessCallback = TakeSnapshotSuccessCallbackOrigin
182
+ type TakeSnapshotFailCallback = TakeSnapshotFailCallbackOrigin
183
+ type TakeSnapshotCompleteCallback = TakeSnapshotCompleteCallbackOrigin
184
+ const ScrollToUpperEvent: typeof ScrollToUpperEventOrigin
185
+ type ScrollToUpperEvent = ScrollToUpperEventOrigin
186
+ const ScrollToLowerEvent: typeof ScrollToLowerEventOrigin
187
+ type ScrollToLowerEvent = ScrollToLowerEventOrigin
188
+ const ScrollEvent: typeof ScrollEventOrigin
189
+ type ScrollEvent = ScrollEventOrigin
190
+ const RichTextItemClickEvent: typeof RichTextItemClickEventOrigin
191
+ type RichTextItemClickEvent = RichTextItemClickEventOrigin
192
+ const ResizeEvent: typeof ResizeEventOrigin
193
+ type ResizeEvent = ResizeEventOrigin
194
+ const RefresherEvent: typeof RefresherEventOrigin
195
+ type RefresherEvent = RefresherEventOrigin
196
+ const PageScrollEvent: typeof PageScrollEventOrigin
197
+ type PageScrollEvent = PageScrollEventOrigin
198
+ const PageEvent: typeof PageEventOrigin
199
+ type PageEvent = PageEventOrigin
200
+ const NodeData: typeof NodeDataOrigin
201
+ type NodeData = NodeDataOrigin
202
+ type INodeData = INodeDataOrigin
203
+ const NestedPreScrollEvent: typeof NestedPreScrollEventOrigin
204
+ type NestedPreScrollEvent = NestedPreScrollEventOrigin
205
+ const MouseEvent: typeof MouseEventOrigin
206
+ type MouseEvent = MouseEventOrigin
207
+ const InputKeyboardHeightChangeEvent: typeof InputKeyboardHeightChangeEventOrigin
208
+ type InputKeyboardHeightChangeEvent = InputKeyboardHeightChangeEventOrigin
209
+ const InputFocusEvent: typeof InputFocusEventOrigin
210
+ type InputFocusEvent = InputFocusEventOrigin
211
+ const InputEvent: typeof InputEventOrigin
212
+ type InputEvent = InputEventOrigin
213
+ const InputConfirmEvent: typeof InputConfirmEventOrigin
214
+ type InputConfirmEvent = InputConfirmEventOrigin
215
+ const InputBlurEvent: typeof InputBlurEventOrigin
216
+ type InputBlurEvent = InputBlurEventOrigin
217
+ const ImageLoadEvent: typeof ImageLoadEventOrigin
218
+ type ImageLoadEvent = ImageLoadEventOrigin
219
+ const ImageErrorEvent: typeof ImageErrorEventOrigin
220
+ type ImageErrorEvent = ImageErrorEventOrigin
221
+ type IUniError = IUniErrorOrigin
222
+ const IPageManager: typeof IPageManagerOrigin
223
+ type IPageManager = IPageManagerOrigin
224
+ const UniCallbackWrapper: typeof UniCallbackWrapperOrigin
225
+ type UniCallbackWrapper = UniCallbackWrapperOrigin
226
+ const NavigationBarButtonTapEvent: typeof NavigationBarButtonTapEventOrigin
227
+ type NavigationBarButtonTapEvent = NavigationBarButtonTapEventOrigin
228
+ const WebViewServiceMessageEvent: typeof WebViewServiceMessageEventOrigin
229
+ type WebViewServiceMessageEvent = WebViewServiceMessageEventOrigin
230
+ const ViewToTempFilePathOptions: typeof ViewToTempFilePathOptionsOrigin
231
+ type ViewToTempFilePathOptions = ViewToTempFilePathOptionsOrigin
232
+ const NavigationBarSearchInputEvent: typeof NavigationBarSearchInputEventOrigin
233
+ type NavigationBarSearchInputEvent = NavigationBarSearchInputEventOrigin
234
+ type IPage = IPageOrigin
235
+ type INavigationBar = INavigationBarOrigin
236
+ type IDocument = IDocumentOrigin
237
+ const IApp: typeof IAppOrigin
238
+ type IApp = IAppOrigin
239
+ const Event: typeof EventOrigin
240
+ type Event = EventOrigin
241
+ type Element = ElementOrigin
242
+ type INode = INodeOrigin
243
+ const DrawableContext: typeof DrawableContextOrigin
244
+ type DrawableContext = DrawableContextOrigin
245
+ const DOMRect: typeof DOMRectOrigin
246
+ type DOMRect = DOMRectOrigin
247
+ const CustomEventOptions: typeof CustomEventOptionsOrigin
248
+ type CustomEventOptions<T> = CustomEventOptionsOrigin<T>
249
+ const CustomEvent: typeof CustomEventOrigin
250
+ type CustomEvent<T> = CustomEventOrigin<T>
251
+ const CSSStyleDeclaration: typeof CSSStyleDeclarationOrigin
252
+ type CSSStyleDeclaration = CSSStyleDeclarationOrigin
253
+ type AsyncApiResult = AsyncApiResultOrigin
254
+ }
@@ -1,58 +1,57 @@
1
- /// <reference path='./AsyncApiResult.d.ts' />
2
- /// <reference path='./CSSStyleDeclaration.d.ts' />
3
- /// <reference path='./CustomEvent.d.ts' />
4
- /// <reference path='./DOMRect.d.ts' />
5
- /// <reference path='./DrawableContext.d.ts' />
6
- /// <reference path='./Event.d.ts' />
7
- /// <reference path='./IApp.d.ts' />
8
- /// <reference path='./IDocument.d.ts' />
9
- /// <reference path='./ImageErrorEvent.d.ts' />
10
- /// <reference path='./ImageLoadEvent.d.ts' />
11
- /// <reference path='./InputBlurEvent.d.ts' />
12
- /// <reference path='./InputConfirmEvent.d.ts' />
13
- /// <reference path='./InputEvent.d.ts' />
14
- /// <reference path='./InputFocusEvent.d.ts' />
15
- /// <reference path='./InputKeyboardHeightChangeEvent.d.ts' />
16
- /// <reference path='./Element.d.ts' />
17
- /// <reference path='./UniElement.d.ts' />
18
- /// <reference path='./IPage.d.ts' />
19
- /// <reference path='./IPageManager.d.ts' />
20
- /// <reference path='./UniTabsElement.d.ts' />
21
- /// <reference path='./UniWebViewElement.d.ts' />
22
- /// <reference path='./UniTextElement.d.ts' />
23
- /// <reference path='./UniVideoElement.d.ts' />
24
- /// <reference path='./MouseEvent.d.ts' />
25
- /// <reference path='./NestedPreScrollEvent.d.ts' />
26
- /// <reference path='./NodeData.d.ts' />
27
- /// <reference path='./PageEvent.d.ts' />
28
- /// <reference path='./PageScrollEvent.d.ts' />
29
- /// <reference path='./RefresherEvent.d.ts' />
30
- /// <reference path='./ResizeEvent.d.ts' />
31
- /// <reference path='./RichTextItemClickEvent.d.ts' />
32
- /// <reference path='./ScrollEvent.d.ts' />
33
- /// <reference path='./ScrollToLowerEvent.d.ts' />
34
- /// <reference path='./ScrollToUpperEvent.d.ts' />
35
- /// <reference path='./SourceError.d.ts' />
36
- /// <reference path='./StartNestedScrollEvent.d.ts' />
37
- /// <reference path='./TabTapEvent.d.ts' />
38
- /// <reference path='./SnapshotOptions.d.ts' />
39
- /// <reference path='./TextareaBlurEvent.d.ts' />
40
- /// <reference path='./TextareaFocusEvent.d.ts' />
41
- /// <reference path='./TextareaLineChangeEvent.d.ts' />
42
- /// <reference path='./TouchEvent.d.ts' />
43
- /// <reference path='./UniAggregateError.d.ts' />
44
- /// <reference path='./UniAppManager.d.ts' />
45
- /// <reference path="./IUniError.d.ts" />
46
- /// <reference path='./UniError.d.ts' />
47
- /// <reference path='./WebViewStyles.d.ts' />
48
- /// <reference path='./WebViewDownloadEvent.d.ts' />
49
- /// <reference path='./WebViewErrorEvent.d.ts' />
50
- /// <reference path='./WebViewLoadedEvent.d.ts' />
51
- /// <reference path='./WebViewLoadingEvent.d.ts' />
52
- /// <reference path='./WebViewMessageEvent.d.ts' />
53
-
54
- /// <reference path='./SwiperChangeEvent.d.ts' />
55
- /// <reference path='./SwiperTransitionEvent.d.ts' />
56
- /// <reference path='./SwiperAnimationFinishEvent.d.ts' />
57
-
58
- /// <reference path='./UTSAndroidHookProxy.d.ts' />
1
+ export * from './WebViewStyles'
2
+ export * from './WebViewMessageEvent'
3
+ export * from './WebViewLoadingEvent'
4
+ export * from './WebViewLoadedEvent'
5
+ export * from './WebViewErrorEvent'
6
+ export * from './WebViewDownloadEvent'
7
+ export * from './UniWebViewElement'
8
+ export * from './UniVideoElement'
9
+ export * from './UniTextElement'
10
+ export * from './UniTabsElement'
11
+ export * from './UniError'
12
+ export * from './UniElement'
13
+ export * from './UniAppManager'
14
+ export * from './UniAggregateError'
15
+ export * from './UTSAndroidHookProxy'
16
+ export * from './TouchEvent'
17
+ export * from './TextareaLineChangeEvent'
18
+ export * from './TextareaFocusEvent'
19
+ export * from './TextareaBlurEvent'
20
+ export * from './TabTapEvent'
21
+ export * from './SwiperTransitionEvent'
22
+ export * from './SwiperChangeEvent'
23
+ export * from './SwiperAnimationFinishEvent'
24
+ export * from './StartNestedScrollEvent'
25
+ export * from './SourceError'
26
+ export * from './SnapshotOptions'
27
+ export * from './ScrollToUpperEvent'
28
+ export * from './ScrollToLowerEvent'
29
+ export * from './ScrollEvent'
30
+ export * from './RichTextItemClickEvent'
31
+ export * from './ResizeEvent'
32
+ export * from './RefresherEvent'
33
+ export * from './PageScrollEvent'
34
+ export * from './PageEvent'
35
+ export * from './NodeData'
36
+ export * from './NestedPreScrollEvent'
37
+ export * from './MouseEvent'
38
+ export * from './InputKeyboardHeightChangeEvent'
39
+ export * from './InputFocusEvent'
40
+ export * from './InputEvent'
41
+ export * from './InputConfirmEvent'
42
+ export * from './InputBlurEvent'
43
+ export * from './ImageLoadEvent'
44
+ export * from './ImageErrorEvent'
45
+ export * from './IUniError'
46
+ export * from './IPageManager'
47
+ export * from './IPage'
48
+ export * from './INavigationBar'
49
+ export * from './IDocument'
50
+ export * from './IApp'
51
+ export * from './Event'
52
+ export * from './Element'
53
+ export * from './DrawableContext'
54
+ export * from './DOMRect'
55
+ export * from './CustomEvent'
56
+ export * from './CSSStyleDeclaration'
57
+ export * from './AsyncApiResult'
@@ -0,0 +1 @@
1
+ /// <reference path='../native/global.d.ts' />
package/types/page.d.ts CHANGED
@@ -237,7 +237,17 @@ interface NavigationBarButtonTapOption {
237
237
  index: number;
238
238
  }
239
239
 
240
- type OnLoadOptions = Map<string, string>
240
+ /**
241
+ * Construct a type with a set of properties K of type T
242
+ */
243
+ type Record<K extends keyof any, T> = {
244
+ [P in K]: T;
245
+ };
246
+
247
+ type NativeMap<K extends string, V> = Map<K, V> & Record<K, V>
248
+
249
+ type OnLoadOptions = NativeMap<string, any>
250
+
241
251
  interface OnBackPressOptions {
242
252
  /**
243
253
  * - backbutton 顶部导航栏左边的返回按钮或 Android 实体返回键
@@ -406,7 +416,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
406
416
  * }
407
417
  *}
408
418
  */
409
- onLoad?(query?: OnLoadOptions): void;
419
+ onLoad?(query: OnLoadOptions): void;
410
420
  /**
411
421
  * 生命周期回调 监听页面显示
412
422
  *
@@ -1565,10 +1575,18 @@ interface BasePage {
1565
1575
  options: Map<string, string | null>
1566
1576
  }
1567
1577
 
1568
- /**
1569
- * `getCurrentPages()` 函数用于获取当前页面栈的实例,以数组形式按栈的顺序给出,数组中的元素为页面实例,第一个元素为首页,最后一个元素为当前页面。
1570
- * @tutorial https://uniapp.dcloud.net.cn/tutorial/page.html#getcurrentpages
1571
- */
1572
- type GetCurrentPages = () => BasePage[]
1578
+ declare global {
1579
+ /**
1580
+ * `getCurrentPages()` 函数用于获取当前页面栈的实例,以数组形式按栈的顺序给出,数组中的元素为页面实例,第一个元素为首页,最后一个元素为当前页面。
1581
+ * @tutorial https://uniapp.dcloud.net.cn/tutorial/page.html#getcurrentpages
1582
+ */
1583
+ const getCurrentPages: () => BasePage[]
1584
+ }
1585
+
1586
+ declare module '@vue/runtime-core' {
1587
+ interface ComponentCustomOptions extends PageInstance {
1588
+
1589
+ }
1590
+ }
1573
1591
 
1574
- declare const getCurrentPages: GetCurrentPages;
1592
+ export { }
@@ -1,4 +1,10 @@
1
1
  import {
2
+ RouteErrorCode as RouteErrorCodeOrigin,
3
+ NavigateBackError as NavigateBackErrorOrigin,
4
+ NavigateToError as NavigateToErrorOrigin,
5
+ RedirectToError as RedirectToErrorOrigin,
6
+ ReLaunchError as ReLaunchErrorOrigin,
7
+ SwitchTabError as SwitchTabErrorOrigin,
2
8
  EventChannel as EventChannelOrigin,
3
9
  NavigateToSuccess as NavigateToSuccessOrigin,
4
10
  NavigateToFail as NavigateToFailOrigin,
@@ -27,6 +33,12 @@ import {
27
33
  } from './interface'
28
34
 
29
35
  declare global {
36
+ type RouteErrorCode = RouteErrorCodeOrigin
37
+ type NavigateBackError = NavigateBackErrorOrigin
38
+ type NavigateToError = NavigateToErrorOrigin
39
+ type RedirectToError = RedirectToErrorOrigin
40
+ type ReLaunchError = ReLaunchErrorOrigin
41
+ type SwitchTabError = SwitchTabErrorOrigin
30
42
  type EventChannel = EventChannelOrigin
31
43
  type NavigateToSuccess = NavigateToSuccessOrigin
32
44
  type NavigateToFail = NavigateToFailOrigin
@@ -1,5 +1,31 @@
1
1
  import { AsyncApiSuccessResult } from '../interface'
2
2
 
3
+ /**
4
+ * 路由错误码
5
+ * - 4: 框架内部异常
6
+ */
7
+ export type RouteErrorCode = 4
8
+
9
+ export interface NavigateBackError extends IUniError {
10
+ errCode: RouteErrorCode
11
+ }
12
+
13
+ export interface NavigateToError extends IUniError {
14
+ errCode: RouteErrorCode
15
+ }
16
+
17
+ export interface RedirectToError extends IUniError {
18
+ errCode: RouteErrorCode
19
+ }
20
+
21
+ export interface ReLaunchError extends IUniError {
22
+ errCode: RouteErrorCode
23
+ }
24
+
25
+ export interface SwitchTabError extends IUniError {
26
+ errCode: RouteErrorCode
27
+ }
28
+
3
29
  /**
4
30
  *
5
31
  * @tutorial http://uniapp.dcloud.io/api/router.html#event-channel
@@ -7,7 +33,7 @@ import { AsyncApiSuccessResult } from '../interface'
7
33
  export type EventChannel = {}
8
34
  export type NavigateToSuccess = AsyncApiSuccessResult
9
35
  type NavigateToSuccessCallback = (result: NavigateToSuccess) => void
10
- export type NavigateToFail = UniError
36
+ export type NavigateToFail = NavigateToError
11
37
 
12
38
  type NavigateToFailCallback = (result: NavigateToFail) => void
13
39
  export type NavigateToComplete = AsyncApiResult
@@ -475,7 +501,7 @@ export type NavigateToOptions = {
475
501
  }
476
502
  export type RedirectToSuccess = AsyncApiSuccessResult
477
503
  type RedirectToSuccessCallback = (result: AsyncApiSuccessResult) => void
478
- export type RedirectToFail = UniError
504
+ export type RedirectToFail = RedirectToError
479
505
  type RedirectToFailCallback = (result: RedirectToFail) => void
480
506
  export type RedirectToComplete = AsyncApiResult
481
507
  type RedirectToCompleteCallback = (result: RedirectToComplete) => void
@@ -739,7 +765,7 @@ export type RedirectToOptions = {
739
765
  }
740
766
  export type ReLaunchSuccess = AsyncApiSuccessResult
741
767
  type ReLaunchSuccessCallback = (result: ReLaunchSuccess) => void
742
- export type ReLaunchFail = UniError
768
+ export type ReLaunchFail = ReLaunchError
743
769
  type ReLaunchFailCallback = (result: ReLaunchFail) => void
744
770
  export type ReLaunchComplete = AsyncApiResult
745
771
  type ReLaunchCompleteCallback = (result: ReLaunchComplete) => void
@@ -1003,7 +1029,7 @@ export type ReLaunchOptions = {
1003
1029
  }
1004
1030
  export type SwitchTabSuccess = AsyncApiSuccessResult
1005
1031
  export type SwitchTabSuccessCallback = (result: SwitchTabSuccess) => void
1006
- export type SwitchTabFail = UniError
1032
+ export type SwitchTabFail = SwitchTabError
1007
1033
  export type SwitchTabFailCallback = (result: SwitchTabFail) => void
1008
1034
  export type SwitchTabComplete = AsyncApiResult
1009
1035
  export type SwitchTabCompleteCallback = (result: SwitchTabComplete) => void
@@ -1267,7 +1293,7 @@ export type SwitchTabOptions = {
1267
1293
  }
1268
1294
  export type NavigateBackSuccess = AsyncApiSuccessResult
1269
1295
  type NavigateBackSuccessCallback = (result: NavigateBackSuccess) => void
1270
- export type NavigateBackFail = UniError
1296
+ export type NavigateBackFail = NavigateBackError
1271
1297
  type NavigateBackFailCallback = (result: NavigateBackFail) => void
1272
1298
  export type NavigateBackComplete = AsyncApiResult
1273
1299
  type NavigateBackCompleteCallback = (result: NavigateBackComplete) => void
@@ -6,7 +6,7 @@ export interface Uni {
6
6
  * 如果需要获取指定的节点类型,需要使用 as 进行类型转换。\
7
7
  * ID 区分大小写,且应该是唯一的。如果存在多个匹配的元素,则返回第一个匹配的元素。
8
8
  *
9
- * @tutorial https://uniapp.dcloud.net.cn/uni-app-x/api/get-element-by-id.html
9
+ * @tutorial https://uniapp.dcloud.net.cn/uni-app-x/api/get-element.html
10
10
  * @uniPlatform {
11
11
  * "app": {
12
12
  * "android": {
@@ -1,4 +1,6 @@
1
1
  import {
2
+ PageScrollToErrorCode as PageScrollToErrorCodeOrigin,
3
+ PageScrollToError as PageScrollToErrorOrigin,
2
4
  PageScrollToSuccess as PageScrollToSuccessOrigin,
3
5
  PageScrollToSuccessCallback as PageScrollToSuccessCallbackOrigin,
4
6
  PageScrollToFail as PageScrollToFailOrigin,
@@ -10,6 +12,8 @@ import {
10
12
  } from './interface'
11
13
 
12
14
  declare global {
15
+ type PageScrollToErrorCode = PageScrollToErrorCodeOrigin
16
+ type PageScrollToError = PageScrollToErrorOrigin
13
17
  type PageScrollToSuccess = PageScrollToSuccessOrigin
14
18
  type PageScrollToSuccessCallback = PageScrollToSuccessCallbackOrigin
15
19
  type PageScrollToFail = PageScrollToFailOrigin
@@ -1,8 +1,17 @@
1
1
  import { AsyncApiSuccessResult } from '../../interface'
2
2
 
3
+ /**
4
+ * 设置页面滚动错误码
5
+ * - 4: 框架内部异常
6
+ */
7
+ export type PageScrollToErrorCode = 4
8
+ export interface PageScrollToError extends IUniError {
9
+ errCode: PageScrollToErrorCode
10
+ }
11
+
3
12
  export type PageScrollToSuccess = AsyncApiSuccessResult
4
13
  export type PageScrollToSuccessCallback = (result: PageScrollToSuccess) => void
5
- export type PageScrollToFail = UniError
14
+ export type PageScrollToFail = PageScrollToError
6
15
  export type PageScrollToFailCallback = (result: PageScrollToFail) => void
7
16
  export type PageScrollToComplete = AsyncApiResult
8
17
  export type PageScrollToCompleteCallback = (
@@ -1,4 +1,6 @@
1
1
  import {
2
+ SetNavigationBarColorErrorCode as SetNavigationBarColorErrorCodeOrigin,
3
+ SetNavigationBarColorError as SetNavigationBarColorErrorOrigin,
2
4
  SetNavigationBarColorOptions as SetNavigationBarColorOptionsOrigin,
3
5
  SetNavigationBarColorSuccess as SetNavigationBarColorSuccessOrigin,
4
6
  SetNavigationBarColorSuccessCallback as SetNavigationBarColorSuccessCallbackOrigin,
@@ -11,6 +13,8 @@ import {
11
13
  } from './interface'
12
14
 
13
15
  declare global {
16
+ type SetNavigationBarColorErrorCode = SetNavigationBarColorErrorCodeOrigin
17
+ type SetNavigationBarColorError = SetNavigationBarColorErrorOrigin
14
18
  type SetNavigationBarColorOptions = SetNavigationBarColorOptionsOrigin
15
19
  type SetNavigationBarColorSuccess = SetNavigationBarColorSuccessOrigin
16
20
  type SetNavigationBarColorSuccessCallback = SetNavigationBarColorSuccessCallbackOrigin
@@ -1,4 +1,12 @@
1
1
  import { AsyncApiSuccessResult } from '../../interface'
2
+ /**
3
+ * 设置导航栏字体颜色错误码
4
+ * - 4: 框架内部异常
5
+ */
6
+ export type SetNavigationBarColorErrorCode = 4
7
+ export interface SetNavigationBarColorError extends IUniError {
8
+ errCode: SetNavigationBarColorErrorCode
9
+ }
2
10
 
3
11
  export type SetNavigationBarColorOptions = {
4
12
  /**
@@ -337,7 +345,7 @@ export type SetNavigationBarColorSuccessCallback = (
337
345
  result: SetNavigationBarColorSuccess
338
346
  ) => void
339
347
 
340
- export type SetNavigationBarColorFail = UniError
348
+ export type SetNavigationBarColorFail = SetNavigationBarColorError
341
349
  export type SetNavigationBarColorFailCallback = (
342
350
  error: SetNavigationBarColorFail
343
351
  ) => void
@@ -1,4 +1,6 @@
1
1
  import {
2
+ SetNavigationBarTitleErrorCode as SetNavigationBarTitleErrorCodeOrigin,
3
+ SetNavigationBarTitleError as SetNavigationBarTitleErrorOrigin,
2
4
  SetNavigationBarTitleOptions as SetNavigationBarTitleOptionsOrigin,
3
5
  SetNavigationBarTitleSuccess as SetNavigationBarTitleSuccessOrigin,
4
6
  SetNavigationBarTitleSuccessCallback as SetNavigationBarTitleSuccessCallbackOrigin,
@@ -11,6 +13,8 @@ import {
11
13
  } from './interface'
12
14
 
13
15
  declare global {
16
+ type SetNavigationBarTitleErrorCode = SetNavigationBarTitleErrorCodeOrigin
17
+ type SetNavigationBarTitleError = SetNavigationBarTitleErrorOrigin
14
18
  type SetNavigationBarTitleOptions = SetNavigationBarTitleOptionsOrigin
15
19
  type SetNavigationBarTitleSuccess = SetNavigationBarTitleSuccessOrigin
16
20
  type SetNavigationBarTitleSuccessCallback = SetNavigationBarTitleSuccessCallbackOrigin