@dcloudio/uni-app-x 0.7.78 → 0.7.80
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 +3 -2
- package/types/dom2/UniCSSProperty.d.ts +0 -1
- package/types/dom2/UniCSSTransform.d.ts +1 -1
- package/types/dom2/UniCSSTransition.d.ts +30 -6
- package/types/dom2/UniElement.d.ts +5 -0
- package/types/dom2/UniNativeBaseView.d.ts +16 -18
- package/types/dom2/UniNativeDefines.d.ts +12 -54
- package/types/dom2/UniNativeViewElement.d.ts +60 -0
- package/types/dom2/UniPage.d.ts +36 -3
- package/types/dom2/UniTextElement.d.ts +12 -0
- package/types/dom2/UniTextLayout.d.ts +7 -0
- package/types/dom2/global.d.ts +24 -13
- package/types/dom2/sharedData.d.ts +23 -6
- package/types/dom2-internal/UniElement.d.ts +15 -0
- package/types/native/UniPage.d.ts +105 -0
- package/types/uni/global.d.ts +0 -2
- package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/global.d.ts +7 -6
- package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/index.d.ts +4 -3
- package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/interface.d.ts +2 -1
- package/types/uni/uts-plugin-api/lib/uni-getBackgroundAudioManager/utssdk/interface.d.ts +2 -2
- package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/global.d.ts +7 -6
- package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/index.d.ts +4 -3
- package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +69 -23
- package/types/uni/uts-plugin-api/lib/uni-media/utssdk/global.d.ts +7 -40
- package/types/uni/uts-plugin-api/lib/uni-media/utssdk/index.d.ts +4 -20
- package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +66 -495
- package/types/uni/uts-plugin-biz/global.d.ts +1 -0
- package/types/uni/uts-plugin-biz/index.d.ts +1 -0
- package/types/uni/uts-plugin-biz/lib/uni-crash/utssdk/global.d.ts +9 -8
- package/types/uni/uts-plugin-biz/lib/uni-crash/utssdk/index.d.ts +5 -4
- package/types/uni/uts-plugin-biz/lib/uni-crash/utssdk/interface.d.ts +29 -28
- package/types/uni/uts-plugin-biz/lib/uni-map-amap/utssdk/global.d.ts +14 -0
- package/types/uni/uts-plugin-biz/lib/uni-map-amap/utssdk/index.d.ts +7 -0
- package/types/uni/uts-plugin-biz/lib/uni-map-amap/utssdk/interface.d.ts +101 -0
- package/types/uni/uts-plugin-component/global.d.ts +5 -0
- package/types/uni/uts-plugin-component/index.d.ts +5 -0
- package/types/uni/uts-plugin-component/lib/uni-camera-global/utssdk/global.d.ts +23 -0
- package/types/uni/uts-plugin-component/lib/uni-camera-global/utssdk/index.d.ts +12 -0
- package/types/uni/uts-plugin-component/lib/uni-camera-global/utssdk/interface.d.ts +38 -0
- package/types/uni/{uni-map-tencent-global.d.ts → uts-plugin-component/lib/uni-map-tencent-global/utssdk/global.d.ts} +22 -20
- package/types/uni/uts-plugin-component/lib/uni-map-tencent-global/utssdk/index.d.ts +20 -0
- package/types/uni/uts-plugin-component/lib/uni-map-tencent-global/utssdk/interface.d.ts +56 -0
- package/types/uni/uts-plugin-component/lib/uni-video-global/utssdk/global.d.ts +39 -0
- package/types/uni/uts-plugin-component/lib/uni-video-global/utssdk/index.d.ts +20 -0
- package/types/uni/uts-plugin-component/lib/uni-video-global/utssdk/interface.d.ts +94 -0
- package/types/uni/uts-plugin-component/lib/uni-web-view/utssdk/global.d.ts +29 -0
- package/types/uni/uts-plugin-component/lib/uni-web-view/utssdk/index.d.ts +14 -0
- package/types/uni/uts-plugin-component/lib/uni-web-view/utssdk/interface.d.ts +431 -0
- package/types/uni/uts-plugin-component/lib/uni-web-view-global/utssdk/global.d.ts +31 -0
- package/types/uni/uts-plugin-component/lib/uni-web-view-global/utssdk/index.d.ts +16 -0
- package/types/uni/uts-plugin-component/lib/uni-web-view-global/utssdk/interface.d.ts +51 -0
- package/types/uni/uni-camera-global.d.ts +0 -23
- package/types/uni/uni-camera.d.ts +0 -35
- package/types/uni/uni-map-tencent-map.d.ts +0 -63
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcloudio/uni-app-x",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.80",
|
|
4
4
|
"description": "uni-app x types",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"main": "index.d.ts",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"glob": "^10.3.3",
|
|
31
31
|
"minimist": "^1.2.8",
|
|
32
32
|
"miniprogram-api-typings": "^4.0.7",
|
|
33
|
-
"ts-morph": "^23.0.0"
|
|
33
|
+
"ts-morph": "^23.0.0",
|
|
34
|
+
"typescript": "^5.9.3"
|
|
34
35
|
}
|
|
35
36
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* transition-timing-function 类型
|
|
4
4
|
*/
|
|
5
|
-
export enum
|
|
5
|
+
export enum UniCSSTransitionTimingFunctionType {
|
|
6
6
|
Ease,
|
|
7
7
|
EaseIn,
|
|
8
8
|
EaseOut,
|
|
@@ -42,18 +42,23 @@ export interface UniCSSTransitionTimingFunction {
|
|
|
42
42
|
/**
|
|
43
43
|
* 动画过渡的速度曲线类型
|
|
44
44
|
*/
|
|
45
|
-
type:
|
|
45
|
+
type: UniCSSTransitionTimingFunctionType
|
|
46
46
|
/**
|
|
47
47
|
* 动画过渡的贝塞尔值
|
|
48
48
|
* 当 timingFunction 为 CubicBezier 时使用
|
|
49
49
|
*/
|
|
50
50
|
timingCubicBezier?: UniCSSCubicBezier | null,
|
|
51
|
-
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* transition-timing-function 数据(多项)
|
|
55
|
+
*/
|
|
56
|
+
export type UniCSSTransitionTimingFunctions = UniCSSTransitionTimingFunction[]
|
|
52
57
|
|
|
53
58
|
/**
|
|
54
59
|
* transition 变换项数据
|
|
55
60
|
*/
|
|
56
|
-
export interface
|
|
61
|
+
export interface UniCSSTransition {
|
|
57
62
|
/**
|
|
58
63
|
* 动画持续时间
|
|
59
64
|
* 单位为ms
|
|
@@ -75,8 +80,27 @@ export interface UniCSSTransitionItem {
|
|
|
75
80
|
}
|
|
76
81
|
|
|
77
82
|
/**
|
|
78
|
-
* CSS transition
|
|
83
|
+
* CSS transition 变换数据(多项)
|
|
79
84
|
*/
|
|
80
|
-
export type
|
|
85
|
+
export type UniCSSTransitions = UniCSSTransition[]
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* CSS transition-property 数据
|
|
89
|
+
*/
|
|
90
|
+
export type UniCSSTransitionProperty = UniCSSPropertyID
|
|
91
|
+
export type UniCSSTransitionProperties = UniCSSPropertyID[]
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* CSS transition-duration 数据
|
|
95
|
+
*/
|
|
96
|
+
export type UniCSSTransitionDuration = number
|
|
97
|
+
export type UniCSSTransitionDurations = number[]
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* CSS transition-delay 数据
|
|
101
|
+
*/
|
|
102
|
+
export type UniCSSTransitionDelay = number
|
|
103
|
+
export type UniCSSTransitionDelays = number[]
|
|
104
|
+
|
|
81
105
|
|
|
82
106
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { UniNativeColor } from './UniNativeDefines'
|
|
2
|
-
import { UniCSSPropertyID
|
|
3
|
-
import { UniNativeLayout,
|
|
2
|
+
import { UniCSSPropertyID } from './UniCSSProperty'
|
|
3
|
+
import { UniNativeLayout, UniNativePadding } from './UniNativeDefines'
|
|
4
4
|
import { UniNativeBackgroundClip, UniNativeBackgroundImage } from './UniNativeDefines'
|
|
5
|
-
import {
|
|
5
|
+
import { UniNativeBorderWidths, UniNativeBorderWidth, UniNativeBorderStyles, UniNativeBorderStyle, UniNativeBorderColors, UniNativeBorderColor, UniNativeBorderRadiuses, UniNativeBorderRadius } from './UniNativeDefines'
|
|
6
6
|
import { UniNativeBoxShadow, UniNativeOverflowType, UniNativeDisplayType, UniNativePointerEventType, UniNativePositionType, UniNativeVisibilityType } from './UniNativeDefines'
|
|
7
7
|
import { UniNativeSlotType, UniNativeTransform, UniNativeTransformOrigin } from './UniNativeDefines'
|
|
8
|
-
import { UniNativeTransition, UniNativeTransitions, UniNativeTransitionProperty,
|
|
8
|
+
import { UniNativeTransition, UniNativeTransitions, UniNativeTransitionProperty, UniNativeTransitionProperties, UniNativeTransitionDuration, UniNativeTransitionDurations, UniNativeTransitionDelay, UniNativeTransitionDelays, UniNativeTransitionTimingFunction, UniNativeTransitionTimingFunctions } from './UniNativeDefines'
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -22,7 +22,7 @@ export interface UniNativeBaseView {
|
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* 插槽名称
|
|
25
|
-
* 默认为UniNativeSlotType.
|
|
25
|
+
* 默认为UniNativeSlotType.None,提供给特定场景(如自定义下拉刷新)使用
|
|
26
26
|
*/
|
|
27
27
|
slot: UniNativeSlotType
|
|
28
28
|
|
|
@@ -60,9 +60,11 @@ export interface UniNativeBaseView {
|
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
62
|
* 设置内边距
|
|
63
|
+
* 只有排版完成后操作,vue框架不需要操作此API
|
|
63
64
|
* value为UniNativePadding类型表示设置所有内边距值都相同
|
|
64
65
|
*/
|
|
65
|
-
padding(value:
|
|
66
|
+
padding(value: UniNativePadding): UniNativeBaseView
|
|
67
|
+
padding(left: number, top: number, right: number, bottom: number): UniNativeBaseView
|
|
66
68
|
// 废弃单独设置内边距:排版引擎每次都是全值更新,不需要单独更新
|
|
67
69
|
// paddingTop(value: UniNativePadding): UniNativeBaseView
|
|
68
70
|
// paddingRight(value: UniNativePadding): UniNativeBaseView
|
|
@@ -71,16 +73,8 @@ export interface UniNativeBaseView {
|
|
|
71
73
|
|
|
72
74
|
/**
|
|
73
75
|
* 边框相关
|
|
76
|
+
* - 去掉简写border数据结构及相关API,DOM API实现时在UniElement中分拆样式设置
|
|
74
77
|
*/
|
|
75
|
-
/**
|
|
76
|
-
* 设置完整边框
|
|
77
|
-
* value - null表示无边框,默认无边框
|
|
78
|
-
*/
|
|
79
|
-
border(value: UniNativeBorders | null): UniNativeBaseView
|
|
80
|
-
borderTop(value: UniNativeBorder | null): UniNativeBaseView
|
|
81
|
-
borderRight(value: UniNativeBorder | null): UniNativeBaseView
|
|
82
|
-
borderBottom(value: UniNativeBorder | null): UniNativeBaseView
|
|
83
|
-
borderLeft(value: UniNativeBorder | null): UniNativeBaseView
|
|
84
78
|
/**
|
|
85
79
|
* 设置边框样式
|
|
86
80
|
*/
|
|
@@ -93,7 +87,8 @@ export interface UniNativeBaseView {
|
|
|
93
87
|
* 设置边框宽度
|
|
94
88
|
* 只有排版完成后操作,vue框架不需要操作此API
|
|
95
89
|
*/
|
|
96
|
-
borderWidth(value: UniNativeBorderWidths
|
|
90
|
+
borderWidth(value: UniNativeBorderWidths): UniNativeBaseView
|
|
91
|
+
borderWidth(left: number, top: number, right: number, bottom: number): UniNativeBaseView
|
|
97
92
|
// 废弃单独设置边框:排版引擎每次都是全值更新,不需要单独更新
|
|
98
93
|
// borderWidthTop(value: UniNativeBorderWidth): UniNativeBaseView
|
|
99
94
|
// borderWidthRight(value: UniNativeBorderWidth): UniNativeBaseView
|
|
@@ -107,6 +102,7 @@ export interface UniNativeBaseView {
|
|
|
107
102
|
borderColorRight(value: UniNativeBorderColor): UniNativeBaseView
|
|
108
103
|
borderColorBottom(value: UniNativeBorderColor): UniNativeBaseView
|
|
109
104
|
borderColorLeft(value: UniNativeBorderColor): UniNativeBaseView
|
|
105
|
+
|
|
110
106
|
/**
|
|
111
107
|
* 设置边框圆角
|
|
112
108
|
*/
|
|
@@ -214,9 +210,11 @@ export interface UniNativeBaseView {
|
|
|
214
210
|
|
|
215
211
|
/**
|
|
216
212
|
* CSS: transition
|
|
213
|
+
* 设置transition动画
|
|
214
|
+
* 注意:transition/transition-property属性值设置为none时,解析设置null值
|
|
217
215
|
*/
|
|
218
|
-
transition(value
|
|
219
|
-
transitionProperty(value
|
|
216
|
+
transition(value?: UniNativeTransition | UniNativeTransitions | null): UniNativeBaseView
|
|
217
|
+
transitionProperty(value?: UniNativeTransitionProperty | UniNativeTransitionProperties | null): UniNativeBaseView
|
|
220
218
|
transitionDuration(value: UniNativeTransitionDuration | UniNativeTransitionDurations): UniNativeBaseView
|
|
221
219
|
transitionDelay(value: UniNativeTransitionDelay | UniNativeTransitionDelays): UniNativeBaseView
|
|
222
220
|
transitionTimingFunction(value: UniNativeTransitionTimingFunction | UniNativeTransitionTimingFunctions): UniNativeBaseView
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { UniSize, UniPosition, UniLTWH, UniLTRB, UniCSSPropertyID, UniCSSUnitValue } from './index'
|
|
8
8
|
import { UniCSSTransform, UniCSSTransformOrigin } from './UniCSSTransform'
|
|
9
|
-
import {
|
|
9
|
+
import { UniCSSTransition, UniCSSTransitions, UniCSSTransitionProperty, UniCSSTransitionProperties, UniCSSTransitionTimingFunction, UniCSSTransitionTimingFunctions, UniCSSTransitionDuration, UniCSSTransitionDurations, UniCSSTransitionDelay, UniCSSTransitionDelays } from './UniCSSTransition'
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -125,14 +125,11 @@ export type UniNativeLayoutSize = UniSize
|
|
|
125
125
|
*/
|
|
126
126
|
export type UniNativeLayoutPosition = UniPosition
|
|
127
127
|
|
|
128
|
-
|
|
129
|
-
* 内边距
|
|
130
|
-
*/
|
|
131
|
-
export type UniNativePadding = number
|
|
128
|
+
|
|
132
129
|
/**
|
|
133
130
|
* 内边距信息
|
|
134
131
|
*/
|
|
135
|
-
export type
|
|
132
|
+
export type UniNativePadding = UniLTRB
|
|
136
133
|
|
|
137
134
|
/**
|
|
138
135
|
* 外边距
|
|
@@ -146,45 +143,6 @@ export type UniNativeMargins = UniLTRB
|
|
|
146
143
|
/**
|
|
147
144
|
* 边框信息
|
|
148
145
|
*/
|
|
149
|
-
export type UniNativeBorders = {
|
|
150
|
-
/**
|
|
151
|
-
* 边框宽度
|
|
152
|
-
*/
|
|
153
|
-
width: UniNativeBorderWidths
|
|
154
|
-
/**
|
|
155
|
-
* 边框颜色
|
|
156
|
-
*/
|
|
157
|
-
color: UniNativeBorderColors
|
|
158
|
-
/**
|
|
159
|
-
* 边框圆角半径
|
|
160
|
-
* 与Web规范保持一致,不再需要radius属性
|
|
161
|
-
*/
|
|
162
|
-
// radius: UniNativeBorderRadiuses
|
|
163
|
-
/**
|
|
164
|
-
* 比那款样式
|
|
165
|
-
*/
|
|
166
|
-
style: UniNativeBorderStyles
|
|
167
|
-
}
|
|
168
|
-
export type UniNativeBorder = {
|
|
169
|
-
/**
|
|
170
|
-
* 边框宽度
|
|
171
|
-
*/
|
|
172
|
-
width: UniNativeBorderWidth
|
|
173
|
-
/**
|
|
174
|
-
* 边框颜色
|
|
175
|
-
*/
|
|
176
|
-
color: UniNativeBorderColor
|
|
177
|
-
/**
|
|
178
|
-
* 边框圆角半径
|
|
179
|
-
* Web规范保持一致,不再需要radius属性
|
|
180
|
-
*/
|
|
181
|
-
// radius: UniNativeBorderRadius
|
|
182
|
-
/**
|
|
183
|
-
* 比那款样式
|
|
184
|
-
*/
|
|
185
|
-
style: UniNativeBorderStyle
|
|
186
|
-
}
|
|
187
|
-
|
|
188
146
|
/**
|
|
189
147
|
* 边框宽度类型
|
|
190
148
|
*/
|
|
@@ -437,16 +395,16 @@ export type UniNativeTransformOrigin = UniCSSTransformOrigin
|
|
|
437
395
|
/**
|
|
438
396
|
* transition数据类型
|
|
439
397
|
*/
|
|
440
|
-
export type UniNativeTransition =
|
|
441
|
-
export type UniNativeTransitions =
|
|
442
|
-
export type UniNativeTransitionProperty =
|
|
443
|
-
export type
|
|
444
|
-
export type UniNativeTransitionDuration =
|
|
445
|
-
export type UniNativeTransitionDurations =
|
|
446
|
-
export type UniNativeTransitionDelay =
|
|
447
|
-
export type UniNativeTransitionDelays =
|
|
398
|
+
export type UniNativeTransition = UniCSSTransition
|
|
399
|
+
export type UniNativeTransitions = UniCSSTransitions
|
|
400
|
+
export type UniNativeTransitionProperty = UniCSSTransitionProperty
|
|
401
|
+
export type UniNativeTransitionProperties = UniCSSTransitionProperties
|
|
402
|
+
export type UniNativeTransitionDuration = UniCSSTransitionDuration
|
|
403
|
+
export type UniNativeTransitionDurations = UniCSSTransitionDurations
|
|
404
|
+
export type UniNativeTransitionDelay = UniCSSTransitionDelay
|
|
405
|
+
export type UniNativeTransitionDelays = UniCSSTransitionDelays
|
|
448
406
|
export type UniNativeTransitionTimingFunction = UniCSSTransitionTimingFunction
|
|
449
|
-
export type UniNativeTransitionTimingFunctions =
|
|
407
|
+
export type UniNativeTransitionTimingFunctions = UniCSSTransitionTimingFunctions
|
|
450
408
|
|
|
451
409
|
|
|
452
410
|
|
|
@@ -7,6 +7,66 @@ import { UniElement } from './index'
|
|
|
7
7
|
*/
|
|
8
8
|
export interface UniNativeViewElement extends UniElement {
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* 设置组件需要重新触发测量排版
|
|
12
|
+
*/
|
|
13
|
+
setDirty(): void
|
|
10
14
|
|
|
15
|
+
/**
|
|
16
|
+
* 设置测量回调,多次调用会覆盖之前设置的测量回调
|
|
17
|
+
* @param callback 测量回调方法
|
|
18
|
+
* 注意:此回调方法运行在子线程中,需处理线程安全问题
|
|
19
|
+
*/
|
|
20
|
+
setMeasureCallback(callback: UniNativeMeasureCallback): void
|
|
11
21
|
}
|
|
12
22
|
|
|
23
|
+
/**
|
|
24
|
+
* 测量回调方法
|
|
25
|
+
* @param - res
|
|
26
|
+
*/
|
|
27
|
+
type UniNativeMeasureCallback = (res: UniNativeMeasureSpecification) => UniNativeMeasureSize
|
|
28
|
+
/**
|
|
29
|
+
* 测量约束对象
|
|
30
|
+
*/
|
|
31
|
+
interface UniNativeMeasureSpecification {
|
|
32
|
+
/**
|
|
33
|
+
* 宽度约束值
|
|
34
|
+
* 不同平台单位存在差异:
|
|
35
|
+
* - Android平台为物理像素
|
|
36
|
+
* - iOS/鸿蒙平台为逻辑像素
|
|
37
|
+
*/
|
|
38
|
+
width: number,
|
|
39
|
+
/**
|
|
40
|
+
* 宽度约束模式
|
|
41
|
+
*/
|
|
42
|
+
widthMode: UniNativeMeasureMode,
|
|
43
|
+
/**
|
|
44
|
+
* 高度约束值
|
|
45
|
+
* 不同平台单位存在差异:
|
|
46
|
+
* - Android平台为物理像素
|
|
47
|
+
* - iOS/鸿蒙平台为逻辑像素
|
|
48
|
+
*/
|
|
49
|
+
height: number,
|
|
50
|
+
/**
|
|
51
|
+
* 高度约束模式
|
|
52
|
+
*/
|
|
53
|
+
heightMode: UniNativeMeasureMode,
|
|
54
|
+
}
|
|
55
|
+
type UniNativeMeasureSize = UniLayoutSize
|
|
56
|
+
/**
|
|
57
|
+
* 测量约束模式
|
|
58
|
+
*/
|
|
59
|
+
export enum UniNativeMeasureMode {
|
|
60
|
+
/**
|
|
61
|
+
* 父元素对测量的子元素无任何限制,子元素可以是它想要的任意大小
|
|
62
|
+
*/
|
|
63
|
+
Undefined,
|
|
64
|
+
/**
|
|
65
|
+
* 父元素对测量的子元素确定了一个精确的尺寸,子元素必须使用这个尺寸
|
|
66
|
+
*/
|
|
67
|
+
Exactly,
|
|
68
|
+
/**
|
|
69
|
+
* 父元素对测量的子元素限定的最大尺寸,子元素不能超过此尺寸
|
|
70
|
+
*/
|
|
71
|
+
AtMost,
|
|
72
|
+
}
|
package/types/dom2/UniPage.d.ts
CHANGED
|
@@ -111,10 +111,29 @@ declare global {
|
|
|
111
111
|
*/
|
|
112
112
|
increaseNativeViewCounter(count: number): void
|
|
113
113
|
|
|
114
|
+
/**
|
|
115
|
+
* 监听页面触摸事件
|
|
116
|
+
* 注意:这些事件不受事件冒泡影响,也无法阻止默认行为
|
|
117
|
+
*/
|
|
118
|
+
/**
|
|
119
|
+
* 监听页面触摸开始事件
|
|
120
|
+
*/
|
|
121
|
+
onTouchStart(callback: UniPageOnTouchEventCallbakc): number
|
|
122
|
+
/**
|
|
123
|
+
* 取消监听页面触摸开始事件
|
|
124
|
+
*/
|
|
125
|
+
offTouchStart(id: number): void
|
|
126
|
+
/**
|
|
127
|
+
* 监听页面触摸结束事件
|
|
128
|
+
*/
|
|
129
|
+
onTouchEnd(callback: UniPageOnTouchEventCallbakc): number
|
|
130
|
+
/**
|
|
131
|
+
* 取消监听页面触摸结束事件
|
|
132
|
+
*/
|
|
133
|
+
offTouchEnd(id: number): void
|
|
114
134
|
|
|
115
135
|
/**
|
|
116
136
|
* 监听页面布局变化更新事件
|
|
117
|
-
* 前端封装为页面的生命周期 onLayout
|
|
118
137
|
* @internal
|
|
119
138
|
*/
|
|
120
139
|
onLayoutChange(callback: UniPageOnLayoutChangeCallback): number
|
|
@@ -126,7 +145,6 @@ declare global {
|
|
|
126
145
|
|
|
127
146
|
/**
|
|
128
147
|
* 监听页面渲染变化更新事件
|
|
129
|
-
* 前端封装为页面的生命周期 onLayout
|
|
130
148
|
* @internal
|
|
131
149
|
*/
|
|
132
150
|
onRenderChange(callback: UniPageOnRenderChangeCallback): number
|
|
@@ -145,6 +163,11 @@ declare global {
|
|
|
145
163
|
defineStyleVariable(key: string, value: string): void
|
|
146
164
|
}
|
|
147
165
|
|
|
166
|
+
/**
|
|
167
|
+
* 监听页面触摸事件回调函数
|
|
168
|
+
*/
|
|
169
|
+
type UniPageOnTouchEventCallbakc = (event: UniTouchEvent) => void
|
|
170
|
+
|
|
148
171
|
/**
|
|
149
172
|
* 监听页面布局变化更新事件回调函数
|
|
150
173
|
*/
|
|
@@ -161,7 +184,7 @@ declare global {
|
|
|
161
184
|
/**
|
|
162
185
|
* 监听页面布局变化更新事件回调参数
|
|
163
186
|
*/
|
|
164
|
-
type UniPageOnRenderChangeCallbackResult =
|
|
187
|
+
type UniPageOnRenderChangeCallbackResult = UniPagePerformanceRenderTiming
|
|
165
188
|
|
|
166
189
|
/**
|
|
167
190
|
* 页面性能计时信息
|
|
@@ -172,5 +195,15 @@ declare global {
|
|
|
172
195
|
*/
|
|
173
196
|
duration: number
|
|
174
197
|
}
|
|
198
|
+
/**
|
|
199
|
+
* 渲染性能计时信息
|
|
200
|
+
* UniPagePerformanceTiming基类的duration属性为渲染到屏幕的总时间
|
|
201
|
+
*/
|
|
202
|
+
interface UniPagePerformanceRenderTiming extends UniPagePerformanceTiming {
|
|
203
|
+
/**
|
|
204
|
+
* 更新渲染属性的总时间,单位为ms
|
|
205
|
+
*/
|
|
206
|
+
updateDuration: number
|
|
207
|
+
}
|
|
175
208
|
}
|
|
176
209
|
export { }
|
|
@@ -34,6 +34,11 @@ declare global {
|
|
|
34
34
|
*/
|
|
35
35
|
setLayoutText(text: UniTextLayout): void;
|
|
36
36
|
|
|
37
|
+
/**
|
|
38
|
+
* 设置渲染标识,用于复用内部TextLayout
|
|
39
|
+
*/
|
|
40
|
+
setRenderKey(key: string): void
|
|
41
|
+
|
|
37
42
|
/**
|
|
38
43
|
* 设置文本最大行数
|
|
39
44
|
* 支持 max-lines 属性,废弃dom1中css lines属性
|
|
@@ -58,6 +63,13 @@ declare global {
|
|
|
58
63
|
*/
|
|
59
64
|
setColor(color: UniNativeColor): void
|
|
60
65
|
|
|
66
|
+
/**
|
|
67
|
+
* 设置背景颜色
|
|
68
|
+
* @param color
|
|
69
|
+
* UniNativeColor - 平台颜色类型
|
|
70
|
+
*/
|
|
71
|
+
setBackgroundColor(color: UniNativeColor): void
|
|
72
|
+
|
|
61
73
|
/**
|
|
62
74
|
* 设置字体名称
|
|
63
75
|
*/
|
package/types/dom2/global.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// 本文件为自动构建生成
|
|
2
2
|
import {
|
|
3
3
|
UniNativeViewType as UniNativeViewTypeOrigin,
|
|
4
|
+
UniNativeMeasureMode as UniNativeMeasureModeOrigin,
|
|
4
5
|
UniNativeViewElement as UniNativeViewElementOrigin,
|
|
5
6
|
UniNativeView as UniNativeViewOrigin,
|
|
6
7
|
UniNativeViewStyles as UniNativeViewStylesOrigin,
|
|
@@ -26,11 +27,8 @@ import {
|
|
|
26
27
|
UniNativeLayoutSize as UniNativeLayoutSizeOrigin,
|
|
27
28
|
UniNativeLayoutPosition as UniNativeLayoutPositionOrigin,
|
|
28
29
|
UniNativePadding as UniNativePaddingOrigin,
|
|
29
|
-
UniNativePaddings as UniNativePaddingsOrigin,
|
|
30
30
|
UniNativeMargin as UniNativeMarginOrigin,
|
|
31
31
|
UniNativeMargins as UniNativeMarginsOrigin,
|
|
32
|
-
UniNativeBorders as UniNativeBordersOrigin,
|
|
33
|
-
UniNativeBorder as UniNativeBorderOrigin,
|
|
34
32
|
UniNativeBorderWidth as UniNativeBorderWidthOrigin,
|
|
35
33
|
UniNativeBorderWidths as UniNativeBorderWidthsOrigin,
|
|
36
34
|
UniNativeBorderColor as UniNativeBorderColorOrigin,
|
|
@@ -44,7 +42,7 @@ import {
|
|
|
44
42
|
UniNativeTransition as UniNativeTransitionOrigin,
|
|
45
43
|
UniNativeTransitions as UniNativeTransitionsOrigin,
|
|
46
44
|
UniNativeTransitionProperty as UniNativeTransitionPropertyOrigin,
|
|
47
|
-
|
|
45
|
+
UniNativeTransitionProperties as UniNativeTransitionPropertiesOrigin,
|
|
48
46
|
UniNativeTransitionDuration as UniNativeTransitionDurationOrigin,
|
|
49
47
|
UniNativeTransitionDurations as UniNativeTransitionDurationsOrigin,
|
|
50
48
|
UniNativeTransitionDelay as UniNativeTransitionDelayOrigin,
|
|
@@ -73,11 +71,18 @@ import {
|
|
|
73
71
|
UniLayoutSize as UniLayoutSizeOrigin,
|
|
74
72
|
UniCSSUnitType as UniCSSUnitTypeOrigin,
|
|
75
73
|
UniCSSUnitValue as UniCSSUnitValueOrigin,
|
|
76
|
-
|
|
74
|
+
UniCSSTransitionTimingFunctionType as UniCSSTransitionTimingFunctionTypeOrigin,
|
|
77
75
|
UniCSSCubicBezier as UniCSSCubicBezierOrigin,
|
|
78
76
|
UniCSSTransitionTimingFunction as UniCSSTransitionTimingFunctionOrigin,
|
|
79
|
-
|
|
77
|
+
UniCSSTransitionTimingFunctions as UniCSSTransitionTimingFunctionsOrigin,
|
|
80
78
|
UniCSSTransition as UniCSSTransitionOrigin,
|
|
79
|
+
UniCSSTransitions as UniCSSTransitionsOrigin,
|
|
80
|
+
UniCSSTransitionProperty as UniCSSTransitionPropertyOrigin,
|
|
81
|
+
UniCSSTransitionProperties as UniCSSTransitionPropertiesOrigin,
|
|
82
|
+
UniCSSTransitionDuration as UniCSSTransitionDurationOrigin,
|
|
83
|
+
UniCSSTransitionDurations as UniCSSTransitionDurationsOrigin,
|
|
84
|
+
UniCSSTransitionDelay as UniCSSTransitionDelayOrigin,
|
|
85
|
+
UniCSSTransitionDelays as UniCSSTransitionDelaysOrigin,
|
|
81
86
|
UniCSSTransformType as UniCSSTransformTypeOrigin,
|
|
82
87
|
UniCSSTransformTranslate as UniCSSTransformTranslateOrigin,
|
|
83
88
|
UniCSSTransformScale as UniCSSTransformScaleOrigin,
|
|
@@ -125,6 +130,8 @@ import {
|
|
|
125
130
|
declare global {
|
|
126
131
|
const UniNativeViewType: typeof UniNativeViewTypeOrigin
|
|
127
132
|
type UniNativeViewType = UniNativeViewTypeOrigin
|
|
133
|
+
const UniNativeMeasureMode: typeof UniNativeMeasureModeOrigin
|
|
134
|
+
type UniNativeMeasureMode = UniNativeMeasureModeOrigin
|
|
128
135
|
type UniNativeViewElement = UniNativeViewElementOrigin
|
|
129
136
|
type UniNativeView = UniNativeViewOrigin
|
|
130
137
|
type UniNativeViewStyles = UniNativeViewStylesOrigin
|
|
@@ -160,11 +167,8 @@ declare global {
|
|
|
160
167
|
type UniNativeLayoutSize = UniNativeLayoutSizeOrigin
|
|
161
168
|
type UniNativeLayoutPosition = UniNativeLayoutPositionOrigin
|
|
162
169
|
type UniNativePadding = UniNativePaddingOrigin
|
|
163
|
-
type UniNativePaddings = UniNativePaddingsOrigin
|
|
164
170
|
type UniNativeMargin = UniNativeMarginOrigin
|
|
165
171
|
type UniNativeMargins = UniNativeMarginsOrigin
|
|
166
|
-
type UniNativeBorders = UniNativeBordersOrigin
|
|
167
|
-
type UniNativeBorder = UniNativeBorderOrigin
|
|
168
172
|
type UniNativeBorderWidth = UniNativeBorderWidthOrigin
|
|
169
173
|
type UniNativeBorderWidths = UniNativeBorderWidthsOrigin
|
|
170
174
|
type UniNativeBorderColor = UniNativeBorderColorOrigin
|
|
@@ -178,7 +182,7 @@ declare global {
|
|
|
178
182
|
type UniNativeTransition = UniNativeTransitionOrigin
|
|
179
183
|
type UniNativeTransitions = UniNativeTransitionsOrigin
|
|
180
184
|
type UniNativeTransitionProperty = UniNativeTransitionPropertyOrigin
|
|
181
|
-
type
|
|
185
|
+
type UniNativeTransitionProperties = UniNativeTransitionPropertiesOrigin
|
|
182
186
|
type UniNativeTransitionDuration = UniNativeTransitionDurationOrigin
|
|
183
187
|
type UniNativeTransitionDurations = UniNativeTransitionDurationsOrigin
|
|
184
188
|
type UniNativeTransitionDelay = UniNativeTransitionDelayOrigin
|
|
@@ -212,12 +216,19 @@ declare global {
|
|
|
212
216
|
type UniCSSUnitType = UniCSSUnitTypeOrigin
|
|
213
217
|
const UniCSSUnitValue: typeof UniCSSUnitValueOrigin
|
|
214
218
|
type UniCSSUnitValue = UniCSSUnitValueOrigin
|
|
215
|
-
const
|
|
216
|
-
type
|
|
219
|
+
const UniCSSTransitionTimingFunctionType: typeof UniCSSTransitionTimingFunctionTypeOrigin
|
|
220
|
+
type UniCSSTransitionTimingFunctionType = UniCSSTransitionTimingFunctionTypeOrigin
|
|
217
221
|
type UniCSSCubicBezier = UniCSSCubicBezierOrigin
|
|
218
222
|
type UniCSSTransitionTimingFunction = UniCSSTransitionTimingFunctionOrigin
|
|
219
|
-
type
|
|
223
|
+
type UniCSSTransitionTimingFunctions = UniCSSTransitionTimingFunctionsOrigin
|
|
220
224
|
type UniCSSTransition = UniCSSTransitionOrigin
|
|
225
|
+
type UniCSSTransitions = UniCSSTransitionsOrigin
|
|
226
|
+
type UniCSSTransitionProperty = UniCSSTransitionPropertyOrigin
|
|
227
|
+
type UniCSSTransitionProperties = UniCSSTransitionPropertiesOrigin
|
|
228
|
+
type UniCSSTransitionDuration = UniCSSTransitionDurationOrigin
|
|
229
|
+
type UniCSSTransitionDurations = UniCSSTransitionDurationsOrigin
|
|
230
|
+
type UniCSSTransitionDelay = UniCSSTransitionDelayOrigin
|
|
231
|
+
type UniCSSTransitionDelays = UniCSSTransitionDelaysOrigin
|
|
221
232
|
const UniCSSTransformType: typeof UniCSSTransformTypeOrigin
|
|
222
233
|
type UniCSSTransformType = UniCSSTransformTypeOrigin
|
|
223
234
|
const UniCSSTransformTranslate: typeof UniCSSTransformTranslateOrigin
|
|
@@ -18,7 +18,7 @@ declare global {
|
|
|
18
18
|
| UniSharedDataFunctionSetTemplateRef
|
|
19
19
|
|
|
20
20
|
type UniSharedDataFunctionEventListener = (event: /* UniSharedDataEvent */ UniEvent) => void
|
|
21
|
-
type UniSharedDataFunctionSetTemplateRef = (
|
|
21
|
+
type UniSharedDataFunctionSetTemplateRef = (el: UniElement) => void
|
|
22
22
|
|
|
23
23
|
enum UniSharedDataSchedulerJobType {
|
|
24
24
|
/**
|
|
@@ -94,6 +94,11 @@ declare global {
|
|
|
94
94
|
* @internal
|
|
95
95
|
*/
|
|
96
96
|
_queueJobs: (key: string) => void
|
|
97
|
+
/**
|
|
98
|
+
* 设置callMethod
|
|
99
|
+
* @internal
|
|
100
|
+
*/
|
|
101
|
+
_setCallMethod(fn : (...args : any[]) => void): void
|
|
97
102
|
constructor(scope: UniSharedDataPage)
|
|
98
103
|
}
|
|
99
104
|
|
|
@@ -103,15 +108,15 @@ declare global {
|
|
|
103
108
|
*/
|
|
104
109
|
static className: string
|
|
105
110
|
/**
|
|
106
|
-
*
|
|
111
|
+
* 当前页面或组件的样式表
|
|
107
112
|
* @internal
|
|
108
113
|
*/
|
|
109
|
-
|
|
114
|
+
static _styleSheet: Map<string, Map<string, Map<number, any>>>
|
|
110
115
|
/**
|
|
111
|
-
*
|
|
116
|
+
* 当前页面或组件关联的 UniPage 对象
|
|
112
117
|
* @internal
|
|
113
118
|
*/
|
|
114
|
-
|
|
119
|
+
_page: UniPage
|
|
115
120
|
/**
|
|
116
121
|
* 当前组件所在的上下文,主要用于查找上下文组件的样式表
|
|
117
122
|
* @internal
|
|
@@ -123,6 +128,10 @@ declare global {
|
|
|
123
128
|
*/
|
|
124
129
|
inheritAttrs: UniSharedDataJSONObject
|
|
125
130
|
constructor(scope: UniSharedDataPage)
|
|
131
|
+
/**
|
|
132
|
+
* 监听组件根节点样式变更
|
|
133
|
+
*/
|
|
134
|
+
useComputedStyle(options : { properties : number[], filterProperties ?: boolean | null, callback : (result : Map<number, any | null>) => void }) : Map<string, any | null>
|
|
126
135
|
/**
|
|
127
136
|
* 由编译器动态生成的子类中的 Element 渲染器
|
|
128
137
|
*/
|
|
@@ -139,7 +148,7 @@ declare global {
|
|
|
139
148
|
* key 是组件class名称
|
|
140
149
|
* @internal
|
|
141
150
|
*/
|
|
142
|
-
|
|
151
|
+
_styleSheetCache: Map<string, Map<string, Map<string, Map<string, unknown>>>>
|
|
143
152
|
/**
|
|
144
153
|
* 本次更新收集到的 Jobs,用于批量执行响应式变更
|
|
145
154
|
* @internal
|
|
@@ -160,6 +169,14 @@ declare global {
|
|
|
160
169
|
_render: () => Promise<void>
|
|
161
170
|
}
|
|
162
171
|
|
|
172
|
+
abstract class UniSharedDataApp extends UniSharedData {
|
|
173
|
+
/**
|
|
174
|
+
* 当前应用全局样式
|
|
175
|
+
* @internal
|
|
176
|
+
*/
|
|
177
|
+
static _styleSheet: Map<string, Map<string, Map<number, any>>>
|
|
178
|
+
}
|
|
179
|
+
|
|
163
180
|
enum UniSharedDataVForDirty {
|
|
164
181
|
/**
|
|
165
182
|
* 无变更
|