@dcloudio/uni-app-x 0.6.1 → 0.6.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-app-x",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "uni-app x types",
5
5
  "typings": "index.d.ts",
6
6
  "author": "DCloud",
@@ -4,7 +4,7 @@ import { IPageManager } from "./IPageManager"
4
4
  * @package io.dcloud.uniapp.runtime
5
5
  * @autodoc false
6
6
  */
7
- export class IApp {
7
+ export interface IApp {
8
8
  appid: string
9
9
  pageManager: IPageManager
10
10
 
@@ -242,7 +242,6 @@ declare global {
242
242
  type INavigationBar = INavigationBarOrigin
243
243
  type IDocument = IDocumentOrigin
244
244
  type IComment = ICommentOrigin
245
- const IApp: typeof IAppOrigin
246
245
  type IApp = IAppOrigin
247
246
  const Event: typeof EventOrigin
248
247
  type Event = EventOrigin
package/types/page.d.ts CHANGED
@@ -168,7 +168,7 @@ interface OnResizeOptions {
168
168
  size: OnResizeSize
169
169
  }
170
170
 
171
- interface ShareAppMessageOption {
171
+ interface OnShareAppMessageOption {
172
172
  /**
173
173
  * 转发事件来源。
174
174
  * 可选值:
@@ -186,7 +186,7 @@ interface ShareAppMessageOption {
186
186
  webViewUrl?: string;
187
187
  }
188
188
 
189
- interface AddToFavoritesOption {
189
+ interface OnAddToFavoritesOption {
190
190
  /**
191
191
  * 转发事件来源。
192
192
  * 可选值:
@@ -215,7 +215,7 @@ interface CustomFavoritesContent {
215
215
  imageUrl?: string;
216
216
  }
217
217
 
218
- interface TabItemTapOption {
218
+ interface OnTabItemTapOption {
219
219
  /**
220
220
  * 被点击 tabItem 的序号,从0开始
221
221
  */
@@ -230,7 +230,7 @@ interface TabItemTapOption {
230
230
  text: string;
231
231
  }
232
232
 
233
- interface NavigationBarButtonTapOption {
233
+ interface OnNavigationBarButtonTapOption {
234
234
  /**
235
235
  * 原生标题栏按钮数组的下标
236
236
  */
@@ -246,15 +246,6 @@ type Record<K extends keyof any, T> = {
246
246
 
247
247
  type NativeMap<K extends string, V> = Map<K, V> & Record<K, V>
248
248
 
249
- type OnLoadOptions = NativeMap<string, any>
250
-
251
- interface OnBackPressOptions {
252
- /**
253
- * - backbutton 顶部导航栏左边的返回按钮或 Android 实体返回键
254
- * - navigateBack 返回 API,即 uni.navigateBack()
255
- */
256
- from: 'backbutton' | 'navigateBack';
257
- }
258
249
 
259
250
  interface NavigationBarSearchInputEvent {
260
251
  /**
@@ -268,10 +259,6 @@ interface PageInstanceBaseProps<D extends AnyObject = any> {
268
259
  * 到当前页面的路径,类型为 `String`
269
260
  */
270
261
  route?: string;
271
- /**
272
- * 获取当前页面的webview对象实例。仅 App 平台支持
273
- */
274
- $getAppWebview?: () => PlusWebviewWebviewObject;
275
262
  /**
276
263
  * 当前页面的 Vue 实例
277
264
  */
@@ -895,7 +882,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
895
882
  * }
896
883
  *}
897
884
  */
898
- onShareAppMessage?(options: ShareAppMessageOption): CustomShareContent | Promise<Omit<CustomShareContent, "promise">>;
885
+ onShareAppMessage?(options: OnShareAppMessageOption): CustomShareContent | Promise<Omit<CustomShareContent, "promise">>;
899
886
  /**
900
887
  * 用户点击右上角转发到朋友圈
901
888
  *
@@ -1031,7 +1018,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1031
1018
  * }
1032
1019
  *}
1033
1020
  */
1034
- onAddToFavorites?(options: AddToFavoritesOption): CustomFavoritesContent;
1021
+ onAddToFavorites?(options: OnAddToFavoritesOption): CustomFavoritesContent;
1035
1022
  /**
1036
1023
  * 页面滚动触发事件的处理函数
1037
1024
  *
@@ -1100,7 +1087,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1100
1087
  * }
1101
1088
  *}
1102
1089
  */
1103
- onPageScroll?(options: PageScrollOption): void;
1090
+ onPageScroll?(options: OnPageScrollOptions): void;
1104
1091
  /**
1105
1092
  * 页面尺寸改变时触发
1106
1093
  * @param options 页面滚动参数
@@ -1167,7 +1154,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1167
1154
  * }
1168
1155
  *}
1169
1156
  */
1170
- onResize?(options: ResizeOption): void;
1157
+ onResize?(options: OnResizeOptions): void;
1171
1158
  /**
1172
1159
  * 当前是 tab 页时,点击 tab 时触发
1173
1160
  * @param options tab 点击参数
@@ -1234,7 +1221,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1234
1221
  * }
1235
1222
  *}
1236
1223
  */
1237
- onTabItemTap?(options: TabItemTapOption): void;
1224
+ onTabItemTap?(options: OnTabItemTapOption): void;
1238
1225
  /**
1239
1226
  * 监听原生标题栏按钮点击事件
1240
1227
  * @param options tab 点击参数
@@ -1301,7 +1288,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1301
1288
  * }
1302
1289
  *}
1303
1290
  */
1304
- onNavigationBarButtonTap?(options: NavigationBarButtonTapOption): void;
1291
+ onNavigationBarButtonTap?(options: OnNavigationBarButtonTapOption): void;
1305
1292
  /**
1306
1293
  * 监听页面返回
1307
1294
  * @param options tab 点击参数
@@ -1580,7 +1567,15 @@ declare global {
1580
1567
  * `getCurrentPages()` 函数用于获取当前页面栈的实例,以数组形式按栈的顺序给出,数组中的元素为页面实例,第一个元素为首页,最后一个元素为当前页面。
1581
1568
  * @tutorial https://uniapp.dcloud.net.cn/tutorial/page.html#getcurrentpages
1582
1569
  */
1583
- const getCurrentPages: () => BasePage[]
1570
+ const getCurrentPages: () => BasePage[]
1571
+ type OnLoadOptions = NativeMap<string, any>
1572
+ interface OnBackPressOptions {
1573
+ /**
1574
+ * - backbutton 顶部导航栏左边的返回按钮或 Android 实体返回键
1575
+ * - navigateBack 返回 API,即 uni.navigateBack()
1576
+ */
1577
+ from: 'backbutton' | 'navigateBack';
1578
+ }
1584
1579
  }
1585
1580
 
1586
1581
  declare module '@vue/runtime-core' {