@dcloudio/uni-app-x 0.7.4 → 0.7.5

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 (110) hide show
  1. package/package.json +1 -1
  2. package/types/app.d.ts +9 -9
  3. package/types/native/CSSStyleDeclaration.d.ts +4 -2
  4. package/types/native/IUniElement.d.ts +26 -4
  5. package/types/native/UniApp.d.ts +2 -2
  6. package/types/native/UniCustomEvent.d.ts +25 -0
  7. package/types/native/UniElement.d.ts +6 -3
  8. package/types/native/{Event.d.ts → UniEvent.d.ts} +8 -2
  9. package/types/native/UniImageErrorEvent.d.ts +16 -0
  10. package/types/native/UniImageLoadEvent.d.ts +20 -0
  11. package/types/native/UniInputBlurEvent.d.ts +20 -0
  12. package/types/native/UniInputConfirmEvent.d.ts +16 -0
  13. package/types/native/{InputEvent.d.ts → UniInputEvent.d.ts} +6 -3
  14. package/types/native/{TextareaFocusEvent.d.ts → UniInputFocusEvent.d.ts} +6 -3
  15. package/types/native/UniInputKeyboardHeightChangeEvent.d.ts +20 -0
  16. package/types/native/{NestedPreScrollEvent.d.ts → UniNestedPreScrollEvent.d.ts} +26 -22
  17. package/types/native/UniPage.d.ts +4 -4
  18. package/types/native/UniPageEvent.d.ts +11 -0
  19. package/types/native/UniPageScrollEvent.d.ts +14 -0
  20. package/types/native/{PointerEvent.d.ts → UniPointerEvent.d.ts} +11 -4
  21. package/types/native/UniRefresherEvent.d.ts +14 -0
  22. package/types/native/{ResizeEvent.d.ts → UniResizeEvent.d.ts} +6 -3
  23. package/types/native/{RichTextItemClickEvent.d.ts → UniRichTextItemClickEvent.d.ts} +5 -2
  24. package/types/native/{ScrollEvent.d.ts → UniScrollEvent.d.ts} +6 -3
  25. package/types/native/UniScrollToLowerEvent.d.ts +16 -0
  26. package/types/native/UniScrollToUpperEvent.d.ts +16 -0
  27. package/types/native/{StartNestedScrollEvent.d.ts → UniStartNestedScrollEvent.d.ts} +6 -3
  28. package/types/native/{StopNestedScrollEvent.d.ts → UniStopNestedScrollEvent.d.ts} +5 -2
  29. package/types/native/{SwiperAnimationFinishEvent.d.ts → UniSwiperAnimationFinishEvent.d.ts} +5 -2
  30. package/types/native/{SwiperChangeEvent.d.ts → UniSwiperChangeEvent.d.ts} +5 -2
  31. package/types/native/{SwiperTransitionEvent.d.ts → UniSwiperTransitionEvent.d.ts} +5 -2
  32. package/types/native/{TabTapEvent.d.ts → UniTabTapEvent.d.ts} +6 -3
  33. package/types/native/UniTextElement.d.ts +3 -0
  34. package/types/native/UniTextareaBlurEvent.d.ts +20 -0
  35. package/types/native/{InputFocusEvent.d.ts → UniTextareaFocusEvent.d.ts} +7 -3
  36. package/types/native/UniTextareaLineChangeEvent.d.ts +24 -0
  37. package/types/native/{TouchEvent.d.ts → UniTouchEvent.d.ts} +13 -6
  38. package/types/native/UniVideoElement.d.ts +5 -5
  39. package/types/native/{WebViewDownloadEvent.d.ts → UniWebViewDownloadEvent.d.ts} +10 -4
  40. package/types/native/{WebViewErrorEvent.d.ts → UniWebViewErrorEvent.d.ts} +10 -4
  41. package/types/native/UniWebViewLoadEvent.d.ts +27 -0
  42. package/types/native/UniWebViewLoadingEvent.d.ts +28 -0
  43. package/types/native/UniWebViewMessageEvent.d.ts +27 -0
  44. package/types/native/UniWebViewServiceMessageEvent.d.ts +1 -1
  45. package/types/native/global.d.ts +238 -111
  46. package/types/native/index.d.ts +34 -34
  47. package/types/page.d.ts +19 -19
  48. package/types/uni/core/lib/base/event/interface.d.ts +244 -4
  49. package/types/uni/core/lib/base/interceptor/interface.d.ts +2 -2
  50. package/types/uni/core/lib/lifecycle/interface.d.ts +26 -1
  51. package/types/uni/core/lib/performance/interface.d.ts +26 -1
  52. package/types/uni/core/lib/route/interface.d.ts +30 -30
  53. package/types/uni/core/lib/ui/create-selector-query/interface.d.ts +73 -73
  54. package/types/uni/core/lib/ui/get-element-by-id/interface.d.ts +2 -2
  55. package/types/uni/core/lib/ui/load-font-face/interface.d.ts +9 -9
  56. package/types/uni/core/lib/ui/page-scroll-to/interface.d.ts +37 -37
  57. package/types/uni/core/lib/ui/pull-down-refresh/interface.d.ts +122 -2
  58. package/types/uni/core/lib/ui/set-navigation-bar-color/interface.d.ts +7 -7
  59. package/types/uni/core/lib/ui/set-navigation-bar-title/interface.d.ts +6 -6
  60. package/types/uni/core/lib/ui/tab-bar/interface.d.ts +489 -9
  61. package/types/uni/uts-plugin-api/global.d.ts +1 -0
  62. package/types/uni/uts-plugin-api/index.d.ts +1 -0
  63. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/global.d.ts +18 -0
  64. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/index.d.ts +8 -0
  65. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/interface.d.ts +44 -0
  66. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +11 -7
  67. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/interface.d.ts +6 -2
  68. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +26 -22
  69. package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/interface.d.ts +1 -1
  70. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +1 -1
  71. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +8 -4
  72. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/interface.d.ts +33 -29
  73. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/interface.d.ts +8 -4
  74. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/interface.d.ts +18 -14
  75. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +106 -94
  76. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/interface.d.ts +1 -1
  77. package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/interface.d.ts +6 -2
  78. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +11 -3
  79. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +176 -152
  80. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +67 -19
  81. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/interface.d.ts +51 -11
  82. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +238 -186
  83. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/interface.d.ts +17 -18
  84. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/global.d.ts +26 -4
  85. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/index.d.ts +13 -2
  86. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +93 -32
  87. package/types/vue/CheckboxGroupChangeEvent.d.ts +9 -2
  88. package/types/vue/LifeCycle.d.ts +3 -3
  89. package/types/vue/PickerViewChangeEvent.d.ts +9 -2
  90. package/types/vue/ProgressActiveendEvent.d.ts +9 -2
  91. package/types/vue/RadioGroupChangeEvent.d.ts +9 -2
  92. package/types/vue/SliderChangeEvent.d.ts +9 -2
  93. package/types/vue/SwitchChangeEvent.d.ts +9 -2
  94. package/types/vue/UniFormElement.d.ts +16 -3
  95. package/types/native/CustomEvent.d.ts +0 -18
  96. package/types/native/ImageErrorEvent.d.ts +0 -13
  97. package/types/native/ImageLoadEvent.d.ts +0 -17
  98. package/types/native/InputBlurEvent.d.ts +0 -17
  99. package/types/native/InputConfirmEvent.d.ts +0 -13
  100. package/types/native/InputKeyboardHeightChangeEvent.d.ts +0 -17
  101. package/types/native/PageEvent.d.ts +0 -8
  102. package/types/native/PageScrollEvent.d.ts +0 -11
  103. package/types/native/RefresherEvent.d.ts +0 -10
  104. package/types/native/ScrollToLowerEvent.d.ts +0 -13
  105. package/types/native/ScrollToUpperEvent.d.ts +0 -13
  106. package/types/native/TextareaBlurEvent.d.ts +0 -17
  107. package/types/native/TextareaLineChangeEvent.d.ts +0 -21
  108. package/types/native/WebViewLoadedEvent.d.ts +0 -21
  109. package/types/native/WebViewLoadingEvent.d.ts +0 -22
  110. package/types/native/WebViewMessageEvent.d.ts +0 -21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-app-x",
