@dcloudio/uni-app-x 0.7.62 → 0.7.64
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 +1 -1
- package/types/app.d.ts +36 -1
- package/types/dom2/UniCSSProperty.d.ts +446 -0
- package/types/dom2/UniCSSType.d.ts +72 -0
- package/types/dom2/UniCommon.d.ts +40 -0
- package/types/dom2/UniCustomViewElement.d.ts +12 -0
- package/types/dom2/UniElement.d.ts +354 -0
- package/types/dom2/UniElementType.d.ts +37 -0
- package/types/dom2/UniImageElement.d.ts +102 -0
- package/types/dom2/UniNativeBaseView.d.ts +178 -0
- package/types/dom2/UniNativeCustomView.d.ts +13 -0
- package/types/dom2/UniNativeDefines.d.ts +435 -0
- package/types/dom2/UniNativeImageView.d.ts +34 -0
- package/types/dom2/UniNativeScrollView.d.ts +42 -0
- package/types/dom2/UniNativeTextView.d.ts +25 -0
- package/types/dom2/UniNativeView.d.ts +51 -0
- package/types/dom2/UniNativeViewType.d.ts +22 -0
- package/types/dom2/UniPage.d.ts +55 -0
- package/types/dom2/UniScrollViewElement.d.ts +13 -0
- package/types/dom2/UniTextElement.d.ts +20 -0
- package/types/dom2/UniTextLayout.d.ts +386 -0
- package/types/dom2/UniViewElement.d.ts +57 -0
- package/types/dom2/global.d.ts +189 -0
- package/types/dom2/index.d.ts +40 -0
- package/types/dom2/sharedData.d.ts +227 -0
- package/types/index.d.ts +2 -1
- package/types/native/DOMRect.d.ts +2 -1
- package/types/native/DrawableContext.d.ts +1665 -1661
- package/types/native/IUniElement.d.ts +3514 -2877
- package/types/native/SnapshotOptions.d.ts +2 -2
- package/types/native/UniAnimation.d.ts +11 -10
- package/types/native/UniElement.d.ts +1 -1
- package/types/native/UniEvent.d.ts +108 -3
- package/types/native/UniPage.d.ts +891 -887
- package/types/native/UniTextElement.d.ts +37 -0
- package/types/native/UniTextLayout.d.ts +387 -0
- package/types/native/UniVideoElement.d.ts +20 -17
- package/types/native/Worker.d.ts +19 -0
- package/types/native/global.d.ts +28 -68
- package/types/native/index.d.ts +18 -1
- package/types/page.d.ts +1862 -599
- package/types/uni/uts-plugin-api/global.d.ts +2 -0
- package/types/uni/uts-plugin-api/index.d.ts +2 -0
- package/types/uni/uts-plugin-api/lib/uni-chooseMedia/utssdk/interface.d.ts +1 -1
- package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/interface.d.ts +10 -10
- package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +0 -1
- package/types/uni/uts-plugin-api/lib/uni-createWorker/utssdk/global.d.ts +22 -0
- package/types/uni/uts-plugin-api/lib/uni-createWorker/utssdk/index.d.ts +10 -0
- package/types/uni/uts-plugin-api/lib/uni-createWorker/utssdk/interface.d.ts +524 -0
- package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/interface.d.ts +985 -76
- package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/interface.d.ts +79 -55
- package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +77 -53
- package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/interface.d.ts +458 -407
- package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +420 -0
- package/types/uni/uts-plugin-api/lib/uni-location/utssdk/interface.d.ts +80 -80
- package/types/uni/uts-plugin-api/lib/uni-modal/utssdk/global.d.ts +12 -4
- package/types/uni/uts-plugin-api/lib/uni-modal/utssdk/index.d.ts +6 -2
- package/types/uni/uts-plugin-api/lib/uni-modal/utssdk/interface.d.ts +713 -91
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +4 -0
- package/types/uni/uts-plugin-api/lib/uni-oauth/utssdk/interface.d.ts +3 -3
- package/types/uni/uts-plugin-api/lib/uni-oauth-weixin/utssdk/interface.d.ts +3 -1
- package/types/uni/uts-plugin-api/lib/uni-recorder/utssdk/interface.d.ts +71 -1
- package/types/uni/uts-plugin-api/lib/uni-route/utssdk/interface.d.ts +1 -1
- package/types/uni/uts-plugin-api/lib/uni-screenBrightness/utssdk/global.d.ts +56 -0
- package/types/uni/uts-plugin-api/lib/uni-screenBrightness/utssdk/index.d.ts +27 -0
- package/types/uni/uts-plugin-api/lib/uni-screenBrightness/utssdk/interface.d.ts +842 -0
- package/types/uni/uts-plugin-api/lib/uni-share/utssdk/interface.d.ts +11 -11
- package/types/uni/uts-plugin-api/lib/uni-share-weixin/utssdk/interface.d.ts +1 -1
- package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/interface.d.ts +63 -42
- package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/interface.d.ts +2 -2
- package/types/uni/uts-plugin-biz/lib/uni-facialVerify/utssdk/interface.d.ts +2 -2
- package/types/uni/uts-plugin-biz/lib/uni-live-player/utssdk/global.d.ts +4 -0
- package/types/uni/uts-plugin-biz/lib/uni-live-player/utssdk/index.d.ts +2 -0
- package/types/uni/uts-plugin-biz/lib/uni-live-player/utssdk/interface.d.ts +1007 -314
- package/types/uni/uts-plugin-biz/lib/uni-live-pusher/utssdk/global.d.ts +4 -0
- package/types/uni/uts-plugin-biz/lib/uni-live-pusher/utssdk/index.d.ts +2 -0
- package/types/uni/uts-plugin-biz/lib/uni-live-pusher/utssdk/interface.d.ts +1727 -10
- package/types/uni/uts-plugin-component/lib/uni-camera/utssdk/interface.d.ts +235 -30
- package/types/uni/uts-plugin-component/lib/uni-canvas/utssdk/interface.d.ts +1 -1
- package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +17 -17
- package/uts-plugin.d.ts +11 -0
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
import { UniNativeColor } from "./UniNativeDefines"
|
|
2
|
+
import { UniCSSUnitValue } from "./UniCSSType"
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
declare global {
|
|
6
|
+
/**
|
|
7
|
+
* 布局大小
|
|
8
|
+
*/
|
|
9
|
+
interface UniLayoutSize {
|
|
10
|
+
/**
|
|
11
|
+
* 元素宽度,逻辑像素值。
|
|
12
|
+
*/
|
|
13
|
+
width: number,
|
|
14
|
+
/**
|
|
15
|
+
* 元素的高度,逻辑像素值。
|
|
16
|
+
*/
|
|
17
|
+
height: number
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 布局约束大小
|
|
23
|
+
*/
|
|
24
|
+
interface UniLayoutConstraintSize {
|
|
25
|
+
/**
|
|
26
|
+
* 元素最小宽度,逻辑像素值。
|
|
27
|
+
* 可选值,不设置则认为没有最小宽度。
|
|
28
|
+
*/
|
|
29
|
+
minWidth: number | null,
|
|
30
|
+
/**
|
|
31
|
+
* 元素最大宽度,逻辑像素值。
|
|
32
|
+
* 可选值,不设置则认为可以无限宽。
|
|
33
|
+
*/
|
|
34
|
+
maxWidth: number | null,
|
|
35
|
+
/**
|
|
36
|
+
* 元素最小高度,逻辑像素值。
|
|
37
|
+
* 可选值,不设置则认为没有最小高度。
|
|
38
|
+
*/
|
|
39
|
+
minHeight: number | null,
|
|
40
|
+
/**
|
|
41
|
+
* 元素最大高度,逻辑像素值。
|
|
42
|
+
* 可选值,不设置则认为可以无限高。
|
|
43
|
+
*/
|
|
44
|
+
maxHeight: number | null,
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* 文字长度值类型
|
|
50
|
+
* 使用CSS中带单位的值类型
|
|
51
|
+
*/
|
|
52
|
+
export type UniTextLength = UniCSSUnitValue;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* 文本装饰线样式类型
|
|
56
|
+
*/
|
|
57
|
+
export enum UniTextDecorationStyleType {
|
|
58
|
+
/**
|
|
59
|
+
* 实线
|
|
60
|
+
*/
|
|
61
|
+
Solid,
|
|
62
|
+
/**
|
|
63
|
+
* 双实线
|
|
64
|
+
*/
|
|
65
|
+
Double,
|
|
66
|
+
/**
|
|
67
|
+
* 点划线
|
|
68
|
+
*/
|
|
69
|
+
Dotted,
|
|
70
|
+
/**
|
|
71
|
+
* 虚线
|
|
72
|
+
*/
|
|
73
|
+
Dashed,
|
|
74
|
+
/**
|
|
75
|
+
* 波浪线
|
|
76
|
+
*/
|
|
77
|
+
Wavy,
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* 文本装饰线类型
|
|
82
|
+
*/
|
|
83
|
+
export enum UniTextDecorationLineType {
|
|
84
|
+
/**
|
|
85
|
+
* 没有文本装饰线
|
|
86
|
+
*/
|
|
87
|
+
None,
|
|
88
|
+
/**
|
|
89
|
+
* 文本的下方有装饰线
|
|
90
|
+
*/
|
|
91
|
+
Underline,
|
|
92
|
+
/**
|
|
93
|
+
* 文本的上方有装饰线
|
|
94
|
+
*/
|
|
95
|
+
Overline,
|
|
96
|
+
/**
|
|
97
|
+
* 贯穿文本中间的装饰线
|
|
98
|
+
*/
|
|
99
|
+
LineThrough,
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* 文本装饰性线厚度
|
|
104
|
+
*/
|
|
105
|
+
export type UniTextDecorationThickness = UniTextDecorationThicknessType | UniCSSUnitValue;
|
|
106
|
+
/**
|
|
107
|
+
* 文本装饰性线笔触厚度样式
|
|
108
|
+
*/
|
|
109
|
+
export enum UniTextDecorationThicknessType {
|
|
110
|
+
/**
|
|
111
|
+
* 自动选择合适的厚度
|
|
112
|
+
*/
|
|
113
|
+
Auto,
|
|
114
|
+
/**
|
|
115
|
+
* 优先使用字体文件中包含了首选的厚度值,否则与Auto值一样
|
|
116
|
+
*/
|
|
117
|
+
FromFont,
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* 文本装饰性线样式
|
|
122
|
+
*/
|
|
123
|
+
export interface UniTextDecorationStyle {
|
|
124
|
+
/**
|
|
125
|
+
* 装饰线线条类型
|
|
126
|
+
*/
|
|
127
|
+
line: UniTextDecorationLineType,
|
|
128
|
+
/**
|
|
129
|
+
* 装饰线颜色
|
|
130
|
+
* 默认值与文本颜色值一致
|
|
131
|
+
*/
|
|
132
|
+
color: UniNativeColor,
|
|
133
|
+
/**
|
|
134
|
+
* 装饰线样式
|
|
135
|
+
* 默认值为实线
|
|
136
|
+
*/
|
|
137
|
+
style: UniTextDecorationStyleType,
|
|
138
|
+
/**
|
|
139
|
+
* 装饰性线厚度
|
|
140
|
+
* 默认值为Auto
|
|
141
|
+
*/
|
|
142
|
+
thickness: UniTextDecorationThickness
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* 字体样式
|
|
147
|
+
*/
|
|
148
|
+
export enum UniFontStyle {
|
|
149
|
+
/**
|
|
150
|
+
* 常规字体
|
|
151
|
+
*/
|
|
152
|
+
Normal,
|
|
153
|
+
/**
|
|
154
|
+
* 斜体字体
|
|
155
|
+
*/
|
|
156
|
+
Italic,
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* 字体粗细类型
|
|
161
|
+
*/
|
|
162
|
+
export enum UniFontWeight {
|
|
163
|
+
/**
|
|
164
|
+
* 正常粗细
|
|
165
|
+
* 与400等值
|
|
166
|
+
*/
|
|
167
|
+
Normal,
|
|
168
|
+
/**
|
|
169
|
+
* 加粗
|
|
170
|
+
* 与700等值
|
|
171
|
+
*/
|
|
172
|
+
Bold,
|
|
173
|
+
/**
|
|
174
|
+
* 比正常值更细
|
|
175
|
+
*/
|
|
176
|
+
Lighter,
|
|
177
|
+
/**
|
|
178
|
+
* 比正常值更粗
|
|
179
|
+
*/
|
|
180
|
+
Bolder,
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* 文本行高
|
|
185
|
+
*/
|
|
186
|
+
export type UniTextLineHeight = UniTextLineHeightType | UniTextLength;
|
|
187
|
+
export enum UniTextLineHeightType {
|
|
188
|
+
/**
|
|
189
|
+
* 默认行高
|
|
190
|
+
* 约为1.2em
|
|
191
|
+
*/
|
|
192
|
+
Normal,
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* 文本对齐方式
|
|
197
|
+
*/
|
|
198
|
+
export enum UniTextAlign {
|
|
199
|
+
/**
|
|
200
|
+
* 行内内容向左侧边对齐
|
|
201
|
+
*/
|
|
202
|
+
Left,
|
|
203
|
+
/**
|
|
204
|
+
* 行内内容向右侧边对齐
|
|
205
|
+
*/
|
|
206
|
+
Right,
|
|
207
|
+
/**
|
|
208
|
+
* 行内内容居中
|
|
209
|
+
*/
|
|
210
|
+
Center,
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* 文字溢出处理样式
|
|
215
|
+
*/
|
|
216
|
+
export enum UniTextOverflow {
|
|
217
|
+
/**
|
|
218
|
+
* 截断溢出内容
|
|
219
|
+
*/
|
|
220
|
+
Clip,
|
|
221
|
+
/**
|
|
222
|
+
* 溢出内容显示为省略号
|
|
223
|
+
*/
|
|
224
|
+
Ellipsis,
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* 文字阴影样式
|
|
229
|
+
*/
|
|
230
|
+
export type UniTextShadow = {
|
|
231
|
+
/**
|
|
232
|
+
* 阴影颜色
|
|
233
|
+
* 默认为文字颜色
|
|
234
|
+
*/
|
|
235
|
+
color: UniNativeColor
|
|
236
|
+
/**
|
|
237
|
+
* 阴影的 x 偏移量
|
|
238
|
+
*/
|
|
239
|
+
offsetX: number
|
|
240
|
+
/**
|
|
241
|
+
* 阴影的 y 偏移量
|
|
242
|
+
*/
|
|
243
|
+
offsetY: number
|
|
244
|
+
/**
|
|
245
|
+
* 阴影的模糊半径
|
|
246
|
+
* 默认值为0
|
|
247
|
+
*/
|
|
248
|
+
blurRadius: number
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* 文字空白字符串处理类型
|
|
253
|
+
*/
|
|
254
|
+
export enum UniWhiteSpace {
|
|
255
|
+
/**
|
|
256
|
+
* 连续的空白符会被合并,支持换行符
|
|
257
|
+
*/
|
|
258
|
+
Normal,
|
|
259
|
+
/**
|
|
260
|
+
* 连续的空白符会被合并,不换行
|
|
261
|
+
*/
|
|
262
|
+
Nowrap,
|
|
263
|
+
/**
|
|
264
|
+
* 连续的空白符会保留,换行
|
|
265
|
+
*/
|
|
266
|
+
Pre,
|
|
267
|
+
/**
|
|
268
|
+
* 连续的空白符会保留,换行,根据内容会自动换
|
|
269
|
+
*/
|
|
270
|
+
PreWrap,
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
declare global {
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* 文本输出对象
|
|
277
|
+
* 需支持跨线程共享
|
|
278
|
+
*/
|
|
279
|
+
interface UniTextLayout {
|
|
280
|
+
/**
|
|
281
|
+
* 设置文本
|
|
282
|
+
*/
|
|
283
|
+
setText(text: string): void
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* 设置文本颜色
|
|
287
|
+
* @param color
|
|
288
|
+
* UniNativeColor - 平台颜色类型
|
|
289
|
+
* string - 兼容字符串参数设置文本颜色
|
|
290
|
+
*/
|
|
291
|
+
setColor(color: UniNativeColor | string): void
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* 设置字体名称
|
|
295
|
+
*/
|
|
296
|
+
setFontFamily(family: string): void
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* 设置字体大小
|
|
300
|
+
* @param size
|
|
301
|
+
* UniTextLength - 带单位的文字大小
|
|
302
|
+
* string - 兼容字符串参数设置字体大小
|
|
303
|
+
*/
|
|
304
|
+
setFontSize(size: UniTextLength | string): void
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* 设置字体样式
|
|
308
|
+
* @param style
|
|
309
|
+
* UniFontStyle - 枚举类型字体样式
|
|
310
|
+
* string - 兼容字符串参数设置字体样式
|
|
311
|
+
*/
|
|
312
|
+
setFontStyle(style: UniFontStyle | string): void
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* 设置字体粗细
|
|
316
|
+
* 默认值为Normal
|
|
317
|
+
* @param weight
|
|
318
|
+
* UniFontWeight - 字体粗细枚举值
|
|
319
|
+
* number - 体粗细具体值
|
|
320
|
+
* string - 兼容字符串参数设置字体粗细
|
|
321
|
+
*/
|
|
322
|
+
setFontWeight(weight: UniFontWeight | number | string): void
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* 设置文本行高
|
|
326
|
+
* 默认值为Normal
|
|
327
|
+
* @param height
|
|
328
|
+
* UniTextLineHeight - 文本行高值
|
|
329
|
+
* string - 兼容字符串参数设置文本行高
|
|
330
|
+
*/
|
|
331
|
+
setLineHeight(height: UniTextLineHeight | string): void
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* 设置文字水平对齐方式
|
|
335
|
+
* 默认值为Left
|
|
336
|
+
* @param align
|
|
337
|
+
* UniTextAlign - 文字水平对齐枚举值
|
|
338
|
+
* string - 兼容字符串参数设置文字水平对齐方式
|
|
339
|
+
*/
|
|
340
|
+
setTextAlign(align: UniTextAlign | string): void
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* 设置文字溢出处理样式
|
|
344
|
+
* @param overflow
|
|
345
|
+
* UniTextOverflow - 文字溢出处理样式枚举值
|
|
346
|
+
* string - 兼容字符串参数设置文字溢出处理样式
|
|
347
|
+
*/
|
|
348
|
+
setTextOverflow(overflow: UniTextOverflow | string): void
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* 设置文字阴影
|
|
352
|
+
* @param shadow
|
|
353
|
+
* UniTextShadow - 文字阴影类型值
|
|
354
|
+
* string - 兼容字符串参数设置文字阴影
|
|
355
|
+
*/
|
|
356
|
+
setTextShadow(shadow: UniTextShadow | string): void
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* 设置处理空白字符
|
|
360
|
+
*/
|
|
361
|
+
setWhiteSpace(whiteSpace: UniWhiteSpace | string): void
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* 设置文本装饰线样式
|
|
365
|
+
*/
|
|
366
|
+
setTextDecoration(style: UniTextDecorationStyle): void
|
|
367
|
+
/**
|
|
368
|
+
* 设置文本装饰线线条类型
|
|
369
|
+
* 其它效果不支持时使用此API设置
|
|
370
|
+
*/
|
|
371
|
+
setTextDecorationLine(type: UniTextDecorationLineType): void
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* 添加子文本对象
|
|
375
|
+
* 支持text的嵌套
|
|
376
|
+
*/
|
|
377
|
+
append(text: UniTextLayout): void
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* 测量文本大小
|
|
381
|
+
* 调用此方法会创建原生测量对象
|
|
382
|
+
*/
|
|
383
|
+
measure(constraint: UniLayoutConstraintSize): UniLayoutSize;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { UniElement } from './UniElement'
|
|
2
|
+
import { UniElementStyles } from './UniElementType'
|
|
3
|
+
|
|
4
|
+
declare global {
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* UniViewElement
|
|
8
|
+
*/
|
|
9
|
+
interface UniViewElement extends UniElement {
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 以下方法在DOM层封装实现
|
|
13
|
+
* - Android平台:kotlin层实现
|
|
14
|
+
* - iOS平台:oc层实现
|
|
15
|
+
* - 鸿蒙平台:c层实现
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* 获取组件的绘制对象
|
|
19
|
+
*/
|
|
20
|
+
getDrawableContext(): DrawableContext | null
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 设置hover状态样式
|
|
24
|
+
*/
|
|
25
|
+
setHoverStyles(style: UniElementStyles): void
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 用于解决view组件 over 状态的样式更新与恢复,内部使用。
|
|
29
|
+
* 区分更新样式是排版相关还是渲染相关
|
|
30
|
+
* 排版相关通过FlexNode获取并备份数据,渲染相关需通过NativeView获取并备份数据:
|
|
31
|
+
* 按下时调用backupAndUpdateStyle备份样式
|
|
32
|
+
* 松开时调用restoreStyle恢复样式
|
|
33
|
+
*
|
|
34
|
+
* Android平台:在kotlin/c层分别实现
|
|
35
|
+
* iOS平台/鸿蒙平台:在c层实现
|
|
36
|
+
*/
|
|
37
|
+
/**
|
|
38
|
+
* 备份并更新样式
|
|
39
|
+
*/
|
|
40
|
+
backupAndUpdateStyle(style: UniElementStyles): void
|
|
41
|
+
/**
|
|
42
|
+
* 恢复样式
|
|
43
|
+
*/
|
|
44
|
+
restoreStyle(): void
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
*/
|
|
53
|
+
interface DrawableContext {
|
|
54
|
+
//Todo...
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
// 本文件为自动构建生成
|
|
2
|
+
import {
|
|
3
|
+
UniTextDecorationStyleType as UniTextDecorationStyleTypeOrigin,
|
|
4
|
+
UniTextDecorationLineType as UniTextDecorationLineTypeOrigin,
|
|
5
|
+
UniTextDecorationThicknessType as UniTextDecorationThicknessTypeOrigin,
|
|
6
|
+
UniFontStyle as UniFontStyleOrigin,
|
|
7
|
+
UniFontWeight as UniFontWeightOrigin,
|
|
8
|
+
UniTextLineHeightType as UniTextLineHeightTypeOrigin,
|
|
9
|
+
UniTextAlign as UniTextAlignOrigin,
|
|
10
|
+
UniTextOverflow as UniTextOverflowOrigin,
|
|
11
|
+
UniWhiteSpace as UniWhiteSpaceOrigin,
|
|
12
|
+
UniTextLength as UniTextLengthOrigin,
|
|
13
|
+
UniTextDecorationThickness as UniTextDecorationThicknessOrigin,
|
|
14
|
+
UniTextDecorationStyle as UniTextDecorationStyleOrigin,
|
|
15
|
+
UniTextLineHeight as UniTextLineHeightOrigin,
|
|
16
|
+
UniTextShadow as UniTextShadowOrigin,
|
|
17
|
+
UniNativeViewType as UniNativeViewTypeOrigin,
|
|
18
|
+
UniNativeView as UniNativeViewOrigin,
|
|
19
|
+
UniNativeViewStyles as UniNativeViewStylesOrigin,
|
|
20
|
+
UniNativeTextView as UniNativeTextViewOrigin,
|
|
21
|
+
UniNativeScrollViewDirectionType as UniNativeScrollViewDirectionTypeOrigin,
|
|
22
|
+
UniNativeScrollView as UniNativeScrollViewOrigin,
|
|
23
|
+
UniNativeScrollViewOptions as UniNativeScrollViewOptionsOrigin,
|
|
24
|
+
UniNativeImageView as UniNativeImageViewOrigin,
|
|
25
|
+
UniNativeBorderStyle as UniNativeBorderStyleOrigin,
|
|
26
|
+
UniNativeOverflowType as UniNativeOverflowTypeOrigin,
|
|
27
|
+
UniNativePointerEventType as UniNativePointerEventTypeOrigin,
|
|
28
|
+
UniNativeDisplayType as UniNativeDisplayTypeOrigin,
|
|
29
|
+
UniNativePositionType as UniNativePositionTypeOrigin,
|
|
30
|
+
UniNativeVisibilityType as UniNativeVisibilityTypeOrigin,
|
|
31
|
+
UniNativeTransformType as UniNativeTransformTypeOrigin,
|
|
32
|
+
UniNativeSlotType as UniNativeSlotTypeOrigin,
|
|
33
|
+
UniNativeColor as UniNativeColorOrigin,
|
|
34
|
+
UniNativeLayout as UniNativeLayoutOrigin,
|
|
35
|
+
UniNativeLayoutSize as UniNativeLayoutSizeOrigin,
|
|
36
|
+
UniNativeLayoutPosition as UniNativeLayoutPositionOrigin,
|
|
37
|
+
UniNativePadding as UniNativePaddingOrigin,
|
|
38
|
+
UniNativePaddings as UniNativePaddingsOrigin,
|
|
39
|
+
UniNativeMargin as UniNativeMarginOrigin,
|
|
40
|
+
UniNativeMargins as UniNativeMarginsOrigin,
|
|
41
|
+
UniNativeBorders as UniNativeBordersOrigin,
|
|
42
|
+
UniNativeBorder as UniNativeBorderOrigin,
|
|
43
|
+
UniNativeBorderWidth as UniNativeBorderWidthOrigin,
|
|
44
|
+
UniNativeBorderWidths as UniNativeBorderWidthsOrigin,
|
|
45
|
+
UniNativeBorderColor as UniNativeBorderColorOrigin,
|
|
46
|
+
UniNativeBorderColors as UniNativeBorderColorsOrigin,
|
|
47
|
+
UniNativeBorderStyles as UniNativeBorderStylesOrigin,
|
|
48
|
+
UniNativeBorderRadius as UniNativeBorderRadiusOrigin,
|
|
49
|
+
UniNativeBorderRadiuses as UniNativeBorderRadiusesOrigin,
|
|
50
|
+
UniNativeBoxShadow as UniNativeBoxShadowOrigin,
|
|
51
|
+
UniNativeCustomView as UniNativeCustomViewOrigin,
|
|
52
|
+
UniNativeBaseView as UniNativeBaseViewOrigin,
|
|
53
|
+
UniImageModeType as UniImageModeTypeOrigin,
|
|
54
|
+
UniImageSize as UniImageSizeOrigin,
|
|
55
|
+
UniElementType as UniElementTypeOrigin,
|
|
56
|
+
UniElementStyles as UniElementStylesOrigin,
|
|
57
|
+
UniCustomViewElement as UniCustomViewElementOrigin,
|
|
58
|
+
UniPosition as UniPositionOrigin,
|
|
59
|
+
UniSize as UniSizeOrigin,
|
|
60
|
+
UniLTWH as UniLTWHOrigin,
|
|
61
|
+
UniLTRB as UniLTRBOrigin,
|
|
62
|
+
UniCSSUnitType as UniCSSUnitTypeOrigin,
|
|
63
|
+
UniCSSUnitValue as UniCSSUnitValueOrigin,
|
|
64
|
+
UniCSSPropertyID as UniCSSPropertyIDOrigin,
|
|
65
|
+
UniCSSBoxSizingType as UniCSSBoxSizingTypeOrigin,
|
|
66
|
+
UniCSSDisplayType as UniCSSDisplayTypeOrigin,
|
|
67
|
+
UniCSSPositionType as UniCSSPositionTypeOrigin,
|
|
68
|
+
UniCSSVisibilityType as UniCSSVisibilityTypeOrigin,
|
|
69
|
+
UniCSSBorderStyleType as UniCSSBorderStyleTypeOrigin,
|
|
70
|
+
UniCSSFlexDirectionType as UniCSSFlexDirectionTypeOrigin,
|
|
71
|
+
UniCSSFlexWrapType as UniCSSFlexWrapTypeOrigin,
|
|
72
|
+
UniCSSFlexAlignType as UniCSSFlexAlignTypeOrigin,
|
|
73
|
+
UniCSSPropertyName as UniCSSPropertyNameOrigin,
|
|
74
|
+
UniCSSPropertyValue as UniCSSPropertyValueOrigin,
|
|
75
|
+
UniCSSJustifyContentType as UniCSSJustifyContentTypeOrigin,
|
|
76
|
+
UniCSSAlignItemsType as UniCSSAlignItemsTypeOrigin,
|
|
77
|
+
UniCSSAlignSelfType as UniCSSAlignSelfTypeOrigin,
|
|
78
|
+
UniCSSAlignContentType as UniCSSAlignContentTypeOrigin,
|
|
79
|
+
} from './index'
|
|
80
|
+
|
|
81
|
+
declare global {
|
|
82
|
+
const UniTextDecorationStyleType: typeof UniTextDecorationStyleTypeOrigin
|
|
83
|
+
type UniTextDecorationStyleType = UniTextDecorationStyleTypeOrigin
|
|
84
|
+
const UniTextDecorationLineType: typeof UniTextDecorationLineTypeOrigin
|
|
85
|
+
type UniTextDecorationLineType = UniTextDecorationLineTypeOrigin
|
|
86
|
+
const UniTextDecorationThicknessType: typeof UniTextDecorationThicknessTypeOrigin
|
|
87
|
+
type UniTextDecorationThicknessType = UniTextDecorationThicknessTypeOrigin
|
|
88
|
+
const UniFontStyle: typeof UniFontStyleOrigin
|
|
89
|
+
type UniFontStyle = UniFontStyleOrigin
|
|
90
|
+
const UniFontWeight: typeof UniFontWeightOrigin
|
|
91
|
+
type UniFontWeight = UniFontWeightOrigin
|
|
92
|
+
const UniTextLineHeightType: typeof UniTextLineHeightTypeOrigin
|
|
93
|
+
type UniTextLineHeightType = UniTextLineHeightTypeOrigin
|
|
94
|
+
const UniTextAlign: typeof UniTextAlignOrigin
|
|
95
|
+
type UniTextAlign = UniTextAlignOrigin
|
|
96
|
+
const UniTextOverflow: typeof UniTextOverflowOrigin
|
|
97
|
+
type UniTextOverflow = UniTextOverflowOrigin
|
|
98
|
+
const UniWhiteSpace: typeof UniWhiteSpaceOrigin
|
|
99
|
+
type UniWhiteSpace = UniWhiteSpaceOrigin
|
|
100
|
+
type UniTextLength = UniTextLengthOrigin
|
|
101
|
+
type UniTextDecorationThickness = UniTextDecorationThicknessOrigin
|
|
102
|
+
type UniTextDecorationStyle = UniTextDecorationStyleOrigin
|
|
103
|
+
type UniTextLineHeight = UniTextLineHeightOrigin
|
|
104
|
+
type UniTextShadow = UniTextShadowOrigin
|
|
105
|
+
const UniNativeViewType: typeof UniNativeViewTypeOrigin
|
|
106
|
+
type UniNativeViewType = UniNativeViewTypeOrigin
|
|
107
|
+
type UniNativeView = UniNativeViewOrigin
|
|
108
|
+
type UniNativeViewStyles = UniNativeViewStylesOrigin
|
|
109
|
+
type UniNativeTextView = UniNativeTextViewOrigin
|
|
110
|
+
const UniNativeScrollViewDirectionType: typeof UniNativeScrollViewDirectionTypeOrigin
|
|
111
|
+
type UniNativeScrollViewDirectionType = UniNativeScrollViewDirectionTypeOrigin
|
|
112
|
+
type UniNativeScrollView = UniNativeScrollViewOrigin
|
|
113
|
+
type UniNativeScrollViewOptions = UniNativeScrollViewOptionsOrigin
|
|
114
|
+
type UniNativeImageView = UniNativeImageViewOrigin
|
|
115
|
+
const UniNativeBorderStyle: typeof UniNativeBorderStyleOrigin
|
|
116
|
+
type UniNativeBorderStyle = UniNativeBorderStyleOrigin
|
|
117
|
+
const UniNativeOverflowType: typeof UniNativeOverflowTypeOrigin
|
|
118
|
+
type UniNativeOverflowType = UniNativeOverflowTypeOrigin
|
|
119
|
+
const UniNativePointerEventType: typeof UniNativePointerEventTypeOrigin
|
|
120
|
+
type UniNativePointerEventType = UniNativePointerEventTypeOrigin
|
|
121
|
+
const UniNativeDisplayType: typeof UniNativeDisplayTypeOrigin
|
|
122
|
+
type UniNativeDisplayType = UniNativeDisplayTypeOrigin
|
|
123
|
+
const UniNativePositionType: typeof UniNativePositionTypeOrigin
|
|
124
|
+
type UniNativePositionType = UniNativePositionTypeOrigin
|
|
125
|
+
const UniNativeVisibilityType: typeof UniNativeVisibilityTypeOrigin
|
|
126
|
+
type UniNativeVisibilityType = UniNativeVisibilityTypeOrigin
|
|
127
|
+
const UniNativeTransformType: typeof UniNativeTransformTypeOrigin
|
|
128
|
+
type UniNativeTransformType = UniNativeTransformTypeOrigin
|
|
129
|
+
const UniNativeSlotType: typeof UniNativeSlotTypeOrigin
|
|
130
|
+
type UniNativeSlotType = UniNativeSlotTypeOrigin
|
|
131
|
+
type UniNativeColor = UniNativeColorOrigin
|
|
132
|
+
type UniNativeLayout = UniNativeLayoutOrigin
|
|
133
|
+
type UniNativeLayoutSize = UniNativeLayoutSizeOrigin
|
|
134
|
+
type UniNativeLayoutPosition = UniNativeLayoutPositionOrigin
|
|
135
|
+
type UniNativePadding = UniNativePaddingOrigin
|
|
136
|
+
type UniNativePaddings = UniNativePaddingsOrigin
|
|
137
|
+
type UniNativeMargin = UniNativeMarginOrigin
|
|
138
|
+
type UniNativeMargins = UniNativeMarginsOrigin
|
|
139
|
+
type UniNativeBorders = UniNativeBordersOrigin
|
|
140
|
+
type UniNativeBorder = UniNativeBorderOrigin
|
|
141
|
+
type UniNativeBorderWidth = UniNativeBorderWidthOrigin
|
|
142
|
+
type UniNativeBorderWidths = UniNativeBorderWidthsOrigin
|
|
143
|
+
type UniNativeBorderColor = UniNativeBorderColorOrigin
|
|
144
|
+
type UniNativeBorderColors = UniNativeBorderColorsOrigin
|
|
145
|
+
type UniNativeBorderStyles = UniNativeBorderStylesOrigin
|
|
146
|
+
type UniNativeBorderRadius = UniNativeBorderRadiusOrigin
|
|
147
|
+
type UniNativeBorderRadiuses = UniNativeBorderRadiusesOrigin
|
|
148
|
+
type UniNativeBoxShadow = UniNativeBoxShadowOrigin
|
|
149
|
+
type UniNativeCustomView = UniNativeCustomViewOrigin
|
|
150
|
+
type UniNativeBaseView = UniNativeBaseViewOrigin
|
|
151
|
+
const UniImageModeType: typeof UniImageModeTypeOrigin
|
|
152
|
+
type UniImageModeType = UniImageModeTypeOrigin
|
|
153
|
+
type UniImageSize = UniImageSizeOrigin
|
|
154
|
+
const UniElementType: typeof UniElementTypeOrigin
|
|
155
|
+
type UniElementType = UniElementTypeOrigin
|
|
156
|
+
type UniElementStyles = UniElementStylesOrigin
|
|
157
|
+
type UniCustomViewElement = UniCustomViewElementOrigin
|
|
158
|
+
type UniPosition = UniPositionOrigin
|
|
159
|
+
type UniSize = UniSizeOrigin
|
|
160
|
+
type UniLTWH = UniLTWHOrigin
|
|
161
|
+
type UniLTRB = UniLTRBOrigin
|
|
162
|
+
const UniCSSUnitType: typeof UniCSSUnitTypeOrigin
|
|
163
|
+
type UniCSSUnitType = UniCSSUnitTypeOrigin
|
|
164
|
+
type UniCSSUnitValue = UniCSSUnitValueOrigin
|
|
165
|
+
const UniCSSPropertyID: typeof UniCSSPropertyIDOrigin
|
|
166
|
+
type UniCSSPropertyID = UniCSSPropertyIDOrigin
|
|
167
|
+
const UniCSSBoxSizingType: typeof UniCSSBoxSizingTypeOrigin
|
|
168
|
+
type UniCSSBoxSizingType = UniCSSBoxSizingTypeOrigin
|
|
169
|
+
const UniCSSDisplayType: typeof UniCSSDisplayTypeOrigin
|
|
170
|
+
type UniCSSDisplayType = UniCSSDisplayTypeOrigin
|
|
171
|
+
const UniCSSPositionType: typeof UniCSSPositionTypeOrigin
|
|
172
|
+
type UniCSSPositionType = UniCSSPositionTypeOrigin
|
|
173
|
+
const UniCSSVisibilityType: typeof UniCSSVisibilityTypeOrigin
|
|
174
|
+
type UniCSSVisibilityType = UniCSSVisibilityTypeOrigin
|
|
175
|
+
const UniCSSBorderStyleType: typeof UniCSSBorderStyleTypeOrigin
|
|
176
|
+
type UniCSSBorderStyleType = UniCSSBorderStyleTypeOrigin
|
|
177
|
+
const UniCSSFlexDirectionType: typeof UniCSSFlexDirectionTypeOrigin
|
|
178
|
+
type UniCSSFlexDirectionType = UniCSSFlexDirectionTypeOrigin
|
|
179
|
+
const UniCSSFlexWrapType: typeof UniCSSFlexWrapTypeOrigin
|
|
180
|
+
type UniCSSFlexWrapType = UniCSSFlexWrapTypeOrigin
|
|
181
|
+
const UniCSSFlexAlignType: typeof UniCSSFlexAlignTypeOrigin
|
|
182
|
+
type UniCSSFlexAlignType = UniCSSFlexAlignTypeOrigin
|
|
183
|
+
type UniCSSPropertyName = UniCSSPropertyNameOrigin
|
|
184
|
+
type UniCSSPropertyValue = UniCSSPropertyValueOrigin
|
|
185
|
+
type UniCSSJustifyContentType = UniCSSJustifyContentTypeOrigin
|
|
186
|
+
type UniCSSAlignItemsType = UniCSSAlignItemsTypeOrigin
|
|
187
|
+
type UniCSSAlignSelfType = UniCSSAlignSelfTypeOrigin
|
|
188
|
+
type UniCSSAlignContentType = UniCSSAlignContentTypeOrigin
|
|
189
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// 本文件为自动构建生成
|
|
2
|
+
/// <reference path="./sharedData.d.ts" />
|
|
3
|
+
/// <reference path="./UniViewElement.d.ts" />
|
|
4
|
+
/// <reference path="./UniTextLayout.d.ts" />
|
|
5
|
+
/// <reference path="./UniTextElement.d.ts" />
|
|
6
|
+
/// <reference path="./UniScrollViewElement.d.ts" />
|
|
7
|
+
/// <reference path="./UniPage.d.ts" />
|
|
8
|
+
/// <reference path="./UniImageElement.d.ts" />
|
|
9
|
+
/// <reference path="./UniElement.d.ts" />
|
|
10
|
+
export * from './sharedData'
|
|
11
|
+
export * from './UniViewElement'
|
|
12
|
+
export * from './UniTextLayout'
|
|
13
|
+
export * from './UniTextElement'
|
|
14
|
+
export * from './UniScrollViewElement'
|
|
15
|
+
export * from './UniPage'
|
|
16
|
+
export * from './UniNativeViewType'
|
|
17
|
+
export * from './UniNativeView'
|
|
18
|
+
export * from './UniNativeTextView'
|
|
19
|
+
export * from './UniNativeScrollView'
|
|
20
|
+
export * from './UniNativeImageView'
|
|
21
|
+
export * from './UniNativeDefines'
|
|
22
|
+
export * from './UniNativeCustomView'
|
|
23
|
+
export * from './UniNativeBaseView'
|
|
24
|
+
export * from './UniImageElement'
|
|
25
|
+
export * from './UniElementType'
|
|
26
|
+
export * from './UniElement'
|
|
27
|
+
export * from './UniCustomViewElement'
|
|
28
|
+
export * from './UniCommon'
|
|
29
|
+
export * from './UniCSSType'
|
|
30
|
+
export * from './UniCSSProperty'
|
|
31
|
+
export type UniPage = globalThis.UniPage
|
|
32
|
+
export type UniViewElement = globalThis.UniViewElement
|
|
33
|
+
export type DrawableContext = globalThis.DrawableContext
|
|
34
|
+
export type UniTextLayout = globalThis.UniTextLayout
|
|
35
|
+
export type UniLayoutSize = globalThis.UniLayoutSize
|
|
36
|
+
export type UniLayoutConstraintSize = globalThis.UniLayoutConstraintSize
|
|
37
|
+
export type UniTextElement = globalThis.UniTextElement
|
|
38
|
+
export type UniScrollViewElement = globalThis.UniScrollViewElement
|
|
39
|
+
export type UniImageElement = globalThis.UniImageElement
|
|
40
|
+
export type UniElement = globalThis.UniElement
|