@dcloudio/uni-app-x 0.7.0 → 0.7.1

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.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "uni-app x types",
5
5
  "typings": "index.d.ts",
6
6
  "author": "DCloud",
@@ -705,7 +705,7 @@ export interface UniTextElement extends UniElement {
705
705
  getTextExtra(): any | null
706
706
  }
707
707
 
708
- export type TextElement = UniTabsElement
708
+ export type TextElement = UniTextElement
709
709
 
710
710
  /**
711
711
  * web-view元素对象
@@ -9,5 +9,9 @@ export class InputBlurEvent extends Event {
9
9
  * 输入框内容
10
10
  */
11
11
  value: string,
12
+ /**
13
+ * 选择区域的起始位置
14
+ */
15
+ cursor: number
12
16
  }
13
17
  }
@@ -5,7 +5,7 @@
5
5
  export interface INodeData {
6
6
  id: string
7
7
  name: string
8
- attrs?: Map<string, any | null>
8
+ attrs: Map<string, any | null>
9
9
  style: Map<string, any | null>
10
10
  }
11
11
 
@@ -16,6 +16,7 @@ export interface INodeData {
16
16
  export class NodeData implements INodeData {
17
17
  id: string
18
18
  name: string
19
- attrs?: Map<string, any | null>
19
+ attrs: Map<string, any | null>
20
20
  style: Map<string, any | null>
21
+ constructor (id: string, name: string, attrs: Map<string, any | null>, style: Map<string, any | null>)
21
22
  }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @package io.dcloud.uniapp.dom.node
3
+ */
4
+ export class PageNode {
5
+
6
+ }
@@ -7,6 +7,19 @@ export class TextareaFocusEvent extends Event {
7
7
  detail: {
8
8
  /**
9
9
  * 键盘高度
10
+ * @uniPlatform {
11
+ * "app": {
12
+ * "android": {
13
+ * "osVer": "5.0",
14
+ * "uniVer": "√",
15
+ * "unixVer": "√"
16
+ * }
17
+ * },
18
+ * "web": {
19
+ * "uniVer": "x",
20
+ * "unixVer": "x"
21
+ * }
22
+ * }
10
23
  */
11
24
  height: number,
12
25
  /**
@@ -14,4 +27,4 @@ export class TextareaFocusEvent extends Event {
14
27
  */
15
28
  value: string
16
29
  }
17
- }
30
+ }
@@ -28,6 +28,8 @@ export interface UniDocument extends UniElement {
28
28
  * 页面排版完毕回调callback
29
29
  */
30
30
  waitNativeRender(callback: () => void): void
31
+
32
+ getElementById(id: string): UniElement | null
31
33
  }
32
34
 
33
35
  export type IDocument = UniDocument
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @package io.dcloud.uniapp.runtime
3
+ */
4
+ export declare interface UniFormControl<T> {
5
+ reset(): void,
6
+ value: T,
7
+ name: string
8
+ }
@@ -0,0 +1,14 @@
1
+ import { PageNode } from "./PageNode";
2
+ import { UniElementImpl } from "./UniElement"
3
+ import { UniFormControl } from "./UniFormControl"
4
+
5
+ /**
6
+ * @package io.dcloud.uniapp.dom.node
7
+ */
8
+ export class UniFormControlElement<T> extends UniElementImpl implements UniFormControl<T> {
9
+ constructor (data: INodeData, pageNode: PageNode)
10
+ reset(): void;
11
+ get value(): T;
12
+ set value(value: T);
13
+ name: string
14
+ }
@@ -25,6 +25,7 @@ import {
25
25
  IPageManager as IPageManagerOrigin,
26
26
  UniPage as UniPageOrigin,
27
27
  IPage as IPageOrigin,
28
+ UniFormControlElement as UniFormControlElementOrigin,
28
29
  UniError as UniErrorOrigin,
29
30
  UniElementImpl as UniElementImplOrigin,
30
31
  UniViewElementImpl as UniViewElementImplOrigin,
@@ -60,6 +61,7 @@ import {
60
61
  ResizeEvent as ResizeEventOrigin,
61
62
  RefresherEvent as RefresherEventOrigin,
62
63
  PageScrollEvent as PageScrollEventOrigin,
64
+ PageNode as PageNodeOrigin,
63
65
  PageEvent as PageEventOrigin,
64
66
  NodeData as NodeDataOrigin,
65
67
  INodeData as INodeDataOrigin,
@@ -153,6 +155,8 @@ declare global {
153
155
  type IPageManager = IPageManagerOrigin
154
156
  type UniPage = UniPageOrigin
155
157
  type IPage = IPageOrigin
158
+ const UniFormControlElement: typeof UniFormControlElementOrigin
159
+ type UniFormControlElement<T> = UniFormControlElementOrigin<T>
156
160
  const UniError: typeof UniErrorOrigin
157
161
  type UniError = UniErrorOrigin
158
162
  const UniElementImpl: typeof UniElementImplOrigin
@@ -213,6 +217,8 @@ declare global {
213
217
  type RefresherEvent = RefresherEventOrigin
214
218
  const PageScrollEvent: typeof PageScrollEventOrigin
215
219
  type PageScrollEvent = PageScrollEventOrigin
220
+ const PageNode: typeof PageNodeOrigin
221
+ type PageNode = PageNodeOrigin
216
222
  const PageEvent: typeof PageEventOrigin
217
223
  type PageEvent = PageEventOrigin
218
224
  const NodeData: typeof NodeDataOrigin
@@ -12,6 +12,8 @@ export * from './UniTextElement'
12
12
  export * from './UniTabsElement'
13
13
  export * from './UniPageManager'
14
14
  export * from './UniPage'
15
+ export * from './UniFormControlElement'
16
+ export * from './UniFormControl'
15
17
  export * from './UniError'
16
18
  export * from './UniElement'
17
19
  export * from './UniDocument'
@@ -38,6 +40,7 @@ export * from './RichTextItemClickEvent'
38
40
  export * from './ResizeEvent'
39
41
  export * from './RefresherEvent'
40
42
  export * from './PageScrollEvent'
43
+ export * from './PageNode'
41
44
  export * from './PageEvent'
42
45
  export * from './NodeData'
43
46
  export * from './NestedPreScrollEvent'