3
- "version": "0.7.4",
3
+ "version": "0.7.5",
4
4
  "description": "uni-app x types",
5
5
  "typings": "index.d.ts",
6
6
  "author": "DCloud",
package/types/app.d.ts CHANGED
@@ -104,7 +104,7 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
104
104
  * },
105
105
  * "web": {
106
106
  * "uniVer": "√",
107
- * "unixVer": "4.0+"
107
+ * "unixVer": "4.0"
108
108
  * }
109
109
  *}
110
110
  */
@@ -173,7 +173,7 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
173
173
  * },
174
174
  * "web": {
175
175
  * "uniVer": "√",
176
- * "unixVer": "4.0+"
176
+ * "unixVer": "4.0"
177
177
  * }
178
178
  *}
179
179
  */
@@ -242,7 +242,7 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
242
242
  * },
243
243
  * "web": {
244
244
  * "uniVer": "√",
245
- * "unixVer": "4.0+"
245
+ * "unixVer": "4.0"
246
246
  * }
247
247
  *}
248
248
  */
@@ -311,7 +311,7 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
311
311
  * },
312
312
  * "web": {
313
313
  * "uniVer": "√",
314
- * "unixVer": "4.0+"
314
+ * "unixVer": "4.0"
315
315
  * }
316
316
  *}
317
317
  */
@@ -380,7 +380,7 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
380
380
  * },
381
381
  * "web": {
382
382
  * "uniVer": "√",
383
- * "unixVer": "4.0+"
383
+ * "unixVer": "4.0"
384
384
  * }
385
385
  *}
386
386
  */
@@ -453,7 +453,7 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
453
453
  * },
454
454
  * "web": {
455
455
  * "uniVer": "√",
456
- * "unixVer": "4.0+"
456
+ * "unixVer": "4.0"
457
457
  * }
458
458
  *}
459
459
  */
@@ -531,7 +531,7 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
531
531
  * },
532
532
  * "web": {
533
533
  * "uniVer": "√",
534
- * "unixVer": "4.0+"
534
+ * "unixVer": "4.0"
535
535
  * }
536
536
  *}
537
537
  */
@@ -607,7 +607,7 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
607
607
  * },
608
608
  * "web": {
609
609
  * "uniVer": "x",
610
- * "unixVer": "4.0+"
610
+ * "unixVer": "4.0"
611
611
  * }
612
612
  *}
613
613
  */
@@ -683,7 +683,7 @@ interface UniAppOptions<G extends GlobalData = GlobalData> {
683
683
  * },
684
684
  * "web": {
685
685
  * "uniVer": "x",
686
- * "unixVer": "4.0+"
686
+ * "unixVer": "4.0"
687
687
  * }
688
688
  *}
689
689
  */
@@ -17,7 +17,9 @@ export class CSSStyleDeclaration {
17
17
  */
18
18
  getPropertyValue(property: string | string.cssPropertyString): any | null
19
19
 
20
+ /**
21
+ * 删除CSS指定的样式值
22
+ * @param property 要删除的CSS样式名称
23
+ */
20
24
  removeProperty(property: string | string.cssPropertyString): any | null
21
-
22
- getStyleMap(): Map<String, any | null>
23
25
  }
@@ -1,6 +1,6 @@
1
1
  import { DrawableContext } from "./DrawableContext"
2
2
  import { TakeSnapshotOptions } from "./SnapshotOptions"
3
- import { Event } from './Event'
3
+ import { UniEvent } from './UniEvent'
4
4
  import { CSSStyleDeclaration } from "./CSSStyleDeclaration"
5
5
  import { DOMRect } from "./DOMRect"
6
6
  import { UniCallbackWrapper } from "./UniCallbackWrapper";
@@ -159,6 +159,10 @@ export interface UniElement {
159
159
  * "unixVer": "x"
160
160
  * }
161
161
  * }
162
+ * "web": {
163
+ * "uniVer": "x",
164
+ * "unixVer": "x"
165
+ * }
162
166
  * }
163
167
  */
164
168
  takeSnapshot(options: TakeSnapshotOptions): void
@@ -235,6 +239,24 @@ export interface UniElement {
235
239
 
236
240
  /**
237
241
  * 获取组件的绘制对象,仅uvue页面中的 view 组件支持,其它组件不支持则返回null。
242
+ * @uniPlatform {
243
+ * "app": {
244
+ * "android": {
245
+ * "osVer": "5.0",
246
+ * "uniVer": "x",
247
+ * "unixVer": "3.9+"
248
+ * },
249
+ * "ios": {
250
+ * "osVer": "x",
251
+ * "uniVer": "x",
252
+ * "unixVer": "x"
253
+ * }
254
+ * }
255
+ * "web": {
256
+ * "uniVer": "x",
257
+ * "unixVer": "x"
258
+ * }
259
+ * }
238
260
  */
239
261
  getDrawableContext(): DrawableContext | null
240
262
 
@@ -243,7 +265,7 @@ export interface UniElement {
243
265
  * @param {string} type 事件类型
244
266
  * @param {(event: T) => R} callback 事件监听器 T表示event类型,R表示返回值类型
245
267
  */
246
- addEventListener<T extends Event, R>(type: string, callback: (event: T) => R): UniCallbackWrapper
268
+ addEventListener<T extends UniEvent, R>(type: string, callback: (event: T) => R): UniCallbackWrapper
247
269
 
248
270
  /**
249
271
  * 删除使用 addEventListener 方法添加的事件监听器。
@@ -266,9 +288,9 @@ export interface UniElement {
266
288
  /**
267
289
  * 向一个指定的事件目标派发一个 Event,并以合适的顺序(同步地)调用此事件的监听器回调函数。
268
290
  * @param {string} type 事件类型
269
- * @param {Event} value 事件返回对象
291
+ * @param {UniEvent} value 事件返回对象
270
292
  */
271
- dispatchEvent(type: string, value: Event): void
293
+ dispatchEvent(type: string, value: UniEvent): void
272
294
 
273
295
  /**
274
296
  * 使界面滚动到给定元素的指定坐标位置 仅scroll-view、list-view组件支持
@@ -1,7 +1,7 @@
1
1
  import { UniPageManager } from "./UniPageManager"
2
2
  import { UniCallbackWrapper } from "./UniCallbackWrapper";
3
3
  import { NativeLoadFontFaceOptions } from "./NativeLoadFontFaceOptions"
4
- import { KeyEvent } from "./Event"
4
+ import { UniKeyEvent } from "./UniEvent"
5
5
 
6
6
  /**
7
7
  * @package io.dcloud.uniapp.runtime
@@ -38,7 +38,7 @@ export interface UniApp {
38
38
  /**
39
39
  * 监听app按键监听
40
40
  */
41
- addKeyEventListener(event: 'onBackButton', callback: (event: KeyEvent) => boolean): void
41
+ addKeyEventListener(event: 'onBackButton', callback: (event: UniKeyEvent) => boolean): void
42
42
 
43
43
  /**
44
44
  * 退出app
@@ -0,0 +1,25 @@
1
+ import { UniEvent } from "./UniEvent";
2
+
3
+ /**
4
+ * @package io.dcloud.uniapp.runtime
5
+ */
6
+ export class UniCustomEventOptions<T>{
7
+ detail: T
8
+ constructor (detail: T)
9
+ }
10
+
11
+ /**
12
+ * @package io.dcloud.uniapp.runtime
13
+ */
14
+ export class UniCustomEvent<T> extends UniEvent {
15
+ detail: T
16
+ constructor (type: string, detail: T)
17
+ constructor (type: string, options: UniCustomEventOptions<T>)
18
+ }
19
+
20
+
21
+ export type CustomEventOptions<T> = UniCustomEventOptions<T>
22
+ export const CustomEventOptions: typeof UniCustomEventOptions
23
+
24
+ export type CustomEvent<T> = UniCustomEvent<T>
25
+ export const CustomEvent: typeof UniCustomEvent
@@ -2,9 +2,11 @@ import { CSSStyleDeclaration } from "./CSSStyleDeclaration";
2
2
  import { DOMRect } from "./DOMRect";
3
3
  import { DrawableContext } from "./DrawableContext";
4
4
  import { UniElement, UniViewElement } from "./IUniElement";
5
- import { Event } from './Event'
5
+ import { UniEvent } from './UniEvent'
6
6
  import { TakeSnapshotOptions } from "./SnapshotOptions";
7
7
  import { UniCallbackWrapper } from "./UniCallbackWrapper";
8
+ import { INodeData } from "./NodeData"
9
+ import { PageNode } from "./PageNode"
8
10
 
9
11
  /**
10
12
  * view元素对象
@@ -49,17 +51,18 @@ export class UniElementImpl implements UniElement {
49
51
  updateStyle(map: Map<string, any>): void;
50
52
  getBoundingClientRect(): DOMRect;
51
53
  getDrawableContext(): DrawableContext;
52
- addEventListener<T extends Event, R>(type: string, callback: (event: T) => R): UniCallbackWrapper;
54
+ addEventListener<T extends UniEvent, R>(type: string, callback: (event: T) => R): UniCallbackWrapper;
53
55
  removeEventListener(type: string, callbackWrapper: UniCallbackWrapper): void;
54
56
  removeChild(aChild: UniElement): UniElement | null;
55
57
  remove(): void;
56
- dispatchEvent(type: string, value: Event): void;
58
+ dispatchEvent(type: string, value: UniEvent): void;
57
59
  scrollTo(x: number, y: number): void;
58
60
  scrollBy(x: number, y: number): void;
59
61
  querySelector(selector: string.cssSelectorString): UniElement;
60
62
  querySelectorAll(selector: string.cssSelectorString): UniElement[];
61
63
  focus(): void;
62
64
  blur(): void;
65
+ constructor (data: INodeData, pageNode?: PageNode)
63
66
  }
64
67
 
65
68
  /**
@@ -3,7 +3,7 @@ import { UniElement } from "./IUniElement"
3
3
  /**
4
4
  * @package io.dcloud.uniapp.runtime
5
5
  */
6
- export class Event {
6
+ export class UniEvent {
7
7
  /**
8
8
  * 创建一个新的事件对象
9
9
  * @param {string} type 事件的名称
@@ -42,7 +42,13 @@ export class Event {
42
42
  preventDefault(): void
43
43
  }
44
44
 
45
- export class KeyEvent extends Event{
45
+ export class UniKeyEvent extends UniEvent{
46
46
  readonly keyCode:number
47
47
  readonly keyType:string
48
48
  }
49
+
50
+ export type Event = UniEvent
51
+ export const Event: typeof UniEvent
52
+
53
+ export type KeyEvent = UniKeyEvent
54
+ export const KeyEvent: typeof UniKeyEvent
@@ -0,0 +1,16 @@
1
+ import { UniEvent } from './UniEvent'
2
+
3
+ /**
4
+ * @package io.dcloud.uniapp.runtime
5
+ */
6
+ export class UniImageErrorEvent extends UniEvent {
7
+ detail: {
8
+ /**
9
+ * 错误信息
10
+ */
11
+ errMsg: string
12
+ }
13
+ }
14
+
15
+ export type ImageErrorEvent = UniImageErrorEvent
16
+ export const ImageErrorEvent: typeof UniImageErrorEvent
@@ -0,0 +1,20 @@
1
+ import { UniEvent } from './UniEvent'
2
+
3
+ /**
4
+ * @package io.dcloud.uniapp.runtime
5
+ */
6
+ export class UniImageLoadEvent extends UniEvent {
7
+ detail: {
8
+ /**
9
+ * 图片宽度
10
+ */
11
+ width: number,
12
+ /**
13
+ * 图片高度
14
+ */
15
+ height: number
16
+ }
17
+ }
18
+
19
+ export type ImageLoadEvent = UniImageLoadEvent
20
+ export const ImageLoadEvent: typeof UniImageLoadEvent
@@ -0,0 +1,20 @@
1
+ import { UniEvent } from './UniEvent'
2
+
3
+ /**
4
+ * @package io.dcloud.uniapp.runtime
5
+ */
6
+ export class UniInputBlurEvent extends UniEvent {
7
+ detail: {
8
+ /**
9
+ * 输入框内容
10
+ */
11
+ value: string,
12
+ /**
13
+ * 选择区域的起始位置
14
+ */
15
+ cursor: number
16
+ }
17
+ }
18
+
19
+ export type InputBlurEvent = UniInputBlurEvent
20
+ export const InputBlurEvent: typeof UniInputBlurEvent
@@ -0,0 +1,16 @@
1
+ import { UniEvent } from "./UniEvent";
2
+
3
+ /**
4
+ * @package io.dcloud.uniapp.runtime
5
+ */
6
+ export class UniInputConfirmEvent extends UniEvent {
7
+ detail: {
8
+ /**
9
+ * 输入框内容
10
+ */
11
+ value: string,
12
+ }
13
+ }
14
+
15
+ export type InputConfirmEvent = UniInputConfirmEvent
16
+ export const InputConfirmEvent: typeof UniInputConfirmEvent
@@ -1,9 +1,9 @@
1
- import { Event } from './Event'
1
+ import { UniEvent } from './UniEvent'
2
2
 
3
3
  /**
4
4
  * @package io.dcloud.uniapp.runtime
5
5
  */
6
- export class InputEvent extends Event {
6
+ export class UniInputEvent extends UniEvent {
7
7
  detail: {
8
8
  /**
9
9
  * 输入框内容
@@ -18,4 +18,7 @@ export class InputEvent extends Event {
18
18
  */
19
19
  keyCode: number
20
20
  }
21
- }
21
+ }
22
+
23
+ export type InputEvent = UniInputEvent
24
+ export const InputEvent: typeof UniInputEvent
@@ -1,9 +1,9 @@
1
- import { Event } from "./Event"
1
+ import { UniEvent } from "./UniEvent";
2
2
 
3
3
  /**
4
4
  * @package io.dcloud.uniapp.runtime
5
5
  */
6
- export class TextareaFocusEvent extends Event {
6
+ export class UniInputFocusEvent extends UniEvent {
7
7
  detail: {
8
8
  /**
9
9
  * 键盘高度
@@ -17,7 +17,7 @@ export class TextareaFocusEvent extends Event {
17
17
  * },
18
18
  * "web": {
19
19
  * "uniVer": "x",
20
- * "unixVer": "4.0+"
20
+ * "unixVer": "4.0"
21
21
  * }
22
22
  * }
23
23
  */
@@ -28,3 +28,6 @@ export class TextareaFocusEvent extends Event {
28
28
  value: string
29
29
  }
30
30
  }
31
+
32
+ export type InputFocusEvent = UniInputFocusEvent
33
+ export const InputFocusEvent: typeof UniInputFocusEvent
@@ -0,0 +1,20 @@
1
+ import { UniEvent } from "./UniEvent";
2
+
3
+ /**
4
+ * @package io.dcloud.uniapp.runtime
5
+ */
6
+ export class UniInputKeyboardHeightChangeEvent extends UniEvent {
7
+ detail: {
8
+ /**
9
+ * 键盘高度
10
+ */
11
+ height: number,
12
+ /**
13
+ * 持续时间
14
+ */
15
+ duration: number
16
+ }
17
+ }
18
+
19
+ export type InputKeyboardHeightChangeEvent = UniInputKeyboardHeightChangeEvent
20
+ export const InputKeyboardHeightChangeEvent: typeof UniInputKeyboardHeightChangeEvent
@@ -1,9 +1,9 @@
1
- import { Event } from './Event'
1
+ import { UniEvent } from './UniEvent'
2
2
 
3
3
  /**
4
4
  * @package io.dcloud.uniapp.runtime
5
5
  */
6
- export class NestedPreScrollEvent extends Event {
6
+ export class UniNestedPreScrollEvent extends UniEvent {
7
7
  /**
8
8
  * x轴滚动距离
9
9
  */
@@ -12,25 +12,25 @@ export class NestedPreScrollEvent extends Event {
12
12
  /**
13
13
  * y轴滚动距离
14
14
  */
15
- deltaY: number
16
-
17
- /**
18
- * 是否由触摸行为发生的Event
19
- * @uniPlatform {
20
- * "app": {
21
- * "android": {
22
- * "osVer": "5.0",
23
- * "uniVer": "x",
24
- * "unixVer": "3.99"
25
- * },
26
- * "ios": {
27
- * "osVer": "x",
28
- * "uniVer": "x",
29
- * "unixVer": "x"
30
- * }
31
- * }
32
- * }
33
- */
15
+ deltaY: number
16
+
17
+ /**
18
+ * 是否由触摸行为发生的Event
19
+ * @uniPlatform {
20
+ * "app": {
21
+ * "android": {
22
+ * "osVer": "5.0",
23
+ * "uniVer": "x",
24
+ * "unixVer": "3.99"
25
+ * },
26
+ * "ios": {
27
+ * "osVer": "x",
28
+ * "uniVer": "x",
29
+ * "unixVer": "x"
30
+ * }
31
+ * }
32
+ * }
33
+ */
34
34
  isTouch: boolean
35
35
 
36
36
  /**
@@ -39,4 +39,8 @@ export class NestedPreScrollEvent extends Event {
39
39
  * @param {number} consumedY y轴消耗的滚动距离
40
40
  */
41
41
  consumed(consumedX: number, consumedY: number): void
42
- }
42
+ }
43
+
44
+
45
+ export type NestedPreScrollEvent = UniNestedPreScrollEvent
46
+ export const NestedPreScrollEvent: typeof UniNestedPreScrollEvent
@@ -1,7 +1,7 @@
1
1
  import { UniDocument } from "./UniDocument";
2
2
  import { INodeData } from "./NodeData";
3
- import { PageEvent } from "./PageEvent";
4
- import { PageScrollEvent } from "./PageScrollEvent";
3
+ import { UniPageEvent } from "./UniPageEvent";
4
+ import { UniPageScrollEvent } from "./UniPageScrollEvent";
5
5
  import { NativeLoadFontFaceOptions } from './NativeLoadFontFaceOptions'
6
6
  import { UniCallbackWrapper } from "./UniCallbackWrapper";
7
7
  import { ViewToTempFilePathOptions } from "./ViewToTempFilePathOptions"
@@ -64,12 +64,12 @@ export interface UniPage {
64
64
  | 'onResize'
65
65
  | 'onWebViewServiceMessage'
66
66
  | 'onPopGesture',
67
- callback: (event: PageEvent) => void
67
+ callback: (event: UniPageEvent) => void
68
68
  ): UniCallbackWrapper
69
69
  /**
70
70
  * 监听页面onPageScroll事件
71
71
  */
72
- addPageScrollEventListener(callback: (event: PageScrollEvent) => void): UniCallbackWrapper
72
+ addPageScrollEventListener(callback: (event: UniPageScrollEvent) => void): UniCallbackWrapper
73
73
  viewToTempFilePath(options: ViewToTempFilePathOptions): void
74
74
  /**
75
75
  * 加载自定义字体
@@ -0,0 +1,11 @@
1
+ import { UniEvent } from "./UniEvent";
2
+
3
+ /**
4
+ * @package io.dcloud.uniapp.runtime
5
+ * @autodoc false
6
+ */
7
+ export class UniPageEvent extends UniEvent {
8
+ }
9
+
10
+ export type PageEvent = UniPageEvent
11
+ export const PageEvent: typeof UniPageEvent
@@ -0,0 +1,14 @@
1
+ import { UniPageEvent } from "./UniPageEvent";
2
+
3
+ /**
4
+ * @package io.dcloud.uniapp.runtime
5
+ */
6
+ export class UniPageScrollEvent extends UniPageEvent {
7
+ /**
8
+ * 竖向滚动的距离
9
+ */
10
+ scrollTop: number
11
+ }
12
+
13
+ export type PageScrollEvent = UniPageScrollEvent
14
+ export const PageScrollEvent: typeof UniPageScrollEvent
@@ -1,9 +1,9 @@
1
- import { Event } from './Event'
1
+ import { UniEvent } from './UniEvent'
2
2
 
3
3
  /**
4
4
  * @package io.dcloud.uniapp.runtime
5
5
  */
6
- export class PointerEvent extends Event {
6
+ export class UniPointerEvent extends UniEvent {
7
7
  /**
8
8
  * 相对于页面可显示区域左边的距离
9
9
  */
@@ -62,5 +62,12 @@ export class PointerEvent extends Event {
62
62
  )
63
63
  }
64
64
 
65
- export type MouseEvent = PointerEvent
66
- export const MouseEvent: typeof PointerEvent
65
+ export type PointerEvent = UniPointerEvent
66
+ export const PointerEvent: typeof UniPointerEvent
67
+
68
+ export type MouseEvent = UniPointerEvent
69
+ export const MouseEvent: typeof UniPointerEvent
70
+
71
+ export type UniMouseEvent = UniPointerEvent
72
+ export const UniMouseEvent: typeof UniPointerEvent
73
+
@@ -0,0 +1,14 @@
1
+ import { UniEvent } from './UniEvent'
2
+
3
+ /**
4
+ * @package io.dcloud.uniapp.runtime
5
+ */
6
+ export class UniRefresherEvent extends UniEvent {
7
+ detail: {
8
+ dy: number
9
+ }
10
+ }
11
+
12
+
13
+ export type RefresherEvent = UniRefresherEvent
14
+ export const RefresherEvent: typeof UniRefresherEvent
@@ -1,9 +1,9 @@
1
- import { Event } from "./Event"
1
+ import { UniEvent } from "./UniEvent"
2
2
 
3
3
  /**
4
4
  * @package io.dcloud.uniapp.runtime
5
5
  */
6
- export class ResizeEvent extends Event {
6
+ export class UniResizeEvent extends UniEvent {
7
7
  /**
8
8
  * 设备屏幕方向
9
9
  */
@@ -29,4 +29,7 @@ export class ResizeEvent extends Event {
29
29
  */
30
30
  screenHeight: number
31
31
  }
32
- }
32
+ }
33
+
34
+ export type ResizeEvent = UniResizeEvent
35
+ export const ResizeEvent: typeof UniResizeEvent
@@ -1,9 +1,9 @@
1
- import { Event } from "./Event"
1
+ import { UniEvent } from "./UniEvent"
2
2
 
3
3
  /**
4
4
  * @package io.dcloud.uniapp.runtime
5
5
  */
6
- export class RichTextItemClickEvent extends Event {
6
+ export class UniRichTextItemClickEvent extends UniEvent {
7
7
  detail: {
8
8
  /**
9
9
  * 自定义数据
@@ -19,3 +19,6 @@ export class RichTextItemClickEvent extends Event {
19
19
  href: string | null
20
20
  }
21
21
  }
22
+
23
+ export type RichTextItemClickEvent = UniRichTextItemClickEvent
24
+ export const RichTextItemClickEvent: typeof UniRichTextItemClickEvent
@@ -1,9 +1,9 @@
1
- import { Event } from "./Event"
1
+ import { UniEvent } from "./UniEvent"
2
2
 
3
3
  /**
4
4
  * @package io.dcloud.uniapp.runtime
5
5
  */
6
- export class ScrollEvent extends Event {
6
+ export class UniScrollEvent extends UniEvent {
7
7
  detail: {
8
8
  /**
9
9
  * 竖向滚动的距离
@@ -30,4 +30,7 @@ export class ScrollEvent extends Event {
30
30
  */
31
31
  deltaX: number
32
32
  }
33
- }
33
+ }
34
+
35
+ export type ScrollEvent = UniScrollEvent
36
+ export const ScrollEvent: typeof UniScrollEvent
@@ -0,0 +1,16 @@
1
+ import { UniEvent } from "./UniEvent"
2
+
3
+ /**
4
+ * @package io.dcloud.uniapp.runtime
5
+ */
6
+ export class UniScrollToLowerEvent extends UniEvent {
7
+ detail: {
8
+ /**
9
+ * 滚动方向 bottom 或 right
10
+ */
11
+ direction: string
12
+ }
13
+ }
14
+
15
+ export type ScrollToLowerEvent = UniScrollToLowerEvent
16
+ export const ScrollToLowerEvent: typeof UniScrollToLowerEvent
@@ -0,0 +1,16 @@
1
+ import { UniEvent } from "./UniEvent"
2
+
3
+ /**
4
+ * @package io.dcloud.uniapp.runtime
5
+ */
6
+ export class UniScrollToUpperEvent extends UniEvent {
7
+ detail: {
8
+ /**
9
+ * 滚动方向 top 或 left
10
+ */
11
+ direction: string
12
+ }
13
+ }
14
+
15
+ export type ScrollToUpperEvent = UniScrollToUpperEvent
16
+ export const ScrollToUpperEvent: typeof UniScrollToUpperEvent