@oiyo/framework 0.4.9 → 0.6.0

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.
@@ -0,0 +1,3410 @@
1
+ /**
2
+ * @oiyo/framework v0.6.0
3
+ * Copyright (c) 2026 skiyee. All rights reserved.
4
+ * Commercial software. See LICENSE for terms.
5
+ * Official site: https://oiyo.js.org
6
+ */
7
+ import { Plugin } from "vue";
8
+ import { PageMeta } from "@oiyo/core";
9
+ //#region src/oiyo/http/utils/emitter.d.ts
10
+ type EmitterListener = (...arg: unknown[]) => void;
11
+ declare abstract class Emitter {
12
+ private listeners;
13
+ constructor();
14
+ on(id: string, listener: EmitterListener): void;
15
+ off(id: string, listener: EmitterListener): void;
16
+ protected emit(id: string, ...args: unknown[]): void;
17
+ remove(id: string): void;
18
+ }
19
+ //#endregion
20
+ //#region src/oiyo/http/abort.d.ts
21
+ type OnabortListener = () => void;
22
+ declare class HttpAbortSignal extends Emitter {
23
+ protected _aborted: boolean;
24
+ protected _reason: unknown;
25
+ protected _onabortListener: OnabortListener | null;
26
+ get aborted(): boolean;
27
+ get reason(): unknown;
28
+ protected _abort(reason: unknown): void;
29
+ throwIfAborted(): void;
30
+ }
31
+ declare class HttpAborter {
32
+ private readonly _signal;
33
+ constructor();
34
+ get signal(): HttpAbortSignal;
35
+ abort(reason?: unknown): void;
36
+ }
37
+ /**
38
+ * 创建一个中断信标。
39
+ *
40
+ * @example
41
+ * const aborter = createHttpAborter()
42
+ * http.request('/pet/1', { signal: aborter.signal })
43
+ * aborter.abort()
44
+ */
45
+ declare function createHttpAborter(): HttpAborter;
46
+ //#endregion
47
+ //#region src/oiyo/http/types/utils.d.ts
48
+ type Prettify<T> = { [K in keyof T]: T[K]; } & {};
49
+ type MaybePromise<T> = T | Promise<T>;
50
+ //#endregion
51
+ //#region src/oiyo/http/types/body.d.ts
52
+ interface ResponseBodyTypeMap {
53
+ text: string;
54
+ arrayBuffer: ArrayBuffer;
55
+ }
56
+ type ResponseBodyType = Prettify<keyof ResponseBodyTypeMap | 'json'>;
57
+ type MappedResponseBodyType<TRBType extends ResponseBodyType, TRBJsonType = any> = TRBType extends keyof ResponseBodyTypeMap ? ResponseBodyTypeMap[TRBType] : TRBJsonType;
58
+ //#endregion
59
+ //#region src/oiyo/http/types/uni.d.ts
60
+ interface UniAppOnHeadersData {
61
+ header: Record<string, string>;
62
+ }
63
+ type UniAppRequestOptions = Omit<UniNamespace.RequestOptions, 'url' | 'data' | 'header' | 'method' | 'timeout' | 'responseType' | 'success' | 'fail' | 'complete'>;
64
+ interface UniAppRequestChunkData {
65
+ data: ArrayBuffer;
66
+ }
67
+ type UniAppRequestResponse<TRBody = any> = Prettify<Omit<UniNamespace.RequestSuccessCallbackResult, 'data'> & {
68
+ data: TRBody;
69
+ }>;
70
+ type UniAppUploadOptions = Omit<UniNamespace.UploadFileOption, 'url' | 'header' | 'formData' | 'timeout' | 'success' | 'fail' | 'complete'>;
71
+ interface UniAppUploadOnProgressData extends UniNamespace.OnProgressUpdateResult {}
72
+ type UniAppUploadResponse<TRBody = any> = Prettify<Omit<UniNamespace.UploadFileSuccessCallbackResult, 'data'> & {
73
+ data: TRBody;
74
+ }>;
75
+ type UniAppDownloadBodyType = 'json';
76
+ type UniAppDownloadBody = Prettify<Pick<UniNamespace.DownloadSuccessData, 'tempFilePath'>>;
77
+ type UniAppDownloadOptions = Omit<UniNamespace.DownloadFileOption, 'url' | 'header' | 'timeout' | 'success' | 'fail' | 'complete'>;
78
+ interface UniAppDownloadOnProgressData extends UniNamespace.OnProgressDownloadResult {}
79
+ type UniAppDownloadResponse<TRBody = any> = Prettify<Omit<UniNamespace.DownloadSuccessData, keyof UniAppDownloadBody> & {
80
+ data: TRBody;
81
+ }>;
82
+ //#endregion
83
+ //#region src/oiyo/http/types/response.d.ts
84
+ type HttpRequestResult<TRBody = any, TRBType extends ResponseBodyType = ResponseBodyType> = MappedResponseBodyType<TRBType, TRBody>;
85
+ type HttpUploadResult<TRBody = any, TRBType extends ResponseBodyType = ResponseBodyType> = MappedResponseBodyType<TRBType, TRBody>;
86
+ type HttpDownloadResult<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = 'json'> = MappedResponseBodyType<TRBType, TRBody>;
87
+ type HttpRequestResponse<TRBody = any, TRBType extends ResponseBodyType = ResponseBodyType> = UniAppRequestResponse<MappedResponseBodyType<TRBType, TRBody>>;
88
+ type HttpUploadResponse<TRBody = any, TRBType extends ResponseBodyType = ResponseBodyType> = UniAppUploadResponse<MappedResponseBodyType<TRBType, TRBody>>;
89
+ type HttpDownloadResponse<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = 'json'> = UniAppDownloadResponse<MappedResponseBodyType<TRBType, TRBody>>;
90
+ type HttpResponse<T = any> = HttpRequestResponse<T> | HttpUploadResponse<T> | HttpDownloadResponse;
91
+ //#endregion
92
+ //#region src/oiyo/http/types/options.d.ts
93
+ /**
94
+ * 所有传输方式共享的基础选项。
95
+ */
96
+ interface HttpCommonOptions<TRBType extends ResponseBodyType = ResponseBodyType> {
97
+ /**
98
+ * 传输动作
99
+ * @description 常用于钩子中
100
+ * @protected
101
+ */
102
+ _action?: 'request' | 'upload' | 'download';
103
+ /** 与相对 url 进行拼接的基础地址 */
104
+ baseURL?: string;
105
+ method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'TRACE' | 'CONNECT';
106
+ /** 传输过程中所需的请求头 */
107
+ headers?: Record<string, string>;
108
+ /** 与完整传输地址进行拼接的查询参数 */
109
+ query?: Record<string, any>;
110
+ body?: any;
111
+ timeout?: number;
112
+ /**
113
+ * 为 true 时返回完整响应对象(statusCode / header / data ...),
114
+ * 否则只返回精炼后的 data。
115
+ */
116
+ raw?: boolean;
117
+ responseType?: TRBType;
118
+ parseResponse?: (responseText: string) => any;
119
+ /**
120
+ * 重试的响应状态码
121
+ * @default [408, 409, 425, 429, 500, 502, 503, 504]
122
+ */
123
+ retryStatusCodes?: number[];
124
+ /**
125
+ * 是否基于重试响应状态码进行重试
126
+ * @default 1
127
+ */
128
+ retry?: number | false;
129
+ /**
130
+ * 重试延迟时间,单位 ms
131
+ * @default 0
132
+ */
133
+ retryDelay?: number;
134
+ /**
135
+ * 判定响应是否走 `onResponseSuccess`;未通过则走 `onResponseError` 并 reject。
136
+ * @default (status) => status >= 200 && status < 300
137
+ */
138
+ validateStatus?: (status: number) => boolean;
139
+ /**
140
+ * 中断信号,由 `createHttpAborter()` 创建。
141
+ * 信号触发后传输会被中断;已中断的信号会让传输立即中断。
142
+ */
143
+ signal?: HttpAbortSignal;
144
+ /**
145
+ * 监听响应头(对应 task.onHeadersReceived)。
146
+ */
147
+ onHeaders?: (data: UniAppOnHeadersData, off: () => void) => void;
148
+ }
149
+ interface HttpRequestOptions<TRBType extends ResponseBodyType = ResponseBodyType> extends HttpCommonOptions<TRBType>, UniAppRequestOptions {
150
+ _action?: 'request';
151
+ /**
152
+ * 传输方法
153
+ * @default - 'GET'
154
+ */
155
+ method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'TRACE' | 'CONNECT';
156
+ /**
157
+ * 监听流式数据,对应原生 task.onChunkReceived
158
+ * @description 调用 `off()` 将关闭流式数据监听
159
+ */
160
+ onChunk?: (data: UniAppRequestChunkData, off: () => void) => void;
161
+ }
162
+ interface HttpUploadOptions<TRBType extends ResponseBodyType = ResponseBodyType> extends HttpCommonOptions<TRBType>, UniAppUploadOptions {
163
+ _action?: 'upload';
164
+ /**
165
+ * 传输方法,强制 POST
166
+ * @default - 'POST'
167
+ */
168
+ method?: 'POST';
169
+ /**
170
+ * 监听上传进度,对应原生 task.onProgressUpdate
171
+ * @description 调用 `off()` 将关闭上传进度监听
172
+ */
173
+ onProgress?: (data: UniAppUploadOnProgressData, off: () => void) => void;
174
+ }
175
+ interface HttpDownloadOptions<TRBType extends UniAppDownloadBodyType = 'json'> extends HttpCommonOptions<TRBType>, UniAppDownloadOptions {
176
+ _action?: 'download';
177
+ /**
178
+ * 传输方法,强制 GET
179
+ * @default - 'GET'
180
+ */
181
+ method?: 'GET';
182
+ /**
183
+ * 监听下载进度,对应原生 task.onProgressUpdate
184
+ * @description 调用 `off()` 将关闭下载进度监听
185
+ */
186
+ onProgress?: (data: UniAppDownloadOnProgressData, off: () => void) => void;
187
+ }
188
+ /**
189
+ * 传输地址
190
+ */
191
+ type HttpURL = string;
192
+ /**
193
+ * 传输属性
194
+ */
195
+ type HttpOptions = HttpRequestOptions | HttpUploadOptions | HttpDownloadOptions;
196
+ /**
197
+ * 传输拦截器
198
+ */
199
+ interface HttpHooks<TOptions, TResponse> {
200
+ /**
201
+ * 请求前置拦截器
202
+ * - 传输状态: 发起失败
203
+ * - 触发条件: 网络发出前
204
+ * - 接受返回值: options、void、Error
205
+ */
206
+ onBeforeRequest?: (context: {
207
+ url: HttpURL;
208
+ options: TOptions;
209
+ }) => MaybePromise<TOptions | void>;
210
+ /**
211
+ * 请求错误拦截器
212
+ * - 传输状态: 发起失败
213
+ * - 触发条件: 发前抛错、传输 fail、主动 abort 等
214
+ * - Error类: HttpError、Error...
215
+ * - 接受返回值: any (抛出的值将由调用方所接受)
216
+ */
217
+ onRequestError?: (context: {
218
+ error: Error;
219
+ url: HttpURL;
220
+ options: TOptions;
221
+ }) => MaybePromise<unknown>;
222
+ /**
223
+ * 响应成功拦截器
224
+ * - 传输状态: 已响应
225
+ * - 触发条件: `validateStatus` 通过(默认 2xx)
226
+ * - 接受返回值: 原响应值结构 (HttpResponse)、void
227
+ */
228
+ onResponseSuccess?: (context: {
229
+ response: TResponse;
230
+ url: HttpURL;
231
+ options: TOptions;
232
+ }) => MaybePromise<TResponse | void>;
233
+ /**
234
+ * 响应错误拦截器
235
+ * - 传输状态: 已响应
236
+ * - 触发条件: `validateStatus` 未通过
237
+ * - Error类: HttpError、Error
238
+ * - 接受返回值: any (抛出的值将由调用方所接受)
239
+ */
240
+ onResponseError?: (context: {
241
+ error: Error;
242
+ response: TResponse;
243
+ url: HttpURL;
244
+ options: TOptions;
245
+ }) => MaybePromise<unknown>;
246
+ }
247
+ interface HttpConfig extends HttpCommonOptions, HttpHooks<HttpOptions, HttpResponse> {}
248
+ //#endregion
249
+ //#region src/oiyo/http/types/core.d.ts
250
+ interface HttpRequest {
251
+ <TRBody = any, TRBType extends ResponseBodyType = 'json'>(url: HttpURL, options: HttpRequestOptions<TRBType> & {
252
+ raw: true;
253
+ }): Promise<HttpRequestResponse<TRBody, TRBType>>;
254
+ <TRBody = any, TRBType extends ResponseBodyType = 'json'>(url: HttpURL, options?: HttpRequestOptions<TRBType>): Promise<HttpRequestResult<TRBody, TRBType>>;
255
+ }
256
+ interface HttpUpload {
257
+ <TRBody = any, TRBType extends ResponseBodyType = 'json'>(url: HttpURL, options: HttpUploadOptions<TRBType> & {
258
+ raw: true;
259
+ }): Promise<HttpUploadResponse<TRBody, TRBType>>;
260
+ <TRBody = any, TRBType extends ResponseBodyType = 'json'>(url: HttpURL, options?: HttpUploadOptions<TRBType>): Promise<HttpUploadResult<TRBody, TRBType>>;
261
+ }
262
+ interface HttpDownload {
263
+ <TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = UniAppDownloadBodyType>(url: HttpURL, options: HttpDownloadOptions<TRBType> & {
264
+ raw: true;
265
+ }): Promise<HttpDownloadResponse<TRBody, TRBType>>;
266
+ <TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = UniAppDownloadBodyType>(url: HttpURL, options?: HttpDownloadOptions<TRBType>): Promise<HttpDownloadResult<TRBody, TRBType>>;
267
+ }
268
+ //#endregion
269
+ //#region src/oiyo/http/core.d.ts
270
+ interface Http {
271
+ /**
272
+ * 发起请求
273
+ *
274
+ * @example
275
+ * const data = await http.request<IUserInfoRes>('/user/info')
276
+ * // data 是精炼后的数据,同 `IUserInfoRes` 结构的值
277
+ *
278
+ * const response = await http.request<IUserInfoRes>('/user/info', { raw: true })
279
+ * // response 是源响应数据,你必须通过 response.data 才能拿到同 `IUserInfoRes` 结构的值
280
+ */
281
+ request: HttpRequest;
282
+ /**
283
+ * 文件上传
284
+ *
285
+ * @example
286
+ * const data = await http.upload<IUploadRes>('/upload', { name: 'file', filePath, body: { category: 'avatar' } })
287
+ * // data 是精炼后的数据,同 `IUploadRes` 结构的值
288
+ *
289
+ * const response = await http.upload<IUploadRes>('/upload', { raw: true, name: 'file', filePath, body: { category: 'avatar' } })
290
+ * // response 是源响应数据,你必须通过 response.data 才能拿到同 `IUploadRes` 结构的值
291
+ */
292
+ upload: HttpUpload;
293
+ /**
294
+ * 文件下载
295
+ *
296
+ * @example
297
+ * const data = await http.download('/file/report.pdf')
298
+ * // data.tempFilePath 可以直接获取到临时文件路径
299
+ *
300
+ * const response = await http.download('/file/report.pdf', { raw: true })
301
+ * // response 是源响应数据,你必须通过 response.data.tempFilePath 才能拿到
302
+ */
303
+ download: HttpDownload;
304
+ /**
305
+ * 基于当前配置派生一个新实例。
306
+ *
307
+ * @example
308
+ * // 作为实例源
309
+ * const client = http.create({ ... })
310
+ *
311
+ * // 派生鉴权/订单专用实例,它们都会继承与 client 中的配置
312
+ * const authClient = client.create({...})
313
+ * const orderClient = client.create({...})
314
+ */
315
+ create: (config: HttpConfig) => Http;
316
+ }
317
+ declare function createHttp(globalConfig?: HttpConfig): Http;
318
+ /**
319
+ * 请求层
320
+ *
321
+ * @docs https://oiyo.js.org/docs/manual/data/http
322
+ * @example
323
+ * // 发起请求
324
+ * const data = await http.request<IUserInfoRes>('/user/info')
325
+ *
326
+ * // 文件上传
327
+ * const data = await http.upload<IUploadRes>('/upload', { name: 'file', filePath, body: { category: 'avatar' } })
328
+ *
329
+ * // 文件下载
330
+ * const { tempFilePath } = await http.download('/file/report.pdf')
331
+ *
332
+ * // 中断进行中的请求
333
+ * const aborter = createHttpAborter()
334
+ * http.request('/pet/1', { signal: aborter.signal })
335
+ * aborter.abort()
336
+ *
337
+ * // 派生一个新实例(覆盖超时等配置,公共实例的钩子会一并串联执行)
338
+ * const longTimeoutClient = http.create({ timeout: 120000 })
339
+ */
340
+ declare const http: Http;
341
+ //#endregion
342
+ //#region src/oiyo/http/error.d.ts
343
+ declare class HttpError<TB = any> extends Error {
344
+ /** 调用方在传输过程中主动中止 */
345
+ static readonly ABORT = "ABORT";
346
+ /** 调用方无法发起传输行为:网络错误、跨域、超时等 */
347
+ static readonly FAIL = "FAIL";
348
+ /** 响应的 HTTP 状态码未通过 `validateStatus`(默认非 2xx) */
349
+ static readonly STATUS = "STATUS";
350
+ readonly url?: HttpURL;
351
+ readonly options?: HttpOptions;
352
+ readonly response?: HttpResponse<TB>;
353
+ readonly statusCode?: number;
354
+ readonly statusMessage?: string;
355
+ readonly data?: TB;
356
+ constructor(options: {
357
+ name: string;
358
+ message: string;
359
+ cause?: unknown;
360
+ });
361
+ }
362
+ declare function isHttpError(error: unknown): error is HttpError;
363
+ //#endregion
364
+ //#region ../oiyo-config/src/pages/interfaces/condition.d.ts
365
+ interface ConditionItem {
366
+ /**
367
+ * 启动模式名称
368
+ */
369
+ name: string;
370
+ /**
371
+ * 启动页面路径
372
+ */
373
+ path: string;
374
+ /**
375
+ * 启动参数,可在页面的 onLoad 函数里获得
376
+ */
377
+ query?: string;
378
+ }
379
+ interface Condition {
380
+ /**
381
+ * 当前激活的模式,list 节点的索引值
382
+ */
383
+ current: number;
384
+ /**
385
+ * 启动模式列表
386
+ */
387
+ list: Partial<ConditionItem>[];
388
+ }
389
+ //#endregion
390
+ //#region ../oiyo-config/src/pages/interfaces/easycom.d.ts
391
+ interface EasyCom {
392
+ /**
393
+ * 是否开启自动扫描,开启后将会自动扫描符合 `components/组件名称/组件名称.vue` 目录结构的组件
394
+ *
395
+ * @default true
396
+ */
397
+ autoscan?: boolean;
398
+ /**
399
+ * 以正则方式自定义组件匹配规则
400
+ *
401
+ * 如果 `autoscan` 不能满足需求,可以使用 `custom` 自定义匹配规则
402
+ *
403
+ * @example
404
+ * "custom": {
405
+ * "^uni-(.*)": "@/components/uni-$1.vue", // 匹配 components 目录内的 vue 文件
406
+ * "^vue-file-(.*)": "packageName/path/to/vue-file-$1.vue" // 匹配 node_modules 内的 vue 文件
407
+ * }
408
+ }
409
+ */
410
+ custom?: Record<string, string>;
411
+ }
412
+ //#endregion
413
+ //#region ../oiyo-config/src/pages/interfaces/common.d.ts
414
+ type RGBAColor = `rgba(${number}, ${number}, ${number}, ${number})`;
415
+ type HEXColor = `#${string}`;
416
+ type PxSize = `${number}px`;
417
+ type PercentageSize = `${number}%`;
418
+ type ThemeVar = `@${string}`;
419
+ /**
420
+ * 窗口动画,详见 [窗口动画](https://uniapp.dcloud.net.cn/api/router.html#animation)
421
+ */
422
+ type AnimationType = 'slide-in-right' | 'slide-in-left' | 'slide-in-top' | 'slide-in-bottom' | 'pop-in' | 'fade-in' | 'zoom-out' | 'zoom-fade-out' | 'none';
423
+ interface TitleNViewButton {
424
+ /**
425
+ * 自定义按钮样式,详见 [自定义按钮样式](https://uniapp.dcloud.net.cn/collocation/pages#app-titlenview-buttons-type)
426
+ *
427
+ * "forward" 前进按钮
428
+ *
429
+ * "back" 后退按钮
430
+ *
431
+ * "share" 分享按钮
432
+ *
433
+ * "favorite" 收藏按钮
434
+ *
435
+ * "home" 主页按钮
436
+ *
437
+ * "menu" 菜单按钮
438
+ *
439
+ * "close" 关闭按钮
440
+ *
441
+ * "none" 无样式,需通过 text 属性设置按钮上显示的内容、通过 fontSrc 属性设置使用的字体库
442
+ *
443
+ * @default "none"
444
+ */
445
+ type?: 'forward' | 'back' | 'share' | 'favorite' | 'home' | 'menu' | 'close' | 'none';
446
+ /**
447
+ * 自定义按钮文字颜色,支持 HEX 颜色
448
+ *
449
+ * @default 与标题文字样式一样
450
+ *
451
+ * @format color
452
+ */
453
+ color?: HEXColor;
454
+ /**
455
+ * 自定义按钮背景色,仅在标题栏 type 为 "transparent" 时生效,支持 HEX 和 RGBA 颜色
456
+ *
457
+ * @default 灰色半透明
458
+ *
459
+ * @format color
460
+ */
461
+ background?: HEXColor | RGBAColor;
462
+ /**
463
+ * 自定义按钮按下状态文字颜色,支持 HEX 和 RGBA 颜色
464
+ *
465
+ * @default color 属性值自动调整透明度为 0.3
466
+ *
467
+ * @format color
468
+ */
469
+ colorPressed?: HEXColor | RGBAColor;
470
+ /**
471
+ * 自定义按钮在标题栏的显示位置,仅支持 "right" / "left"
472
+ *
473
+ * "right" 右侧
474
+ *
475
+ * "left" 左侧
476
+ *
477
+ * @default "right"
478
+ */
479
+ float?: 'right' | 'left';
480
+ /**
481
+ * 自定义按钮文字粗细,仅支持 "normal" | "bold"
482
+ *
483
+ * "normal" 标准
484
+ *
485
+ * "bold" 加粗
486
+ *
487
+ * @default "normal"
488
+ */
489
+ fontWeight?: 'normal' | 'bold';
490
+ /**
491
+ * 自定义按钮文字大小
492
+ */
493
+ fontSize?: string;
494
+ /**
495
+ * 自定义按钮字体文件路径,只支持本地地址
496
+ */
497
+ fontSrc?: string;
498
+ /**
499
+ * 自定义按钮是否显示选择指示图标(向下箭头),常用于城市选择
500
+ *
501
+ * @default false
502
+ */
503
+ select?: boolean;
504
+ /**
505
+ * 自定义按钮文字内容。使用字体图标时 unicode 字符表示必须以"\\u" 开头,如 "\\ue123"
506
+ */
507
+ text?: string;
508
+ /**
509
+ * 自定义按钮文字宽度,支持单位为 px 的逻辑像素值或 "auto",按钮内容居中显示
510
+ *
511
+ * @default "44px"
512
+ */
513
+ width?: PxSize | 'auto';
514
+ }
515
+ //#endregion
516
+ //#region ../oiyo-config/src/pages/interfaces/globalStyle/app-plus.d.ts
517
+ interface AppPlus {
518
+ /**
519
+ * 窗体背景色,支持 HEX 颜色
520
+ *
521
+ * 无论 vue 页面还是 nvue 页面,在 App 上都有一个父级原生窗体,该窗体的背景色生效时间快于页面里的 css 生效时间
522
+ *
523
+ * @default "#FFFFFF"
524
+ *
525
+ * @desc App (vue 页面需要将 body 背景色设为透明)
526
+ *
527
+ * @format color
528
+ */
529
+ background?: HEXColor;
530
+ /**
531
+ * 导航栏,详见 [导航栏](https://uniapp.dcloud.net.cn/collocation/pages#app-titlenview)
532
+ *
533
+ * 当 navigationStyle 设为 "custom" 或 titleNView 设为 false时,原生导航栏不显示,详见 [自定义导航栏使用注意](https://uniapp.dcloud.net.cn/collocation/pages#customnav)
534
+ */
535
+ titleNView?: false | {
536
+ /**
537
+ * 背景颜色,支持 HEX 和 RGBA 颜色,App 端仅悬浮导航栏支持 RGBA 颜色
538
+ *
539
+ * @default "#F7F7F7"
540
+ *
541
+ * @format color
542
+ */
543
+ backgroundColor?: HEXColor | RGBAColor;
544
+ /**
545
+ * 自定义按钮,详见 [自定义按钮](https://uniapp.dcloud.net.cn/collocation/pages#app-titlenview-buttons)
546
+ *
547
+ * @desc 纯 nvue 即 render:native 时暂不支持
548
+ */
549
+ buttons?: TitleNViewButton[];
550
+ /**
551
+ * 标题文字颜色,支持 HEX 颜色
552
+ *
553
+ * @default "#000000"
554
+ *
555
+ * @format color
556
+ */
557
+ titleColor?: HEXColor;
558
+ /**
559
+ * 标题文字超出显示区域时处理方式
560
+ *
561
+ * "ellipsis" 超出显示区域时尾部显示省略标记(...)
562
+ *
563
+ * "clip" 超出显示区域时内容裁剪
564
+ *
565
+ * @default "ellipsis"
566
+ */
567
+ titleOverflow?: 'ellipsis' | 'clip';
568
+ /**
569
+ * 标题文字内容
570
+ */
571
+ titleText?: string;
572
+ /**
573
+ * 标题文字大小
574
+ */
575
+ titleSize?: string;
576
+ /**
577
+ * 导航栏样式
578
+ *
579
+ * "default" 默认样式
580
+ *
581
+ * "transparent" 滚动透明渐变
582
+ *
583
+ * "float" 悬浮导航栏
584
+ *
585
+ * @default "default"
586
+ */
587
+ type?: 'default' | 'transparent' | 'float';
588
+ /**
589
+ * 原生 View 增强,详见 [5+ View 控件](http://www.html5plus.org/doc/zh_cn/nativeobj.html#plus.nativeObj.ViewDrawTagStyles)
590
+ */
591
+ tags?: {
592
+ /**
593
+ * 绘制操作标识
594
+ *
595
+ * 可通过 view 对象的 drawBitmap / drawRect / drawText / clearRect 方法进行更新
596
+ */
597
+ id?: string;
598
+ /**
599
+ * 绘制操作类型
600
+ *
601
+ * "img" 绘制图片,与 drawBitmap 操作一致,此时 id、src、position、sprite 属性值有效
602
+ *
603
+ * "rect" 绘制矩形区域,与 drawRect 操作一致,此时 id、color、position、rectStyles 属性值有效
604
+ *
605
+ * "font" 绘制文本内容,与 drawText 操作一致,此时 id、position、text、textStyles 属性值有效
606
+ *
607
+ * "richtext" 绘制富文本内容,与 drawRichText 操作一致,此时 id、position、text、richTextStyles 属性值有效
608
+ *
609
+ * "input" 绘制输入框内容,此时 id、position、inputStyles 属性值有效
610
+ */
611
+ tag?: 'img' | 'rect' | 'font' | 'richtext' | 'input';
612
+ /**
613
+ * 矩形区域颜色,支持 HEX 和 RGBA 颜色
614
+ *
615
+ * 不推荐使用,推荐使用 rectStyles
616
+ *
617
+ * 当 tag 属性值为 "rect" 时有效,用于指定矩形区域颜色
618
+ *
619
+ * @default "#FFFFFF"
620
+ *
621
+ * @format color
622
+ */
623
+ color?: HEXColor | RGBAColor;
624
+ /**
625
+ * 绘制输入框的样式
626
+ *
627
+ * 当 tag 属性值为 "input" 时有效,用于指定绘制输入框的样式、大小位置等信息
628
+ */
629
+ inputStyles?: {
630
+ /**
631
+ * 输入框类型
632
+ *
633
+ * "email" 邮箱地址输入框
634
+ *
635
+ * "number" 数字输入框
636
+ *
637
+ * "search" 搜索文本输入框
638
+ *
639
+ * "tel" 电话号码输入框
640
+ *
641
+ * "text" 普通文本输入框
642
+ *
643
+ * "url" URL地址输入框
644
+ *
645
+ * @default "text"
646
+ */
647
+ type?: 'email' | 'number' | 'search' | 'tel' | 'text' | 'url';
648
+ /**
649
+ * 输入框的提示文本
650
+ *
651
+ * 当用户未输入内容时显示在编辑框中(灰色文字)。
652
+ */
653
+ placeholder?: string;
654
+ /**
655
+ * 输入框的字体大小,单位为 px
656
+ *
657
+ * @default "16px"
658
+ */
659
+ fontSize?: PxSize;
660
+ /**
661
+ * 输入框的边框颜色,支持 HEX 颜色
662
+ *
663
+ * @default "#000000"
664
+ *
665
+ * @format color
666
+ */
667
+ borderColor?: HEXColor;
668
+ /**
669
+ * 输入框的边框圆角半径,单位为 px
670
+ *
671
+ * @default "0px"
672
+ */
673
+ borderRadius?: PxSize;
674
+ /**
675
+ * 输入框的边框宽度,单位为 px
676
+ *
677
+ * @default "1px"
678
+ */
679
+ borderWidth?: PxSize;
680
+ [x: string]: any;
681
+ };
682
+ /**
683
+ * 绘制内容区域,相对于 View 控件的区域信息
684
+ *
685
+ * 当 tag 属性值为 "img" 时,用于指定绘制图片的目标区域
686
+ *
687
+ * 当 tag 属性值为 "rect" 时,用于指定绘制的矩形区域
688
+ *
689
+ * 当 tag 属性值为 "font" 时,用于指定绘制文本的目标区域,此时 height 属性值支持设置为 "wrap_content",表示文本高度根据内容自动计算,此时通过 top 来定位文本绘制的起始位置
690
+ *
691
+ * @default { top: '0px', left: '0px', width: '100%', height: '100%' }
692
+ */
693
+ position?: {
694
+ /**
695
+ * 区域顶部相对于作用对象或容器向下的偏移量,支持单位为 px 的逻辑像素值、百分比(相对于作用对象或容器的高度)或 "auto"
696
+ *
697
+ * @default "0px"
698
+ */
699
+ top?: PxSize | PercentageSize | 'auto';
700
+ /**
701
+ * 区域顶部相对于作用对象或容器向右的偏移量,支持单位为 px 的逻辑像素值、百分比(相对于作用对象或容器的高度)或 "auto"
702
+ *
703
+ * @default "0px"
704
+ */
705
+ left?: PxSize | PercentageSize | 'auto';
706
+ /**
707
+ * 区域宽度,相对于作用对象或容器的宽度,支持单位为 px 的逻辑像素值或百分比
708
+ *
709
+ * @default "100%"
710
+ */
711
+ width?: PxSize | PercentageSize;
712
+ /**
713
+ * 区域高度,相对于作用对象或容器的高度,支持单位为 px 的逻辑像素值或百分比
714
+ *
715
+ * @default "100%"
716
+ */
717
+ height?: PxSize | PercentageSize;
718
+ /**
719
+ * 区域顶部相对于作用对象或容器向上的偏移量,支持单位为 px 的逻辑像素值、百分比(相对于作用对象或容器的高度)或 "auto"
720
+ *
721
+ * 当设置了 top 和 height 值时,忽略此属性值
722
+ *
723
+ * 当未设置 top 值时,可通过 bottom 属性值来确定区域的垂直位置
724
+ *
725
+ * 当未设置 height 值时,可通过 top 和 bottom 属性值来确定区域的高度
726
+ */
727
+ bottom?: PxSize | PercentageSize | 'auto';
728
+ /**
729
+ * 区域顶部相对于作用对象或容器向左的偏移量,支持单位为 px 的逻辑像素值、百分比(相对于作用对象或容器的高度)或 "auto"
730
+ *
731
+ * 当设置了 left 和 width 值时,忽略此属性值
732
+ *
733
+ * 当未设置 left 值时,可通过 right 属性值来确定区域的水平位置
734
+ *
735
+ * 当未设置 width 值时,可通过 left 和 right 属性值来确定区域的宽度
736
+ */
737
+ right?: PxSize | PercentageSize | 'auto';
738
+ [x: string]: any;
739
+ };
740
+ /**
741
+ * 绘制区域的样式
742
+ *
743
+ * 当 tag 属性值为 "rect" 时有效,用于指定绘制区域的样式、填充颜色、圆角大小等信息
744
+ */
745
+ rectStyles?: {
746
+ /**
747
+ * 绘制颜色,矩形填充区域的颜色,支持 HEX 和 RGBA 颜色
748
+ *
749
+ * @default "#FFFFFF"
750
+ *
751
+ * @format color
752
+ */
753
+ color?: HEXColor | RGBAColor;
754
+ /**
755
+ * 矩形区域的圆角半径,单位为 px
756
+ *
757
+ * @default "0px"
758
+ */
759
+ radius?: PxSize;
760
+ /**
761
+ * 矩形边框颜色,绘制矩形边框的颜色,支持 HEX 和 RGBA 颜色
762
+ *
763
+ * @default color 属性值
764
+ *
765
+ * @format color
766
+ */
767
+ borderColor?: HEXColor | RGBAColor;
768
+ /**
769
+ * 矩形边框宽度,单位为 px
770
+ *
771
+ * @default "0px"
772
+ */
773
+ borderWidth?: PxSize;
774
+ [x: string]: any;
775
+ };
776
+ /**
777
+ * 绘制的图片资源
778
+ *
779
+ * 当 tag 属性值为 "img" 时有效,可以是图片资源路径(字符串类型)或者图片对象(plus.nativeObj.Bitmap对象)
780
+ *
781
+ * src 路径支持 gif 图片,设置的图片路径文件使用 ".gif" 后缀时则认为是 gif 图片,如"_www/loading.gif"
782
+ */
783
+ src?: string;
784
+ /**
785
+ * 图片源的绘制区域
786
+ *
787
+ * 当 tag 属性值为 "img" 时有效,用于指定图片源的绘制区域,相对于图片的区域信息
788
+ *
789
+ * @default { top: '0px', left: '0px', width: '100%', height: '100%' }
790
+ */
791
+ sprite?: {
792
+ /**
793
+ * 区域顶部相对于作用对象或容器向下的偏移量,支持单位为 px 的逻辑像素值、百分比(相对于作用对象或容器的高度)或 "auto"
794
+ *
795
+ * @default "0px"
796
+ */
797
+ top?: PxSize | PercentageSize | 'auto';
798
+ /**
799
+ * 区域顶部相对于作用对象或容器向右的偏移量,支持单位为 px 的逻辑像素值、百分比(相对于作用对象或容器的高度)或 "auto"
800
+ *
801
+ * @default "0px"
802
+ */
803
+ left?: PxSize | PercentageSize | 'auto';
804
+ /**
805
+ * 区域宽度,相对于作用对象或容器的宽度,支持单位为 px 的逻辑像素值或百分比
806
+ *
807
+ * @default "100%"
808
+ */
809
+ width?: PxSize | PercentageSize;
810
+ /**
811
+ * 区域高度,相对于作用对象或容器的高度,支持单位为 px 的逻辑像素值或百分比
812
+ *
813
+ * @default "100%"
814
+ */
815
+ height?: PxSize | PercentageSize;
816
+ /**
817
+ * 区域顶部相对于作用对象或容器向上的偏移量,支持单位为 px 的逻辑像素值、百分比(相对于作用对象或容器的高度)或 "auto"
818
+ *
819
+ * 当设置了 top 和 height 值时,忽略此属性值
820
+ *
821
+ * 当未设置 top 值时,可通过 bottom 属性值来确定区域的垂直位置
822
+ *
823
+ * 当未设置 height 值时,可通过 top 和 bottom 属性值来确定区域的高度
824
+ */
825
+ bottom?: PxSize | PercentageSize | 'auto';
826
+ /**
827
+ * 区域顶部相对于作用对象或容器向左的偏移量,支持单位为 px 的逻辑像素值、百分比(相对于作用对象或容器的高度)或 "auto"
828
+ *
829
+ * 当设置了 left 和 width 值时,忽略此属性值
830
+ *
831
+ * 当未设置 left 值时,可通过 right 属性值来确定区域的水平位置
832
+ *
833
+ * 当未设置 width 值时,可通过 left 和 right 属性值来确定区域的宽度
834
+ */
835
+ right?: PxSize | PercentageSize | 'auto';
836
+ [x: string]: any;
837
+ };
838
+ /**
839
+ * 绘制的文本内容
840
+ *
841
+ * 当 tag 属性值为 "font" 时有效,用于保存绘制的文本内容
842
+ */
843
+ text?: string;
844
+ /**
845
+ * 绘制文本的样式
846
+ *
847
+ * 当 tag 属性值为 "font" 时有效,用于指定绘制文本内容的字体大小、字体颜色、字体类型等信息
848
+ */
849
+ textStyles?: {
850
+ /**
851
+ * 水平对齐方式
852
+ *
853
+ * "left" 字体在指定的区域中水平居左对齐
854
+ *
855
+ * "center" 字体在指定的区域中水平居中对齐
856
+ *
857
+ * "right" 字体在指定的区域中水平居右对齐
858
+ *
859
+ * @default "center"
860
+ */
861
+ align?: 'left' | 'right' | 'center';
862
+ /**
863
+ * 字体颜色,支持 HEX 和 RGBA 颜色
864
+ *
865
+ * @default "#000000"
866
+ *
867
+ * @format color
868
+ */
869
+ color?: HEXColor | RGBAColor;
870
+ /**
871
+ * 文本装饰
872
+ *
873
+ * "none" 无装饰效果
874
+ *
875
+ * "underline" 文本带下划线效果
876
+ *
877
+ * "line-through" 文本带贯穿线(删除线)效果
878
+ *
879
+ * @default "none"
880
+ */
881
+ decoration?: 'none' | 'underline' | 'line-through';
882
+ /**
883
+ * 字体名称,如果指定名称的字体不存在,则使用默认字体
884
+ */
885
+ family?: string;
886
+ /**
887
+ * 字体文件路径
888
+ */
889
+ fontSrc?: string;
890
+ /**
891
+ * 文本行间距,支持单位为 px 的逻辑像素值或百分比
892
+ *
893
+ * @default "20%"
894
+ */
895
+ lineSpacing?: PxSize | PercentageSize;
896
+ /**
897
+ * 文本间距,用于设置字体在绘制目标区域四个方向(top / right / bottom / left)的边距,支持单位为 px 的逻辑像素值或百分比(相对于绘制目标区域)
898
+ *
899
+ * @default "0px"
900
+ */
901
+ margin?: string;
902
+ /**
903
+ * 文本内容超出显示区域时处理方式
904
+ *
905
+ * "clip" 超出显示区域时内容裁剪
906
+ *
907
+ * "ellipsis" 超出显示区域时尾部显示省略标记(...)
908
+ *
909
+ * @default "clip"
910
+ */
911
+ overflow?: 'clip' | 'ellipsis';
912
+ /**
913
+ * 字体大小,单位为 px
914
+ *
915
+ * @default "16px"
916
+ */
917
+ size?: PxSize;
918
+ /**
919
+ * 字体样式
920
+ *
921
+ * "normal" 正常样式
922
+ *
923
+ * "italic" 斜体样式
924
+ *
925
+ * @default "normal"
926
+ */
927
+ style?: 'normal' | 'italic';
928
+ /**
929
+ * 垂直对齐方式,文本内容在指定绘制区域中的垂直对齐方式
930
+ *
931
+ * "top" 垂直居顶对齐
932
+ *
933
+ * "middle" 垂直居中对齐
934
+ *
935
+ * "bottom" - 垂直居底对齐
936
+ *
937
+ * @default "middle"
938
+ */
939
+ verticalAlign?: 'top' | 'middle' | 'bottom';
940
+ /**
941
+ * 字体粗细
942
+ *
943
+ * "normal" 正常
944
+ *
945
+ * "bold" 粗体
946
+ *
947
+ * @default "normal"
948
+ */
949
+ weight?: 'normal' | 'bold';
950
+ /**
951
+ * 文本换行模式
952
+ *
953
+ * "nowrap" 不换行,将所有文本在一行中绘制,忽略换行符("\n")
954
+ *
955
+ * "normal" 自动换行,当指定的宽度无法绘制所有文本时自动换行绘制,碰到 "\n" 字符时强制换行
956
+ *
957
+ * @default "nowrap"
958
+ */
959
+ whiteSpace?: 'normal' | 'nowrap';
960
+ [x: string]: any;
961
+ };
962
+ /**
963
+ * 绘制富文本的样式
964
+ *
965
+ * 当 tag 属性值为 "richtext" 时有效,用于指定绘制富文本内容的默认字体颜色、字体类型等信息
966
+ */
967
+ richTextStyles?: {
968
+ /**
969
+ * 富文本内容的水平对齐方式,对整体内容有效,无法单独控制每行的内容
970
+ *
971
+ * "left" 字体在指定的区域中水平居左对齐
972
+ *
973
+ * "center" 字体在指定的区域中水平居中对齐
974
+ *
975
+ * "right" 字体在指定的区域中水平居右对齐
976
+ *
977
+ * @default "left"
978
+ */
979
+ align?: 'left' | 'right' | 'center';
980
+ /**
981
+ * 富文本默认使用的字体名称,如果指定名称的字体不存在,则使用默认字体
982
+ */
983
+ family?: string;
984
+ /**
985
+ * 富文本默认使用的字体文件路径,必须为本地路径,如果指定的文件路径无效,则使用系统默认字体
986
+ */
987
+ fontSrc?: string;
988
+ [x: string]: any;
989
+ };
990
+ [x: string]: any;
991
+ }[];
992
+ /**
993
+ * 原生导航栏上的搜索框配置,详见 [searchInput](https://uniapp.dcloud.net.cn/collocation/pages#app-titlenview-searchinput)
994
+ *
995
+ * @desc 1.6.0
996
+ */
997
+ searchInput?: {
998
+ /**
999
+ * 是否自动获取焦点
1000
+ *
1001
+ * @default false
1002
+ */
1003
+ autoFocus?: boolean;
1004
+ /**
1005
+ * 非输入状态下文本的对齐方式
1006
+ *
1007
+ * "left" 居左对齐
1008
+ *
1009
+ * "right" 居右对齐
1010
+ *
1011
+ * "center" 居中对齐
1012
+ *
1013
+ * @default "center"
1014
+ */
1015
+ align?: 'center' | 'left' | 'right';
1016
+ /**
1017
+ * 背景颜色,支持 HEX 和 RGBA 颜色
1018
+ *
1019
+ * @default "rgba(255,255,255,0.5)"
1020
+ *
1021
+ * @format color
1022
+ */
1023
+ backgroundColor?: HEXColor | RGBAColor;
1024
+ /**
1025
+ * 输入框的圆角半径,单位为 px
1026
+ *
1027
+ * @default "0px"
1028
+ */
1029
+ borderRadius?: PxSize;
1030
+ /**
1031
+ * 提示文本
1032
+ */
1033
+ placeholder?: string;
1034
+ /**
1035
+ * 提示文本颜色,支持 HEX 颜色
1036
+ *
1037
+ * @default "#CCCCCC"
1038
+ *
1039
+ * @format color
1040
+ */
1041
+ placeholderColor?: HEXColor;
1042
+ /**
1043
+ * 是否禁止输入
1044
+ *
1045
+ * @default false
1046
+ */
1047
+ disabled?: boolean;
1048
+ [x: string]: any;
1049
+ };
1050
+ /**
1051
+ * 标题栏控件是否显示 Home 按钮
1052
+ *
1053
+ * @default false
1054
+ */
1055
+ homeButton?: boolean;
1056
+ /**
1057
+ * 标题栏控件是否显示左侧返回按钮
1058
+ *
1059
+ * @desc App 2.6.3+
1060
+ *
1061
+ * @default true
1062
+ */
1063
+ autoBackButton?: boolean;
1064
+ /**
1065
+ * 返回按钮的样式,详见 [backButton](https://uniapp.dcloud.net.cn/collocation/pages#app-titlenview-backbuttonstyles)
1066
+ *
1067
+ * @desc App 2.6.3
1068
+ */
1069
+ backButton?: {
1070
+ /**
1071
+ * 背景颜色,仅在标题栏 type 为 "transparent" 时生效,当标题栏透明时按钮显示的背景颜色,支持 HEX 和 RGBA 颜色
1072
+ *
1073
+ * @default 灰色半透明
1074
+ *
1075
+ * @format color
1076
+ */
1077
+ background?: HEXColor | RGBAColor;
1078
+ /**
1079
+ * 角标文本,最多显示3个字符,超过则显示为 ...
1080
+ */
1081
+ badgeText?: string;
1082
+ /**
1083
+ * 图标和标题颜色,支持 HEX 和 RGBA 颜色
1084
+ *
1085
+ * @default 窗口标题栏控件的标题文字颜色
1086
+ *
1087
+ * @format color
1088
+ */
1089
+ color?: HEXColor | RGBAColor;
1090
+ /**
1091
+ * 按下状态按钮文字颜色,支持 HEX 和 RGBA 颜色
1092
+ *
1093
+ * @default color 属性值自动调整透明度为 0.3
1094
+ *
1095
+ * @format color
1096
+ */
1097
+ colorPressed?: HEXColor | RGBAColor;
1098
+ /**
1099
+ * 返回图标的粗细
1100
+ *
1101
+ * "normal" 正常
1102
+ *
1103
+ * "bold" 粗体
1104
+ *
1105
+ * @default "normal"
1106
+ */
1107
+ fontWeight?: 'normal' | 'bold';
1108
+ /**
1109
+ * 返回图标文字大小,单位为 px
1110
+ *
1111
+ * 窗口标题栏为透明样式 type 为 "transparent" 时,默认值为 "22px"
1112
+ *
1113
+ * 窗口标题栏为默认样式 type 为 "default" 时,默认值为 "27px"
1114
+ */
1115
+ fontSize?: PxSize;
1116
+ /**
1117
+ * 是否显示红点,当设置了角标文本时红点不显示
1118
+ *
1119
+ * @default false
1120
+ */
1121
+ redDot?: boolean;
1122
+ /**
1123
+ * 返回按钮上的标题,显示在返回图标(字体图标)后
1124
+ *
1125
+ * @default ""
1126
+ */
1127
+ title?: string;
1128
+ /**
1129
+ * 返回按钮上标题的粗细
1130
+ *
1131
+ * "normal" 正常
1132
+ *
1133
+ * "bold" 粗体
1134
+ */
1135
+ titleWeight?: 'normal' | 'bold';
1136
+ [x: string]: any;
1137
+ };
1138
+ /**
1139
+ * 背景图片
1140
+ *
1141
+ * 背景图片路径,如 "/static/img.png",仅支持本地文件绝对路径,根据实际标题栏宽高拉伸绘制
1142
+ *
1143
+ * 渐变色,仅支持线性渐变,两种颜色的渐变,如 "linear-gradient(to top, #a80077, #66ff00)",其中第一个参数为渐变方向,可选 "to right"(从左向右渐变)/ "to left"(从右向左渐变)/ "to bottom"(从上到下渐变)/ "to top"(从下到上渐变)/ "to bottom right"(从左上到右下渐变)/"to top left"(从左上到右下渐变)
1144
+ */
1145
+ backgroundImage?: string;
1146
+ /**
1147
+ * 仅在 backgroundImage 设置为图片路径时有效
1148
+ *
1149
+ * "repeat" 背景图片在垂直方向和水平方向平铺
1150
+ *
1151
+ * "repeat-x" 背景图片在水平方向平铺,垂直方向拉伸
1152
+ *
1153
+ * "repeat-y" 背景图片在垂直方向平铺,水平方向拉伸
1154
+ *
1155
+ * "no-repeat" 背景图片在垂直方向和水平方向都拉伸
1156
+ *
1157
+ * @default "no-repeat"
1158
+ */
1159
+ backgroundRepeat?: 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat';
1160
+ /**
1161
+ * 文本对齐方式
1162
+ *
1163
+ * "center" 居中对齐
1164
+ *
1165
+ * "left" 居左对齐
1166
+ *
1167
+ * "auto" 根据平台自动选择(Android 平台居左对齐,iOS 平台居中对齐)
1168
+ *
1169
+ * @default "auto"
1170
+ */
1171
+ titleAlign?: 'auto' | 'center' | 'left';
1172
+ /**
1173
+ * 高斯模糊效果,仅在 type 为 "transparent" 或 "float" 时有效
1174
+ *
1175
+ * 使用模糊效果时应避免设置背景颜色,设置背景颜色可能覆盖模糊效果
1176
+ *
1177
+ * "dark" 暗风格模糊,对应 iOS 原生 UIBlurEffectStyleDark 效果
1178
+ *
1179
+ * "extralight" 高亮风格模糊,对应 iOS 原生 UIBlurEffectStyleExtraLight 效果
1180
+ *
1181
+ * "light" 亮风格模糊,对应 iOS 原生 UIBlurEffectStyleLight 效果
1182
+ *
1183
+ * "none" 无模糊效果
1184
+ *
1185
+ * @default "none"
1186
+ */
1187
+ blurEffect?: 'dark' | 'extralight' | 'light' | 'none';
1188
+ /**
1189
+ * 标题栏控件变化作用范围,仅在 type 为 "transparent" 时有效,页面滚动时标题栏背景透明度将发生变化
1190
+ *
1191
+ * 当页面滚动到指定偏移量时标题栏背景变为完全不透明
1192
+ *
1193
+ * 支持单位为 px 的逻辑像素值、百分比
1194
+ *
1195
+ * @default "132px"
1196
+ */
1197
+ coverage?: PxSize | PercentageSize;
1198
+ /**
1199
+ * 是否显示标题栏的底部分割线
1200
+ *
1201
+ * @desc 2.6.6
1202
+ *
1203
+ * @default false
1204
+ */
1205
+ splitLine?: boolean | {
1206
+ /**
1207
+ * 底部分割线颜色,支持 HEX 和 RGBA 颜色
1208
+ *
1209
+ * @default "#CCCCCC"
1210
+ *
1211
+ * @format color
1212
+ */
1213
+ color?: HEXColor | RGBAColor;
1214
+ /**
1215
+ * 底部分割线高度,支持单位为 px 的逻辑像素值、百分比
1216
+ *
1217
+ * @default "1px"
1218
+ */
1219
+ height?: PxSize | PercentageSize;
1220
+ [x: string]: any;
1221
+ };
1222
+ /**
1223
+ * 副标题文字颜色,支持 HEX 和 RGBA 颜色
1224
+ *
1225
+ * @desc 2.6.6
1226
+ *
1227
+ * @default 与主标题文字颜色一致
1228
+ *
1229
+ * @format color
1230
+ */
1231
+ subtitleColor?: HEXColor | RGBAColor;
1232
+ /**
1233
+ * 副标题文字字体大小,单位为 px
1234
+ *
1235
+ * "auto" 自动计算,约为 12px
1236
+ *
1237
+ * @desc 2.6.6
1238
+ *
1239
+ * @default "auto"
1240
+ */
1241
+ subtitleSize?: PxSize | 'auto';
1242
+ /**
1243
+ * 标题文字超出显示区域时处理方式
1244
+ *
1245
+ * "clip" 超出显示区域时内容裁剪
1246
+ *
1247
+ * "ellipsis" 超出显示区域时尾部显示省略标记(...)
1248
+ *
1249
+ * @desc 2.6.6
1250
+ *
1251
+ * @default "ellipsis"
1252
+ */
1253
+ subtitleOverflow?: 'clip' | 'ellipsis';
1254
+ /**
1255
+ * 副标题文字内容,设置副标题后将显示两行标题,副标题显示在主标题(titleText)下方
1256
+ *
1257
+ * 设置副标题后将居左显示
1258
+ *
1259
+ * @desc 2.6.6
1260
+ */
1261
+ subtitleText?: string;
1262
+ /**
1263
+ * 标题图标,图标路径如 "./img/t.png",仅支持本地文件路径,相对路径,相对于当前页面的 host 位置,固定宽高为逻辑像素值 "34px"
1264
+ *
1265
+ * 图片的宽高需要相同
1266
+ *
1267
+ * 设置标题图标后标题将居左显示
1268
+ *
1269
+ * @desc 2.6.6
1270
+ */
1271
+ titleIcon?: string;
1272
+ /**
1273
+ * 标题图标圆角,单位为 px
1274
+ *
1275
+ * @default "0px"
1276
+ */
1277
+ titleIconRadius?: PxSize;
1278
+ [x: string]: any;
1279
+ };
1280
+ /**
1281
+ * 原生子窗体,详见 [原生子窗体](https://uniapp.dcloud.net.cn/collocation/pages#app-subNVues)
1282
+ *
1283
+ * @desc App 1.9.10+
1284
+ */
1285
+ subNVues?: {
1286
+ /**
1287
+ * 原生子窗体的标识
1288
+ */
1289
+ id?: string;
1290
+ /**
1291
+ * 配置 nvue 文件路径,nvue 文件需放置到使用 subNVue 的页面文件目录下,cli 项目需要去掉 .nvue 后缀,只保留文件名
1292
+ */
1293
+ path?: string;
1294
+ /**
1295
+ * 原生子窗口内置样式
1296
+ *
1297
+ * "popup" 弹出层
1298
+ *
1299
+ * "navigationBar" 导航栏
1300
+ */
1301
+ type?: string;
1302
+ /**
1303
+ * 原生子窗体的样式
1304
+ */
1305
+ style?: {
1306
+ /**
1307
+ * 原生子窗体的排版位置,排版位置决定原生子窗体在父窗口中的定位方式
1308
+ *
1309
+ * "static" 原生子窗体在页面中正常定位,如果页面存在滚动条则随窗口内容滚动
1310
+ *
1311
+ * "absolute" 原生子窗体在页面中绝对定位,如果页面存在滚动条不随窗口内容滚动
1312
+ *
1313
+ * "dock" 原生子窗体在页面中停靠,停靠位置由 dock 属性值决定
1314
+ *
1315
+ * @default "absolute"
1316
+ */
1317
+ position?: 'static' | 'absolute' | 'dock';
1318
+ /**
1319
+ * 原生子窗体停靠位置,仅 position 为 "dock" 时生效
1320
+ *
1321
+ * "top" 原生子窗体停靠在页面顶部
1322
+ *
1323
+ * "bottom" 原生子窗体停靠在页面底部
1324
+ *
1325
+ * "right" 原生子窗体停靠在页面右侧
1326
+ *
1327
+ * "left" 原生子窗体停靠在页面左侧
1328
+ *
1329
+ * @default "bottom"
1330
+ */
1331
+ dock?: 'top' | 'bottom' | 'right' | 'left';
1332
+ /**
1333
+ * 原生子窗体的遮罩层,仅当原生子窗体 type 为 "popup" 时生效,支持 RGBA 颜色
1334
+ *
1335
+ * @default "rgba(0,0,0,0.5)"
1336
+ *
1337
+ * @format color
1338
+ */
1339
+ mask?: RGBAColor;
1340
+ /**
1341
+ * 原生子窗体的宽度,支持以 px 为单位的逻辑像素值或百分比
1342
+ *
1343
+ * 未设置时,可同时设置 left 和 right 属性值改变窗口的默认宽度
1344
+ *
1345
+ * @default "100%"
1346
+ */
1347
+ width?: PxSize | PercentageSize;
1348
+ /**
1349
+ * 原生子窗体的高度,支持以 px 为单位的逻辑像素值或百分比
1350
+ *
1351
+ * 未设置时,可同时设置 top 和 bottom 属性值改变窗口的默认高度
1352
+ *
1353
+ * @default "100%"
1354
+ */
1355
+ height?: PxSize | PercentageSize;
1356
+ /**
1357
+ * 原生子窗体垂直向下的偏移量,支持以 px 为单位的逻辑像素值或百分比
1358
+ *
1359
+ * 未设置 top 属性值时,优先通过 bottom 和 height 属性值来计算原生子窗体的 top 位置
1360
+ *
1361
+ * @default "0px"
1362
+ */
1363
+ top?: PxSize | PercentageSize;
1364
+ /**
1365
+ * 原生子窗体垂直向上的偏移量,支持以 px 为单位的逻辑像素值或百分比
1366
+ *
1367
+ * 同时设置了 top 和 height 值时,忽略此属性值
1368
+ *
1369
+ * 未设置 height 时,通过 top 和 bottom 属性值来确定原生子窗体的高度
1370
+ *
1371
+ * @default 根据 top 和 height 属性值自动计算
1372
+ */
1373
+ bottom?: PxSize | PercentageSize;
1374
+ /**
1375
+ * 原生子窗体水平向左的偏移量,支持以 px 为单位的逻辑像素值或百分比
1376
+ *
1377
+ * 未设置 left 属性值时,优先通过 right 和 width 属性值来计算原生子窗体的 left 位置
1378
+ *
1379
+ * @default "0px"
1380
+ */
1381
+ left?: PxSize | PercentageSize;
1382
+ /**
1383
+ * 原生子窗体水平向右的偏移量,支持以 px 为单位的逻辑像素值或百分比
1384
+ *
1385
+ * 同时设置了 left 和 height 值时,忽略此属性值
1386
+ *
1387
+ * 未设置 width 时,通过 left 和 bottom 属性值来确定原生子窗体的宽度
1388
+ *
1389
+ * @default 根据 left 和 width 属性值来自动计算
1390
+ */
1391
+ right?: PxSize | PercentageSize;
1392
+ /**
1393
+ * 原生子窗体的边距,用于定位原生子窗体的位置,若设置了 left、right、top、bottom 则对应的边距值失效
1394
+ *
1395
+ * "auto" 居中
1396
+ */
1397
+ margin?: string;
1398
+ /**
1399
+ * 原生子窗体的窗口的堆叠顺序值,拥有更高堆叠顺序的窗口总是会处于堆叠顺序较低的窗口的前面,拥有相同堆叠顺序的窗口后调用 show 方法则在前面
1400
+ */
1401
+ zindex?: number;
1402
+ /**
1403
+ * 窗口的背景颜色,支持 Hex 颜色
1404
+ *
1405
+ * Android 平台 4.0 以上系统支持 "transparent" 背景透明样式,比如 subNVue 为圆角时需要设置为 "transparent" 才能看到正确的效果
1406
+ *
1407
+ * @default "#FFFFFF"
1408
+ *
1409
+ * @format color
1410
+ */
1411
+ background?: HEXColor | 'transparent';
1412
+ [x: string]: any;
1413
+ };
1414
+ [x: string]: any;
1415
+ }[];
1416
+ /**
1417
+ * 页面回弹效果,设置为 "none" 时关闭效果
1418
+ *
1419
+ * @desc App-vue(nvue Android 无页面级bounce效果,仅 list、recycle-list、waterfall 等滚动组件有 bounce 效果)
1420
+ */
1421
+ bounce?: string;
1422
+ /**
1423
+ * 侧滑返回功能,仅支持 "close" / "none"
1424
+ *
1425
+ * "close" 启用侧滑返回
1426
+ *
1427
+ * "none" 禁用侧滑返回
1428
+ *
1429
+ * @default "close"
1430
+ *
1431
+ * @desc App-iOS
1432
+ */
1433
+ popGesture?: 'close' | 'none';
1434
+ /**
1435
+ * iOS 软键盘上完成工具栏的显示模式,设置为 "none" 时关闭工具栏
1436
+ *
1437
+ * @default "auto"
1438
+ *
1439
+ * @desc App-iOS
1440
+ */
1441
+ softInputNavBar?: 'auto' | 'none';
1442
+ /**
1443
+ * 软键盘弹出模式,仅支持 "adjustResize" / "adjustPan"
1444
+ *
1445
+ * @default "adjustPan"
1446
+ *
1447
+ * @desc App
1448
+ */
1449
+ softInputMode?: 'adjustResize' | 'adjustPan';
1450
+ /**
1451
+ * 下拉刷新
1452
+ *
1453
+ * @desc App
1454
+ */
1455
+ pullToRefresh?: {
1456
+ /**
1457
+ * 是否开启窗口下拉刷新
1458
+ *
1459
+ * @default false
1460
+ */
1461
+ support?: boolean;
1462
+ /**
1463
+ * 下拉刷新控件颜色,仅 style 为 "circle" 时有效,支持 HEX 颜色
1464
+ *
1465
+ * @default "#2BD009"
1466
+ *
1467
+ * @format color
1468
+ */
1469
+ color?: HEXColor;
1470
+ /**
1471
+ * 下拉刷新控件样式
1472
+ *
1473
+ * "default" 下拉拖动时页面内容跟随
1474
+ *
1475
+ * "circle" 下拉拖动时仅刷新控件跟随
1476
+ *
1477
+ * @default Android 为 "circle",iOS 为 "default"
1478
+ */
1479
+ style?: 'default' | 'circle';
1480
+ /**
1481
+ * 下拉刷新控件进入刷新状态的拉拽高度,支持以 px 为单位的逻辑像素值或百分比
1482
+ */
1483
+ height?: PxSize | PercentageSize;
1484
+ /**
1485
+ * 窗口可下拉拖拽的范围,支持以 px 为单位的逻辑像素值或百分比
1486
+ */
1487
+ range?: PxSize | PercentageSize;
1488
+ /**
1489
+ * 下拉刷新控件的起始位置,仅 style 为 "circle" 时有效,用于定义刷新控件下拉时的起始位置,支持以 px 为单位的逻辑像素值或百分比
1490
+ *
1491
+ * 如使用了非原生 title 且需要原生下拉刷新,一般都设置 style 为 "circle" 并将 offset 设置为自定义 title 的高度
1492
+ */
1493
+ offset?: PxSize | PercentageSize;
1494
+ /**
1495
+ * 下拉可刷新状态时配置,仅 style 为 "default" 时有效
1496
+ */
1497
+ contentdown?: {
1498
+ /**
1499
+ * 下拉可刷新状态时下拉刷新控件标题内容
1500
+ */
1501
+ caption?: string;
1502
+ [x: string]: any;
1503
+ };
1504
+ /**
1505
+ * 释放可刷新状态时配置,仅 style 为 "default" 时有效
1506
+ */
1507
+ contentover?: {
1508
+ /**
1509
+ * 释放可刷新状态时下拉刷新控件标题内容
1510
+ */
1511
+ caption?: string;
1512
+ [x: string]: any;
1513
+ };
1514
+ /**
1515
+ * 正在刷新状态时配置,仅 style 为 "default" 时有效
1516
+ */
1517
+ contentrefresh?: {
1518
+ /**
1519
+ * 正在刷新状态时下拉刷新控件标题内容
1520
+ */
1521
+ caption?: string;
1522
+ [x: string]: any;
1523
+ };
1524
+ [x: string]: any;
1525
+ };
1526
+ /**
1527
+ * 滚动条显示策略,设置为 "none" 时不显示滚动条
1528
+ *
1529
+ * @desc App
1530
+ */
1531
+ scrollIndicator?: string;
1532
+ /**
1533
+ * 窗口显示的动画效果,详见 [窗口动画](https://uniapp.dcloud.net.cn/api/router#animation)
1534
+ *
1535
+ * @default "pop-in"
1536
+ *
1537
+ * @desc App
1538
+ */
1539
+ animationType?: AnimationType;
1540
+ /**
1541
+ * 窗口显示动画的持续时间,单位为 ms
1542
+ *
1543
+ * @default 300
1544
+ *
1545
+ * @desc App
1546
+ */
1547
+ animationDuration?: number;
1548
+ [x: string]: any;
1549
+ }
1550
+ //#endregion
1551
+ //#region ../oiyo-config/src/pages/interfaces/globalStyle/h5.d.ts
1552
+ interface H5 {
1553
+ /**
1554
+ * 导航栏,详见 [导航栏](https://uniapp.dcloud.net.cn/collocation/pages#h5-titlenview)
1555
+ */
1556
+ titleNView?: false | {
1557
+ /**
1558
+ * 背景颜色,支持 HEX 颜色
1559
+ *
1560
+ * @default "#F7F7F7"
1561
+ *
1562
+ * @format color
1563
+ */
1564
+ backgroundColor?: HEXColor;
1565
+ /**
1566
+ * 自定义按钮,详见 [自定义按钮](https://uniapp.dcloud.net.cn/collocation/pages#app-titlenview-buttons)
1567
+ */
1568
+ buttons?: TitleNViewButton[];
1569
+ /**
1570
+ * 标题文字颜色,支持 HEX 颜色
1571
+ *
1572
+ * @default "#000000"
1573
+ *
1574
+ * @format color
1575
+ */
1576
+ titleColor?: HEXColor;
1577
+ /**
1578
+ * 标题文字内容
1579
+ */
1580
+ titleText?: string;
1581
+ /**
1582
+ * 标题文字大小
1583
+ */
1584
+ titleSize?: string;
1585
+ /**
1586
+ * 导航栏样式
1587
+ *
1588
+ * "default" 默认样式
1589
+ *
1590
+ * "transparent" 滚动透明渐变
1591
+ *
1592
+ * @default "default"
1593
+ */
1594
+ type?: 'default' | 'transparent';
1595
+ /**
1596
+ * 导航栏上的搜索框配置,详见 [searchInput](https://uniapp.dcloud.net.cn/collocation/pages#h5-searchinput)
1597
+ *
1598
+ * @desc 1.6.5
1599
+ */
1600
+ searchInput?: {
1601
+ /**
1602
+ * 是否自动获取焦点
1603
+ *
1604
+ * @default false
1605
+ */
1606
+ autoFocus?: boolean;
1607
+ /**
1608
+ * 非输入状态下文本的对齐方式
1609
+ *
1610
+ * "left" 居左对齐
1611
+ *
1612
+ * "right" 居右对齐
1613
+ *
1614
+ * "center" 居中对齐
1615
+ *
1616
+ * @default "center"
1617
+ */
1618
+ align?: 'center' | 'left' | 'right';
1619
+ /**
1620
+ * 背景颜色,支持 HEX 和 RGBA 颜色
1621
+ *
1622
+ * @default "rgba(255,255,255,0.5)"
1623
+ *
1624
+ * @format color
1625
+ */
1626
+ backgroundColor?: HEXColor | RGBAColor;
1627
+ /**
1628
+ * 输入框的圆角半径,单位为 px
1629
+ *
1630
+ * @default "0px"
1631
+ */
1632
+ borderRadius?: PxSize;
1633
+ /**
1634
+ * 提示文本
1635
+ */
1636
+ placeholder?: string;
1637
+ /**
1638
+ * 提示文本颜色,支持 HEX 颜色
1639
+ *
1640
+ * @default "#CCCCCC"
1641
+ *
1642
+ * @format color
1643
+ */
1644
+ placeholderColor?: HEXColor;
1645
+ /**
1646
+ * 是否禁止输入
1647
+ *
1648
+ * @default false
1649
+ */
1650
+ disabled?: boolean;
1651
+ [x: string]: any;
1652
+ };
1653
+ [x: string]: any;
1654
+ };
1655
+ /**
1656
+ * 下拉刷新,详见 [下拉刷新](https://uniapp.dcloud.net.cn/collocation/pages#h5-pulltorefresh)
1657
+ */
1658
+ pullToRefresh?: {
1659
+ /**
1660
+ * 下拉刷新控件颜色,支持 HEX 颜色
1661
+ *
1662
+ * @default "#2BD009"
1663
+ */
1664
+ color?: HEXColor;
1665
+ /**
1666
+ * 下拉刷新控件起始位置,支持支持单位为 px 的逻辑像素值或百分比
1667
+ *
1668
+ * @default "0px"
1669
+ */
1670
+ offset?: PxSize | PercentageSize;
1671
+ [x: string]: any;
1672
+ };
1673
+ [x: string]: any;
1674
+ }
1675
+ //#endregion
1676
+ //#region ../oiyo-config/src/pages/interfaces/globalStyle/mp-alipay.d.ts
1677
+ /**
1678
+ * 设置编译到 mp-alipay 平台的特定样式,配置项参考 [MP-ALIPAY](https://uniapp.dcloud.net.cn/collocation/pages#mp-alipay) 和 <https://opendocs.alipay.com/mini/framework/app-json#window>
1679
+ *
1680
+ * 相应的类型是 MpAlipay
1681
+ *
1682
+ * @desc 支付宝小程序
1683
+ */
1684
+ interface MpAlipay {
1685
+ /**
1686
+ * 是否允许向下拉拽
1687
+ *
1688
+ * @default "YES"
1689
+ */
1690
+ allowsBounceVertical?: 'YES' | 'NO';
1691
+ /**
1692
+ * 窗口的背景色,支持 HEX 颜色
1693
+ *
1694
+ * @format color
1695
+ */
1696
+ backgroundColor?: HEXColor | ThemeVar;
1697
+ /**
1698
+ * 下拉露出显示背景图的底色,仅 Android 有效,iOS 下页面背景图底色会使用 backgroundColor 的值
1699
+ *
1700
+ * @format color
1701
+ */
1702
+ backgroundImageColor?: HEXColor;
1703
+ /**
1704
+ * 下拉露出显示背景图的链接,支持网络地址和本地地址,尽量使用绝对地址
1705
+ */
1706
+ backgroundImageUrl?: string;
1707
+ /**
1708
+ * 页面默认标题
1709
+ */
1710
+ defaultTitle?: string;
1711
+ /**
1712
+ * 仅支持 Android,是否显示 WebView 滚动条
1713
+ *
1714
+ * @default "YES"
1715
+ */
1716
+ enableScrollBar?: 'YES' | 'NO';
1717
+ /**
1718
+ * 仅支持 iOS,是否支持手势返回
1719
+ *
1720
+ * @default "YES"
1721
+ */
1722
+ gestureBack?: 'YES' | 'NO';
1723
+ /**
1724
+ * 页面上拉触底时触发时距离页面底部的距离,单位为 px,详情可查看 [页面事件处理函数](https://opendocs.alipay.com/mini/framework/page-detail#%E9%A1%B5%E9%9D%A2%E4%BA%8B%E4%BB%B6%E5%A4%84%E7%90%86%E5%87%BD%E6%95%B0)
1725
+ *
1726
+ * @desc [1.19.0](https://opendocs.alipay.com/mini/framework/compatibility),目前 iOS 在 page.json 下设置无效,只能全局设置
1727
+ */
1728
+ onReachBottomDistance?: number;
1729
+ /**
1730
+ * 是否允许下拉刷新,allowsBounceVertical 值需要为 "YES",全局配置后全局生效,但是如果单个页面配置了该参数,以页面的配置为准
1731
+ *
1732
+ * @default false
1733
+ */
1734
+ pullRefresh?: boolean;
1735
+ /**
1736
+ * rpx 单位是否宽度自适应
1737
+ *
1738
+ * 当设置为 false 时,2 rpx 将恒等于 1 px,不再根据屏幕宽度进行自适应,此时 750 rpx 将不再等于 100% 宽度
1739
+ *
1740
+ * @desc [1.23.0](https://opendocs.alipay.com/mini/framework/compatibility)
1741
+ *
1742
+ * @default true
1743
+ */
1744
+ responsive?: boolean;
1745
+ /**
1746
+ * 是否进入时显示导航栏的 loading
1747
+ *
1748
+ * @default "NO"
1749
+ */
1750
+ showTitleLoading?: 'YES' | 'NO';
1751
+ /**
1752
+ * 导航栏透明设置
1753
+ *
1754
+ * always 一直透明
1755
+ *
1756
+ * auto 滑动自适应
1757
+ *
1758
+ * none 不透明
1759
+ *
1760
+ * @default "none"
1761
+ */
1762
+ transparentTitle?: 'always' | 'auto' | 'none';
1763
+ /**
1764
+ * 导航栏点击穿透
1765
+ *
1766
+ * @default "NO"
1767
+ */
1768
+ titlePenetrate?: 'YES' | 'NO';
1769
+ /**
1770
+ * 导航栏图片地址,会替换当前文字标题,只支持 https 图片链接
1771
+ */
1772
+ titleImage?: string;
1773
+ /**
1774
+ * 导航栏背景色,支持 HEX 颜色
1775
+ */
1776
+ titleBarColor?: HEXColor;
1777
+ /**
1778
+ * 导航栏前景色
1779
+ *
1780
+ * @desc [支付宝客户端 10.5.30](https://opendocs.alipay.com/mini/framework/compatibility)
1781
+ */
1782
+ navigationBarFrontColor?: 'black' | 'white';
1783
+ [x: string]: any;
1784
+ }
1785
+ //#endregion
1786
+ //#region ../oiyo-config/src/pages/interfaces/globalStyle/mp-baidu.d.ts
1787
+ /**
1788
+ * 设置编译到 mp-baidu 平台的特定样式,配置项参考 [MP-BAIDU](https://uniapp.dcloud.net.cn/collocation/pages.html#mp-baidu) 和 <https://smartprogram.baidu.com/docs/develop/framework/process/#window>
1789
+ *
1790
+ * 相应的类型是 MpBaidu
1791
+ *
1792
+ * @desc 百度小程序
1793
+ */
1794
+ interface MpBaidu {
1795
+ /**
1796
+ * 导航栏背景颜色,支持 HEX 颜色
1797
+ *
1798
+ * @default "#000000"
1799
+ *
1800
+ * @format color
1801
+ */
1802
+ navigationBarBackgroundColor?: HEXColor | ThemeVar;
1803
+ /**
1804
+ * 导航栏标题、状态栏颜色
1805
+ *
1806
+ * @default "white"
1807
+ */
1808
+ navigationBarTextStyle?: 'black' | 'white' | ThemeVar;
1809
+ /**
1810
+ * 导航栏标题文字内容
1811
+ */
1812
+ navigationBarTitleText?: string;
1813
+ /**
1814
+ * 导航栏样式
1815
+ *
1816
+ * "default" 默认样式
1817
+ *
1818
+ * "custom" 自定义导航栏,只保留右上角胶囊按钮
1819
+ *
1820
+ * @desc 2.10.34
1821
+ *
1822
+ * @default "default"
1823
+ */
1824
+ navigationStyle?: 'default' | 'custom';
1825
+ /**
1826
+ * 窗口的背景色,支持 HEX 颜色
1827
+ *
1828
+ * @default "#FFFFFF"
1829
+ */
1830
+ backgroundColor?: HEXColor | ThemeVar;
1831
+ /**
1832
+ * 下拉 loading 的样式,仅支持 "dark" / "light"
1833
+ *
1834
+ * @default "dark"
1835
+ */
1836
+ backgroundTextStyle?: 'dark' | 'light' | ThemeVar;
1837
+ /**
1838
+ * 顶部窗口的背景色,仅 iOS 支持
1839
+ *
1840
+ * @default "#FFFFFF"
1841
+ */
1842
+ backgroundColorTop?: HEXColor | ThemeVar;
1843
+ /**
1844
+ * 底部窗口的背景色,仅 iOS 支持
1845
+ *
1846
+ * @default "#FFFFFF"
1847
+ */
1848
+ backgroundColorBottom?: HEXColor | ThemeVar;
1849
+ /**
1850
+ * 是否开启全局的下拉刷新
1851
+ *
1852
+ * @default false
1853
+ */
1854
+ enablePullDownRefresh?: boolean;
1855
+ /**
1856
+ * 页面上拉触底事件触发时距页面底部距离,单位为 px
1857
+ *
1858
+ * @default 50
1859
+ */
1860
+ onReachBottomDistance?: number;
1861
+ /**
1862
+ * 小程序页面是否禁止响应字体大小的设置
1863
+ *
1864
+ * "auto" 默认响应
1865
+ *
1866
+ * "none" 不响应
1867
+ *
1868
+ * @desc 基础库版本 3.200.1
1869
+ *
1870
+ * @default "auto"
1871
+ */
1872
+ textSizeAdjust?: 'auto' | 'none';
1873
+ /**
1874
+ * 屏幕旋转设置,支持 auto / portrait / landscape
1875
+ *
1876
+ * "auto" 自动
1877
+ *
1878
+ * "portrait" 竖屏
1879
+ *
1880
+ * "landscape" 横屏
1881
+ *
1882
+ * @desc 基础库版本 3.450.8,web 化暂不支持
1883
+ *
1884
+ * @default "portrait"
1885
+ */
1886
+ pageOrientation?: 'auto' | 'portrait' | 'landscape';
1887
+ [x: string]: any;
1888
+ }
1889
+ //#endregion
1890
+ //#region ../oiyo-config/src/pages/interfaces/globalStyle/mp-jd.d.ts
1891
+ /**
1892
+ * 设置编译到 mp-jd 平台的特定样式,配置项参考 <https://mp-docs.jd.com/doc/dev/framework/504#heading-3>
1893
+ *
1894
+ * 相应的类型是 MpJd
1895
+ *
1896
+ * @desc 京东小程序
1897
+ */
1898
+ interface MpJd {
1899
+ /**
1900
+ * 导航栏背景颜色,支持 HEX 颜色
1901
+ *
1902
+ * @default "#000000"
1903
+ *
1904
+ * @format color
1905
+ */
1906
+ navigationBarBackgroundColor?: HEXColor | ThemeVar;
1907
+ /**
1908
+ * 导航栏标题、状态栏颜色
1909
+ *
1910
+ * @default "white"
1911
+ */
1912
+ navigationBarTextStyle?: 'black' | 'white' | ThemeVar;
1913
+ /**
1914
+ * 导航栏标题文字内容
1915
+ */
1916
+ navigationBarTitleText?: string;
1917
+ /**
1918
+ * 导航栏样式
1919
+ *
1920
+ * "default" 默认样式
1921
+ *
1922
+ * "custom" 自定义导航栏,只保留右上角胶囊按钮
1923
+ *
1924
+ * @default "default"
1925
+ */
1926
+ navigationStyle?: 'default' | 'custom';
1927
+ /**
1928
+ * 下拉窗口的背景色,不是页面的背景颜色
1929
+ *
1930
+ * @default "#FFFFFF"
1931
+ */
1932
+ backgroundColor?: HEXColor | ThemeVar;
1933
+ /**
1934
+ * 下拉 loading 的样式,仅支持 "dark" / "light"
1935
+ *
1936
+ * @default "dark"
1937
+ */
1938
+ backgroundTextStyle?: 'dark' | 'light' | ThemeVar;
1939
+ /**
1940
+ * 顶部窗口的背景色,仅 iOS 支持
1941
+ *
1942
+ * @default "#FFFFFF"
1943
+ */
1944
+ backgroundColorTop?: HEXColor | ThemeVar;
1945
+ /**
1946
+ * 底部窗口的背景色,仅 iOS 支持
1947
+ *
1948
+ * @default "#FFFFFF"
1949
+ */
1950
+ backgroundColorBottom?: HEXColor | ThemeVar;
1951
+ /**
1952
+ * 是否开启全局的下拉刷新,详见 [Page.onPullDownRefresh](https://mp-docs.jd.com/doc/dev/framework/520#heading-10)
1953
+ *
1954
+ * @default false
1955
+ */
1956
+ enablePullDownRefresh?: boolean;
1957
+ [x: string]: any;
1958
+ }
1959
+ //#endregion
1960
+ //#region ../oiyo-config/src/pages/interfaces/globalStyle/mp-kuaishou.d.ts
1961
+ /**
1962
+ * 设置编译到 mp-kuaishou 平台的特定样式,配置项参考 <https://mp.kuaishou.com/docs/develop/frame/config/conf_appjson.html#window>
1963
+ *
1964
+ * 相应的类型是 MpKuaishou
1965
+ *
1966
+ * @desc 快手小程序
1967
+ */
1968
+ interface MpKuaishou {
1969
+ /**
1970
+ * 导航栏背景颜色,支持 HEX 颜色
1971
+ *
1972
+ * @default "#000000"
1973
+ *
1974
+ * @format color
1975
+ */
1976
+ navigationBarBackgroundColor?: HEXColor | ThemeVar;
1977
+ /**
1978
+ * 导航栏标题、状态栏颜色
1979
+ *
1980
+ * @default "white"
1981
+ */
1982
+ navigationBarTextStyle?: 'black' | 'white' | ThemeVar;
1983
+ /**
1984
+ * 导航栏标题文字内容
1985
+ */
1986
+ navigationBarTitleText?: string;
1987
+ /**
1988
+ * 导航栏样式
1989
+ *
1990
+ * "default" 默认样式
1991
+ *
1992
+ * "custom" 自定义导航栏,只保留右上角胶囊按钮
1993
+ *
1994
+ * @default "default"
1995
+ */
1996
+ navigationStyle?: 'default' | 'custom';
1997
+ /**
1998
+ * 窗口的背景色,支持 HEX 颜色
1999
+ *
2000
+ * @default "#FFFFFF"
2001
+ */
2002
+ backgroundColor?: HEXColor | ThemeVar;
2003
+ /**
2004
+ * 下拉 loading 的样式,仅支持 "dark" / "light"
2005
+ *
2006
+ * @default "dark"
2007
+ */
2008
+ backgroundTextStyle?: 'dark' | 'light' | ThemeVar;
2009
+ /**
2010
+ * 顶部窗口的背景色,仅 iOS 支持
2011
+ *
2012
+ * @default "#FFFFFF"
2013
+ */
2014
+ backgroundColorTop?: HEXColor | ThemeVar;
2015
+ /**
2016
+ * 底部窗口的背景色,仅 iOS 支持
2017
+ *
2018
+ * @default "#FFFFFF"
2019
+ */
2020
+ backgroundColorBottom?: HEXColor | ThemeVar;
2021
+ /**
2022
+ * 是否开启全局的下拉刷新,详见 [Page.onPullDownRefresh](https://mp.kuaishou.com/docs/develop/frame/page/page_page.html#onpulldownrefresh)
2023
+ *
2024
+ * @default false
2025
+ */
2026
+ enablePullDownRefresh?: boolean;
2027
+ /**
2028
+ * 页面上拉触底事件触发时距页面底部距离,单位为 px,详见 [Page.onReachBottom](https://mp.kuaishou.com/docs/develop/frame/page/page_page.html#onreachbottom)
2029
+ *
2030
+ * @default 50
2031
+ */
2032
+ onReachBottomDistance?: number;
2033
+ /**
2034
+ * 屏幕旋转设置,支持 auto / portrait / landscape,详见 [响应显示区域变化](https://developers.weixin.qq.com/miniprogram/dev/framework/view/resizable.html)
2035
+ *
2036
+ * "auto" 自动
2037
+ *
2038
+ * "portrait" 竖屏
2039
+ *
2040
+ * "landscape" 横屏
2041
+ *
2042
+ * @default "portrait"
2043
+ */
2044
+ pageOrientation?: 'auto' | 'portrait' | 'landscape';
2045
+ [x: string]: any;
2046
+ }
2047
+ //#endregion
2048
+ //#region ../oiyo-config/src/pages/interfaces/globalStyle/mp-lark.d.ts
2049
+ /**
2050
+ * 设置编译到 mp-lark 平台的特定样式,配置项参考 <https://open.feishu.cn/document/client-docs/gadget/introduction/global-settings#a172b7dd>
2051
+ *
2052
+ * 相应的类型是 MpLark
2053
+ *
2054
+ * @desc 飞书小程序
2055
+ */
2056
+ interface MpLark {
2057
+ /**
2058
+ * 导航栏背景颜色,支持 HEX 颜色
2059
+ *
2060
+ * @desc iOS, Android
2061
+ *
2062
+ * @default "#000000"
2063
+ *
2064
+ * @format color
2065
+ */
2066
+ navigationBarBackgroundColor?: HEXColor | ThemeVar;
2067
+ /**
2068
+ * 导航栏标题、状态栏颜色
2069
+ *
2070
+ * @desc iOS, Android
2071
+ *
2072
+ * @default "white"
2073
+ */
2074
+ navigationBarTextStyle?: 'black' | 'white' | ThemeVar;
2075
+ /**
2076
+ * 导航栏标题文字内容
2077
+ *
2078
+ * @desc iOS, Android, PC
2079
+ */
2080
+ navigationBarTitleText?: string;
2081
+ /**
2082
+ * 导航栏透明设置
2083
+ *
2084
+ * "always" 一直透明
2085
+ *
2086
+ * "auto" 滑动自适应
2087
+ *
2088
+ * "none" 不透明
2089
+ *
2090
+ * @desc iOS, Android
2091
+ *
2092
+ * @default "none"
2093
+ */
2094
+ transparentTitle?: 'always' | 'auto' | 'none';
2095
+ /**
2096
+ * 导航栏样式
2097
+ *
2098
+ * "default" 默认样式
2099
+ *
2100
+ * "custom" 自定义导航栏,只保留右上角胶囊按钮
2101
+ *
2102
+ * @desc iOS, Android, PC
2103
+ *
2104
+ * @default "default"
2105
+ */
2106
+ navigationStyle?: 'default' | 'custom';
2107
+ /**
2108
+ * 窗口的背景色,支持 HEX 颜色
2109
+ *
2110
+ * @desc iOS, Android, PC(3.14.0+)
2111
+ *
2112
+ * @default "#FFFFFF"
2113
+ */
2114
+ backgroundColor?: HEXColor | ThemeVar;
2115
+ /**
2116
+ * 下拉 loading 的样式,仅支持 "dark" / "light"
2117
+ *
2118
+ * @desc iOS, Android
2119
+ *
2120
+ * @default "dark"
2121
+ */
2122
+ backgroundTextStyle?: 'dark' | 'light' | ThemeVar;
2123
+ /**
2124
+ * 顶部窗口的背景色
2125
+ *
2126
+ * @desc iOS
2127
+ *
2128
+ * @default "#FFFFFF"
2129
+ */
2130
+ backgroundColorTop?: HEXColor | ThemeVar;
2131
+ /**
2132
+ * 底部窗口的背景色
2133
+ *
2134
+ * @desc iOS
2135
+ *
2136
+ * @default "#FFFFFF"
2137
+ */
2138
+ backgroundColorBottom?: HEXColor | ThemeVar;
2139
+ /**
2140
+ * 是否开启全局的下拉刷新
2141
+ *
2142
+ * @desc iOS, Android
2143
+ *
2144
+ * @default false
2145
+ */
2146
+ enablePullDownRefresh?: boolean;
2147
+ /**
2148
+ * 页面上拉触底事件触发时距页面底部距离,单位为 px
2149
+ *
2150
+ * @desc iOS, Android
2151
+ *
2152
+ * @default 50
2153
+ */
2154
+ onReachBottomDistance?: number;
2155
+ /**
2156
+ * PCMode 模式下特定的窗口配置,支持的属性与通用 window 配置属性一致,仅当在 ext 内配置了 defaultPages.PCMode 时生效
2157
+ */
2158
+ PCMode?: Omit<MpLark, 'PCMode'>;
2159
+ [x: string]: any;
2160
+ }
2161
+ //#endregion
2162
+ //#region ../oiyo-config/src/pages/interfaces/globalStyle/mp-qq.d.ts
2163
+ /**
2164
+ * 设置编译到 mp-qq 平台的特定样式,配置项参考 <https://q.qq.com/wiki/develop/miniprogram/frame/dispose.html#window>
2165
+ *
2166
+ * 相应的类型是 MpQq
2167
+ *
2168
+ * @desc QQ 小程序
2169
+ */
2170
+ interface MpQq {
2171
+ /**
2172
+ * 导航栏背景颜色,支持 HEX 颜色
2173
+ *
2174
+ * @default "#000000"
2175
+ *
2176
+ * @format color
2177
+ */
2178
+ navigationBarBackgroundColor?: HEXColor | ThemeVar;
2179
+ /**
2180
+ * 导航栏标题、状态栏颜色
2181
+ *
2182
+ * @default "white"
2183
+ */
2184
+ navigationBarTextStyle?: 'black' | 'white' | ThemeVar;
2185
+ /**
2186
+ * 导航栏标题文字内容
2187
+ */
2188
+ navigationBarTitleText?: string;
2189
+ /**
2190
+ * 导航栏样式
2191
+ *
2192
+ * "default" 默认样式
2193
+ *
2194
+ * "custom" 自定义导航栏,只保留右上角胶囊按钮
2195
+ *
2196
+ * @default "default"
2197
+ */
2198
+ navigationStyle?: 'default' | 'custom';
2199
+ /**
2200
+ * 窗口的背景色,支持 HEX 颜色
2201
+ *
2202
+ * @default "#FFFFFF"
2203
+ */
2204
+ backgroundColor?: HEXColor | ThemeVar;
2205
+ /**
2206
+ * 下拉 loading 的样式,仅支持 "dark" / "light"
2207
+ *
2208
+ * @default "dark"
2209
+ */
2210
+ backgroundTextStyle?: 'dark' | 'light' | ThemeVar;
2211
+ /**
2212
+ * 顶部窗口的背景色,仅 iOS 支持
2213
+ *
2214
+ * @default "#FFFFFF"
2215
+ */
2216
+ backgroundColorTop?: HEXColor | ThemeVar;
2217
+ /**
2218
+ * 底部窗口的背景色,仅 iOS 支持
2219
+ *
2220
+ * @default "#FFFFFF"
2221
+ */
2222
+ backgroundColorBottom?: HEXColor | ThemeVar;
2223
+ /**
2224
+ * 是否开启全局的下拉刷新,详见 [Page.onPullDownRefresh](https://q.qq.com/wiki/develop/miniprogram/frame/logic/logic_register_page.html#onPullDownRefresh)
2225
+ *
2226
+ * @default false
2227
+ */
2228
+ enablePullDownRefresh?: boolean;
2229
+ /**
2230
+ * 屏幕旋转设置,支持 auto / portrait / landscape,详见 [响应显示区域变化](https://q.qq.com/wiki/develop/miniprogram/frame/view/view_section_change.html)
2231
+ *
2232
+ * "auto" 自动
2233
+ *
2234
+ * "portrait" 竖屏
2235
+ *
2236
+ * "landscape" 横屏
2237
+ *
2238
+ * @default "portrait"
2239
+ */
2240
+ pageOrientation?: 'auto' | 'portrait' | 'landscape';
2241
+ [x: string]: any;
2242
+ }
2243
+ //#endregion
2244
+ //#region ../oiyo-config/src/pages/interfaces/globalStyle/mp-toutiao.d.ts
2245
+ /**
2246
+ * 设置编译到 mp-toutiao 平台的特定样式,配置项参考 <https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/framework/general-configuration#window>
2247
+ *
2248
+ * 相应的类型是 MpToutiao
2249
+ *
2250
+ * @desc 抖音小程序
2251
+ */
2252
+ interface MpToutiao {
2253
+ /**
2254
+ * 导航栏背景颜色,支持 HEX 颜色
2255
+ *
2256
+ * @default "#000000"
2257
+ *
2258
+ * @format color
2259
+ */
2260
+ navigationBarBackgroundColor?: HEXColor | ThemeVar;
2261
+ /**
2262
+ * 导航栏标题颜色,同时影响标题颜色、右胶囊颜色、左返回箭头颜色
2263
+ *
2264
+ * @default "white"
2265
+ */
2266
+ navigationBarTextStyle?: 'black' | 'white' | ThemeVar;
2267
+ /**
2268
+ * 导航栏标题文字内容
2269
+ */
2270
+ navigationBarTitleText?: string;
2271
+ /**
2272
+ * 导航栏样式
2273
+ *
2274
+ * "default" 默认样式
2275
+ *
2276
+ * "custom" 自定义导航栏,只保留右上角胶囊按钮
2277
+ *
2278
+ * @default "default"
2279
+ */
2280
+ navigationStyle?: 'default' | 'custom';
2281
+ /**
2282
+ * 窗口的背景色,支持 HEX 颜色
2283
+ *
2284
+ * @default "#FFFFFF"
2285
+ */
2286
+ backgroundColor?: HEXColor | ThemeVar;
2287
+ /**
2288
+ * 下拉 loading 的样式,仅支持 "dark" / "light"
2289
+ *
2290
+ * @default "dark"
2291
+ */
2292
+ backgroundTextStyle?: 'dark' | 'light' | ThemeVar;
2293
+ /**
2294
+ * 顶部窗口的背景色,仅 iOS 支持
2295
+ *
2296
+ * @default 同 backgroundColor
2297
+ */
2298
+ backgroundColorTop?: HEXColor | ThemeVar;
2299
+ /**
2300
+ * 底部窗口的背景色,仅 iOS 支持
2301
+ *
2302
+ * @default 同 backgroundColor
2303
+ */
2304
+ backgroundColorBottom?: HEXColor | ThemeVar;
2305
+ /**
2306
+ * 是否开启全局的下拉刷新
2307
+ *
2308
+ * @default false
2309
+ */
2310
+ enablePullDownRefresh?: boolean;
2311
+ /**
2312
+ * 页面上拉触底事件触发时距页面底部距离,单位为 px
2313
+ *
2314
+ * @default 50
2315
+ */
2316
+ onReachBottomDistance?: number;
2317
+ /**
2318
+ * 仅在 navigationStyle 为 "default" 时生效,用来控制导航栏透明设置
2319
+ *
2320
+ * "always" 一直透明
2321
+ *
2322
+ * "auto" 滑动自适应
2323
+ *
2324
+ * "none" 不透明
2325
+ *
2326
+ * @default "none"
2327
+ */
2328
+ transparentTitle?: 'always' | 'auto' | 'none';
2329
+ /**
2330
+ * 框架骨架屏配置,仅支持配置 config 属性,优先级高于 app.json,详见 [小程序框架骨架屏](https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/guide/experience-optimization/list/skeleton)
2331
+ *
2332
+ * @desc 2.47.0
2333
+ */
2334
+ skeleton?: {
2335
+ /**
2336
+ * 包含超时移除及自动生成配置等
2337
+ */
2338
+ config?: {
2339
+ /**
2340
+ * 设置骨架屏超时移除时间,单位为 ms,为 0 时关闭超时移除
2341
+ *
2342
+ * @default 2000
2343
+ */
2344
+ timeout?: number;
2345
+ /**
2346
+ * 骨架屏显示时的动画
2347
+ *
2348
+ * @default 'spin'
2349
+ */
2350
+ loading?: 'spin' | 'chiaroscuro' | 'shine';
2351
+ /**
2352
+ * 骨架页面中图片块配置
2353
+ *
2354
+ * @default { shape: 'rect', color: '#efefef' }
2355
+ */
2356
+ image?: {
2357
+ /**
2358
+ * 骨架页面中图片块形状
2359
+ *
2360
+ * circle 圆形
2361
+ *
2362
+ * rect 矩形
2363
+ *
2364
+ * @default "rect"
2365
+ */
2366
+ shape?: 'circle' | 'rect';
2367
+ /**
2368
+ * 骨架页面中图片块颜色,支持 HEX 颜色
2369
+ *
2370
+ * @default "#efefef"
2371
+ *
2372
+ * @format color
2373
+ */
2374
+ color?: HEXColor;
2375
+ [x: string]: any;
2376
+ };
2377
+ /**
2378
+ * 骨架页面中被视为按钮块的配置
2379
+ *
2380
+ * @default { color: '#efefef }
2381
+ */
2382
+ button?: {
2383
+ /**
2384
+ * 骨架页面中被视为按钮块的颜色,支持 HEX 颜色
2385
+ *
2386
+ * @default "#efefef"
2387
+ *
2388
+ * @format color
2389
+ */
2390
+ color?: HEXColor;
2391
+ [x: string]: any;
2392
+ };
2393
+ /**
2394
+ * 骨架屏背景色,支持 HEX 颜色
2395
+ *
2396
+ * @default "#fff"
2397
+ *
2398
+ * @format color
2399
+ */
2400
+ backgroundColor?: HEXColor;
2401
+ /**
2402
+ * 默认为使用绝对定位占满全屏
2403
+ *
2404
+ * 当对自定义组件使用,作为局部加载的样式时,可设置为 "auto",高度随内容高度撑开
2405
+ *
2406
+ * @default "fullscreen"
2407
+ */
2408
+ mode?: 'fullscreen' | 'auto';
2409
+ /**
2410
+ * CSS单位,元素绝对定位都使用 "vw" 与 "vh"
2411
+ *
2412
+ * @default "vw"
2413
+ */
2414
+ cssUnit?: 'px' | 'rem' | 'vw' | 'vh' | 'vmin' | 'vmax';
2415
+ /**
2416
+ * 生成骨架屏页面中 css 值保留的小数点位数,默认为 4
2417
+ *
2418
+ * @default 4
2419
+ */
2420
+ decimal?: number;
2421
+ [x: string]: any;
2422
+ };
2423
+ /**
2424
+ * 页面路径同骨架屏文件的对应关系
2425
+ */
2426
+ page?: Record<string, string>;
2427
+ [x: string]: any;
2428
+ };
2429
+ [x: string]: any;
2430
+ }
2431
+ //#endregion
2432
+ //#region ../oiyo-config/src/pages/interfaces/globalStyle/mp-weixin.d.ts
2433
+ /**
2434
+ * 设置编译到 mp-weixin 平台的特定样式,配置项参考 [MP-WEIXIN](https://uniapp.dcloud.net.cn/collocation/pages#mp-weixin) 和 <https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/app.html#window>
2435
+ *
2436
+ * 相应的类型是 MpWeixin
2437
+ *
2438
+ * @desc 微信小程序
2439
+ */
2440
+ interface MpWeixin {
2441
+ /**
2442
+ * 导航栏背景颜色,支持 HEX 颜色
2443
+ *
2444
+ * @default "#000000"
2445
+ *
2446
+ * @format color
2447
+ */
2448
+ navigationBarBackgroundColor?: HEXColor | ThemeVar;
2449
+ /**
2450
+ * 导航栏标题、状态栏颜色
2451
+ *
2452
+ * @default "white"
2453
+ */
2454
+ navigationBarTextStyle?: 'black' | 'white' | ThemeVar;
2455
+ /**
2456
+ * 导航栏标题文字内容
2457
+ */
2458
+ navigationBarTitleText?: string;
2459
+ /**
2460
+ * 导航栏样式
2461
+ *
2462
+ * "default" 默认样式
2463
+ *
2464
+ * "custom" 自定义导航栏,只保留右上角胶囊按钮
2465
+ *
2466
+ * @desc iOS / Android 微信客户端 6.6.0,Windows 微信客户端不支持
2467
+ *
2468
+ * @default "default"
2469
+ */
2470
+ navigationStyle?: 'default' | 'custom';
2471
+ /**
2472
+ * 在非首页、非页面栈最底层页面或非 tabbar 内页面中的导航栏展示 home 键
2473
+ *
2474
+ * @desc 微信客户端 8.0.24
2475
+ *
2476
+ * @default false
2477
+ */
2478
+ homeButton?: boolean;
2479
+ /**
2480
+ * 窗口的背景色,支持 HEX 颜色
2481
+ *
2482
+ * @default "#FFFFFF"
2483
+ */
2484
+ backgroundColor?: HEXColor | ThemeVar;
2485
+ /**
2486
+ * 下拉 loading 的样式,仅支持 "dark" / "light"
2487
+ *
2488
+ * @default "dark"
2489
+ */
2490
+ backgroundTextStyle?: 'dark' | 'light' | ThemeVar;
2491
+ /**
2492
+ * 顶部窗口的背景色,仅 iOS 支持
2493
+ *
2494
+ * @desc 微信客户端 6.5.16
2495
+ *
2496
+ * @default "#FFFFFF"
2497
+ */
2498
+ backgroundColorTop?: HEXColor | ThemeVar;
2499
+ /**
2500
+ * 底部窗口的背景色,仅 iOS 支持
2501
+ *
2502
+ * @desc 微信客户端 6.5.16
2503
+ *
2504
+ * @default "#FFFFFF"
2505
+ */
2506
+ backgroundColorBottom?: HEXColor | ThemeVar;
2507
+ /**
2508
+ * 是否开启全局的下拉刷新,详见 [Page.onPullDownRefresh](https://developers.weixin.qq.com/miniprogram/dev/reference/api/Page.html#onpulldownrefresh)
2509
+ *
2510
+ * @default false
2511
+ */
2512
+ enablePullDownRefresh?: boolean;
2513
+ /**
2514
+ * 页面上拉触底事件触发时距页面底部距离,单位为 px,详见 [Page.onReachBottom](https://developers.weixin.qq.com/miniprogram/dev/reference/api/Page.html#onreachbottom)
2515
+ *
2516
+ * @default 50
2517
+ */
2518
+ onReachBottomDistance?: number;
2519
+ /**
2520
+ * 屏幕旋转设置,支持 auto / portrait / landscape,详见 [响应显示区域变化](https://developers.weixin.qq.com/miniprogram/dev/framework/view/resizable.html)
2521
+ *
2522
+ * "auto" 自动
2523
+ *
2524
+ * "portrait" 竖屏
2525
+ *
2526
+ * "landscape" 横屏
2527
+ *
2528
+ * @desc [2.4.0](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html) (auto) / [2.5.0](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html) (landscape)
2529
+ *
2530
+ * @default "portrait"
2531
+ */
2532
+ pageOrientation?: 'auto' | 'portrait' | 'landscape';
2533
+ /**
2534
+ * 重新启动策略配置
2535
+ *
2536
+ * "homePage" 如果从这个页面退出小程序,下次将从首页冷启动
2537
+ *
2538
+ * "homePageAndLatestPage" 如果从这个页面退出小程序,下次冷启动后立刻加载这个页面,页面的参数保持不变(不可用于 tab 页)
2539
+ *
2540
+ * @desc [2.8.0](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
2541
+ */
2542
+ restartStrategy?: 'homePage' | 'homePageAndLatestPage';
2543
+ /**
2544
+ * 页面初始渲染缓存配置,详见 [初始渲染缓存](https://developers.weixin.qq.com/miniprogram/dev/framework/view/initial-rendering-cache.html)
2545
+ *
2546
+ * @desc [2.11.1](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
2547
+ */
2548
+ initialRenderingCache?: 'static' | 'dynamic';
2549
+ /**
2550
+ * 切入系统后台时,隐藏页面内容,保护用户隐私
2551
+ *
2552
+ * @desc [2.15.0](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
2553
+ *
2554
+ * @default "none"
2555
+ */
2556
+ visualEffectInBackground?: 'hidden' | 'none';
2557
+ /**
2558
+ * 控制预加载下个页面的时机,详见 [控制预加载下个页面的时机](https://developers.weixin.qq.com/miniprogram/dev/framework/performance/tips/runtime_nav.html#_2-4-%E6%8E%A7%E5%88%B6%E9%A2%84%E5%8A%A0%E8%BD%BD%E4%B8%8B%E4%B8%AA%E9%A1%B5%E9%9D%A2%E7%9A%84%E6%97%B6%E6%9C%BA)
2559
+ *
2560
+ * "static" 在当前页面 onReady 触发 200ms 后触发预加载
2561
+ *
2562
+ * "auto" 渲染线程空闲时进行预加载,由基础库根据一段时间内 requestAnimationFrame 的触发频率算法判断
2563
+ *
2564
+ * "manual" 由开发者通过调用 [wx.preloadWebview](https://developers.weixin.qq.com/miniprogram/dev/api/base/performance/wx.preloadWebview.html) 触发,开发者可以在页面主要内容的 setData 结束后手动触发
2565
+ *
2566
+ * @desc [2.15.0](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
2567
+ *
2568
+ * @default "static"
2569
+ */
2570
+ handleWebviewPreload?: 'static' | 'manual' | 'auto';
2571
+ [x: string]: any;
2572
+ }
2573
+ //#endregion
2574
+ //#region ../oiyo-config/src/pages/interfaces/globalStyle/index.d.ts
2575
+ interface GlobalStyle {
2576
+ /**
2577
+ * 导航栏背景颜色(同状态栏背景色),支持 HEX 颜色
2578
+ *
2579
+ * @desc APP 与 H5 为 #F8F8F8,小程序平台请参考相应小程序文档
2580
+ *
2581
+ * @format color
2582
+ */
2583
+ 'navigationBarBackgroundColor'?: HEXColor | ThemeVar;
2584
+ /**
2585
+ * 导航栏标题颜色及状态栏前景颜色,仅支持 "black" / "white"
2586
+ *
2587
+ * @default "black"
2588
+ *
2589
+ * @desc 支付宝小程序不支持,请使用 my.setNavigationBar
2590
+ */
2591
+ 'navigationBarTextStyle'?: 'black' | 'white' | ThemeVar;
2592
+ /**
2593
+ * 导航栏标题文字内容
2594
+ */
2595
+ 'navigationBarTitleText'?: string;
2596
+ /**
2597
+ * 导航栏阴影
2598
+ */
2599
+ 'navigationBarShadow'?: {
2600
+ /**
2601
+ * 阴影颜色
2602
+ */
2603
+ colorType?: 'grey' | 'blue' | 'green' | 'orange' | 'red' | 'yellow';
2604
+ };
2605
+ /**
2606
+ * 导航栏样式,仅支持 "default" / "custom"
2607
+ *
2608
+ * "custom" 即取消默认的原生导航栏,详看 [使用注意](https://uniapp.dcloud.net.cn/collocation/pages#customnav)
2609
+ *
2610
+ * @default "default"
2611
+ *
2612
+ * @desc 微信小程序 7.0+、百度小程序、H5、App(2.0.3+)
2613
+ */
2614
+ 'navigationStyle'?: 'default' | 'custom';
2615
+ /**
2616
+ * 下拉显示出来的窗口的背景色,支持 HEX 颜色
2617
+ *
2618
+ * @default "#ffffff"
2619
+ *
2620
+ * @desc 微信小程序
2621
+ *
2622
+ * @format color
2623
+ */
2624
+ 'backgroundColor'?: HEXColor | ThemeVar;
2625
+ /**
2626
+ * 下拉 loading 的样式,仅支持 "dark" / "light"
2627
+ *
2628
+ * @default "dark"
2629
+ *
2630
+ * @desc 微信小程序
2631
+ */
2632
+ 'backgroundTextStyle'?: 'dark' | 'light' | ThemeVar;
2633
+ /**
2634
+ * 是否开启下拉刷新,详见 [页面生命周期](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
2635
+ *
2636
+ * @default false
2637
+ */
2638
+ 'enablePullDownRefresh'?: boolean;
2639
+ /**
2640
+ * 页面上拉触底事件触发时距页面底部距离,单位为 px,详见 [页面生命周期](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
2641
+ *
2642
+ * @default 50
2643
+ */
2644
+ 'onReachBottomDistance'?: number;
2645
+ /**
2646
+ * 顶部窗口的背景色(bounce回弹区域)
2647
+ *
2648
+ * @default "#ffffff"
2649
+ *
2650
+ * @desc iOS
2651
+ *
2652
+ * @format color
2653
+ */
2654
+ 'backgroundColorTop'?: HEXColor | ThemeVar;
2655
+ /**
2656
+ * 底部窗口的背景色(bounce回弹区域)
2657
+ *
2658
+ * @default "#ffffff"
2659
+ *
2660
+ * @desc iOS
2661
+ *
2662
+ * @format color
2663
+ */
2664
+ 'backgroundColorBottom'?: HEXColor | ThemeVar;
2665
+ /**
2666
+ * 导航栏图片地址(替换当前文字标题)
2667
+ *
2668
+ * 支付宝小程序内必须使用 https 图片链接地址
2669
+ *
2670
+ * @desc 支付宝小程序、H5、APP
2671
+ */
2672
+ 'titleImage'?: string;
2673
+ /**
2674
+ * 导航栏整体(前景、背景)透明设置,仅支持 "always" / "auto" / "none
2675
+ *
2676
+ * "always" 一直透明
2677
+ *
2678
+ * "auto" 滑动自适应
2679
+ *
2680
+ * "none" 不透明
2681
+ *
2682
+ * @default "none"
2683
+ *
2684
+ * @desc 支付宝小程序、H5、APP
2685
+ */
2686
+ 'transparentTitle'?: 'always' | 'auto' | 'none';
2687
+ /**
2688
+ * 导航栏点击穿透
2689
+ *
2690
+ * @default "NO"
2691
+ *
2692
+ * @desc 支付宝小程序、H5
2693
+ */
2694
+ 'titlePenetrate'?: 'YES' | 'NO';
2695
+ /**
2696
+ * 横屏配置,屏幕旋转设置,仅支持 "auto" / "portrait" / "landscape",详见 [响应显示区域变化](https://developers.weixin.qq.com/miniprogram/dev/framework/view/resizable.html)
2697
+ *
2698
+ * "auto" 自动
2699
+ *
2700
+ * "portrait" 竖屏
2701
+ *
2702
+ * "landscape" 横屏
2703
+ *
2704
+ * @default "portrait"
2705
+ *
2706
+ * @desc App 2.4.7+、微信小程序、QQ小程序
2707
+ */
2708
+ 'pageOrientation'?: string;
2709
+ /**
2710
+ * 窗口显示的动画效果,详见 [窗口动画](https://uniapp.dcloud.net.cn/api/router#animation)
2711
+ *
2712
+ * @default "pop-in"
2713
+ *
2714
+ * @desc App
2715
+ */
2716
+ 'animationType'?: AnimationType;
2717
+ /**
2718
+ * 窗口显示动画的持续时间,单位为 ms
2719
+ *
2720
+ * @default 300
2721
+ *
2722
+ * @desc App
2723
+ */
2724
+ 'animationDuration'?: number;
2725
+ /**
2726
+ * 设置编译到 App 平台的特定样式,配置项参考 [app-plus](https://uniapp.dcloud.net.cn/collocation/pages#app-plus)
2727
+ *
2728
+ * 相应的类型是 AppPlus
2729
+ *
2730
+ * @desc App
2731
+ */
2732
+ 'app-plus'?: AppPlus;
2733
+ /**
2734
+ * 设置编译到 H5 平台的特定样式,配置项参考 [H5](https://uniapp.dcloud.net.cn/collocation/pages#h5)
2735
+ *
2736
+ * 相应的类型是 H5
2737
+ *
2738
+ * @desc H5
2739
+ */
2740
+ 'h5'?: H5;
2741
+ /**
2742
+ * 设置编译到 mp-alipay 平台的特定样式,配置项参考 [MP-ALIPAY](https://uniapp.dcloud.net.cn/collocation/pages#mp-alipay) 和 <https://opendocs.alipay.com/mini/framework/app-json#window>
2743
+ *
2744
+ * 相应的类型是 MpAlipay
2745
+ *
2746
+ * @desc 支付宝小程序
2747
+ */
2748
+ 'mp-alipay'?: MpAlipay;
2749
+ /**
2750
+ * 设置编译到 mp-weixin 平台的特定样式,配置项参考 [MP-WEIXIN](https://uniapp.dcloud.net.cn/collocation/pages#mp-weixin) 和 <https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/app.html#window>
2751
+ *
2752
+ * 相应的类型是 MpWeixin
2753
+ *
2754
+ * @desc 微信小程序
2755
+ */
2756
+ 'mp-weixin'?: MpWeixin;
2757
+ /**
2758
+ * 设置编译到 mp-baidu 平台的特定样式,配置项参考 [MP-BAIDU](https://uniapp.dcloud.net.cn/collocation/pages.html#mp-baidu) 和 <https://smartprogram.baidu.com/docs/develop/framework/process/#window>
2759
+ *
2760
+ * 相应的类型是 MpBaidu
2761
+ *
2762
+ * @desc 百度小程序
2763
+ */
2764
+ 'mp-baidu'?: MpBaidu;
2765
+ /**
2766
+ * 设置编译到 mp-toutiao 平台的特定样式,配置项参考 <https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/framework/general-configuration#window>
2767
+ *
2768
+ * 相应的类型是 MpToutiao
2769
+ *
2770
+ * @desc 抖音小程序
2771
+ */
2772
+ 'mp-toutiao'?: MpToutiao;
2773
+ /**
2774
+ * 设置编译到 mp-lark 平台的特定样式
2775
+ *
2776
+ * 相应的类型是 MpLark
2777
+ *
2778
+ * @desc 飞书小程序
2779
+ */
2780
+ 'mp-lark'?: MpLark;
2781
+ /**
2782
+ * 设置编译到 mp-qq 平台的特定样式
2783
+ *
2784
+ * 相应的类型是 MpQq
2785
+ *
2786
+ * @desc QQ 小程序
2787
+ */
2788
+ 'mp-qq'?: MpQq;
2789
+ /**
2790
+ * 设置编译到 mp-kuaishou 平台的特定样式
2791
+ *
2792
+ * 相应的类型是 MpKuaishou
2793
+ *
2794
+ * @desc 快手小程序
2795
+ */
2796
+ 'mp-kuaishou'?: MpKuaishou;
2797
+ /**
2798
+ * 设置编译到 mp-jd 平台的特定样式
2799
+ *
2800
+ * 相应的类型是 MpJd
2801
+ *
2802
+ * @desc 京东小程序
2803
+ */
2804
+ 'mp-jd'?: MpJd;
2805
+ /**
2806
+ * 引用小程序组件,详见 [小程序组件](https://uniapp.dcloud.net.cn/tutorial/miniprogram-subject.html#%E5%B0%8F%E7%A8%8B%E5%BA%8F%E8%87%AA%E5%AE%9A%E4%B9%89%E7%BB%84%E4%BB%B6%E6%94%AF%E6%8C%81)
2807
+ *
2808
+ * @desc App、微信小程序、支付宝小程序、百度小程序、京东小程序
2809
+ */
2810
+ 'usingComponents'?: Record<string, string>;
2811
+ /**
2812
+ * 同层渲染,webrtc(实时音视频)无法正常时尝试配置为 "seperated" 强制关掉同层渲染
2813
+ *
2814
+ * @desc 微信小程序
2815
+ */
2816
+ 'renderingMode'?: string;
2817
+ /**
2818
+ * 当存在 leftWindow 时,默认是否显示 leftWindow,详见 [topWindow](https://uniapp.dcloud.net.cn/collocation/pages.html#topwindow)
2819
+ *
2820
+ * @default true
2821
+ *
2822
+ * @desc H5
2823
+ */
2824
+ 'leftWindow'?: boolean;
2825
+ /**
2826
+ * 当存在 topWindow 时,默认是否显示 topWindow,详见 [topWindow](https://uniapp.dcloud.net.cn/collocation/pages.html#topwindow)
2827
+ *
2828
+ * @default true
2829
+ *
2830
+ * @desc H5
2831
+ */
2832
+ 'topWindow'?: boolean;
2833
+ /**
2834
+ * 当存在 rightWindow 时,默认是否显示 rightWindow,详见 [topWindow](https://uniapp.dcloud.net.cn/collocation/pages.html#topwindow)
2835
+ *
2836
+ * @default true
2837
+ *
2838
+ * @desc H5
2839
+ */
2840
+ 'rightWindow'?: boolean;
2841
+ /**
2842
+ * rpx 计算所支持的最大设备宽度,单位为 px
2843
+ *
2844
+ * @default 960
2845
+ *
2846
+ * @desc App(vue2 且不含 nvue)、H5(2.8.12+)
2847
+ */
2848
+ 'rpxCalcMaxDeviceWidth'?: number;
2849
+ /**
2850
+ * rpx 计算使用的基准设备宽度,设备实际宽度超出 rpx 计算所支持的最大设备宽度时将按基准宽度计算,单位为 px
2851
+ *
2852
+ * @default 375
2853
+ *
2854
+ * @desc App(vue2 且不含 nvue)、H5(2.8.12+)
2855
+ */
2856
+ 'rpxCalcBaseDeviceWidth'?: number;
2857
+ /**
2858
+ * rpx 计算特殊处理的值,始终按实际的设备宽度计算,单位为 rpx
2859
+ *
2860
+ * @default 750
2861
+ *
2862
+ * @desc App(vue2 且不含 nvue)、H5(2.8.12+)
2863
+ */
2864
+ 'rpxCalcIncludeWidth'?: number;
2865
+ /**
2866
+ * 是否使用动态 rpx,屏幕大小变化会重新渲染 rpx
2867
+ *
2868
+ * @default false
2869
+ *
2870
+ * @desc App-nvue(vue3 固定值为 true) 3.2.13+
2871
+ */
2872
+ 'dynamicRpx'?: boolean;
2873
+ /**
2874
+ * 当浏览器可见区域宽度大于 maxWidth 时两侧留白,当小于等于 maxWidth 时页面铺满,单位为 px
2875
+ *
2876
+ * 不同页面支持配置不同的 maxWidth
2877
+ *
2878
+ * maxWidth = leftWindow(可选)+ page(页面主体)+ rightWindow(可选)
2879
+ *
2880
+ * 使用时,页面内 fixed 元素需要使用 --window-left 和 --window-right 来保证布局位置正确
2881
+ *
2882
+ * @desc H5(2.9.9+)
2883
+ */
2884
+ 'maxWidth'?: number;
2885
+ [x: string]: any;
2886
+ }
2887
+ //#endregion
2888
+ //#region ../oiyo-config/src/pages/interfaces/pages.d.ts
2889
+ interface Page {
2890
+ /**
2891
+ * 配置页面路径
2892
+ */
2893
+ path: string;
2894
+ /**
2895
+ * 配置页面窗口表现,配置项参考下方 pageStyle
2896
+ */
2897
+ style?: GlobalStyle;
2898
+ /**
2899
+ * 当前页面是否需要登录才可以访问,此配置优先级高于 uniIdRouter 下的 needLogin
2900
+ */
2901
+ needLogin?: boolean;
2902
+ /**
2903
+ * 自定义属性
2904
+ */
2905
+ [key: string]: any;
2906
+ }
2907
+ //#endregion
2908
+ //#region ../oiyo-config/src/pages/interfaces/subPackages.d.ts
2909
+ interface SubPackage {
2910
+ /**
2911
+ * 子包的根目录
2912
+ */
2913
+ root: string;
2914
+ /**
2915
+ * 子包由哪些页面组成,参数同 pages
2916
+ */
2917
+ pages: Page[];
2918
+ /**
2919
+ * 分包插件
2920
+ */
2921
+ plugins?: {
2922
+ [pluginName: string]: {
2923
+ version: string;
2924
+ provider: string;
2925
+ export?: string;
2926
+ [key: string]: any;
2927
+ };
2928
+ };
2929
+ }
2930
+ //#endregion
2931
+ //#region ../oiyo-config/src/pages/interfaces/tabBar.d.ts
2932
+ interface TabBarIconFont {
2933
+ /**
2934
+ * 字库 Unicode 码
2935
+ */
2936
+ text?: string;
2937
+ /**
2938
+ * 选中后字库 Unicode 码
2939
+ */
2940
+ selectedText?: string;
2941
+ /**
2942
+ * 字体图标字号,单位为 px
2943
+ */
2944
+ fontSize?: string;
2945
+ /**
2946
+ * 字体图标颜色
2947
+ */
2948
+ color?: HEXColor;
2949
+ /**
2950
+ * 字体图标选中颜色
2951
+ */
2952
+ selectedColor?: HEXColor;
2953
+ [x: string]: any;
2954
+ }
2955
+ interface TabBarItem {
2956
+ /**
2957
+ * 页面路径,必须在 pages 中先定义
2958
+ */
2959
+ pagePath: string;
2960
+ /**
2961
+ * tab 上按钮文字,在 App 和 H5 平台为非必填,例如中间可放一个没有文字的 + 号图标
2962
+ */
2963
+ text?: string;
2964
+ /**
2965
+ * 图片路径,icon 大小限制为 40 kb,建议尺寸为 81px * 81px
2966
+ *
2967
+ * 当 position 为 "top" 时,此参数无效
2968
+ *
2969
+ * 不支持网络图片,不支持字体图标
2970
+ */
2971
+ iconPath?: string | ThemeVar;
2972
+ /**
2973
+ * 选中时的图片路径,icon 大小限制为 40 kb,建议尺寸为 81px * 81px
2974
+ *
2975
+ * 当 position 为 "top" 时,此参数无效
2976
+ *
2977
+ * 不支持网络图片,不支持字体图标
2978
+ */
2979
+ selectedIconPath?: string | ThemeVar;
2980
+ /**
2981
+ * 该项是否显示,默认显示
2982
+ *
2983
+ * @desc App (3.2.10+)、H5 (3.2.10+)
2984
+ */
2985
+ visible?: boolean;
2986
+ /**
2987
+ * 字体图标,优先级高于 iconPath
2988
+ *
2989
+ * @desc App(3.4.4+)、H5 (3.5.3+)
2990
+ */
2991
+ iconfont?: TabBarIconFont;
2992
+ [x: string]: any;
2993
+ }
2994
+ interface TabBarMidButton {
2995
+ /**
2996
+ * 中间按钮的宽度,tabBar 其它项为减去此宽度后平分,默认值为与其它项平分宽度
2997
+ *
2998
+ * @default "80px"
2999
+ */
3000
+ width?: string;
3001
+ /**
3002
+ * 中间按钮的高度,可以大于 tabBar 高度,达到中间凸起的效果
3003
+ *
3004
+ * @default "50px"
3005
+ */
3006
+ height?: string;
3007
+ /**
3008
+ * 中间按钮的文字
3009
+ */
3010
+ text?: string;
3011
+ /**
3012
+ * 中间按钮的图片路径
3013
+ */
3014
+ iconPath?: string;
3015
+ /**
3016
+ * 图片宽度(高度等比例缩放)
3017
+ *
3018
+ * @default "24px"
3019
+ */
3020
+ iconWidth?: string;
3021
+ /**
3022
+ * 中间按钮的背景图片路径
3023
+ */
3024
+ backgroundImage?: string;
3025
+ /**
3026
+ * 字体图标,优先级高于 iconPath
3027
+ *
3028
+ * @desc App (3.4.4+)
3029
+ */
3030
+ iconfont?: TabBarIconFont;
3031
+ [x: string]: any;
3032
+ }
3033
+ interface TabBar {
3034
+ /**
3035
+ * tab 上的文字默认颜色
3036
+ *
3037
+ * @format color
3038
+ */
3039
+ color?: HEXColor | ThemeVar;
3040
+ /**
3041
+ * tab 上的文字选中时的颜色
3042
+ *
3043
+ * @format color
3044
+ */
3045
+ selectedColor?: HEXColor | ThemeVar;
3046
+ /**
3047
+ * tab 的背景色
3048
+ *
3049
+ * @format color
3050
+ */
3051
+ backgroundColor?: HEXColor | ThemeVar;
3052
+ /**
3053
+ * tabBar 上边框的颜色
3054
+ *
3055
+ * @default "black"
3056
+ *
3057
+ * @desc App 2.3.4+、H5 3.0.0+
3058
+ *
3059
+ * @format color
3060
+ */
3061
+ borderStyle?: 'black' | 'white' | HEXColor | ThemeVar;
3062
+ /**
3063
+ * iOS 高斯模糊效果,参考 [使用说明](https://ask.dcloud.net.cn/article/36617)
3064
+ *
3065
+ * @default "none"
3066
+ *
3067
+ * @desc App 2.4.0+、H5 3.0.0+(只有最新版浏览器才支持)
3068
+ */
3069
+ blurEffect?: 'dark' | 'extralight' | 'light' | 'none';
3070
+ /**
3071
+ * tab 列表,最少 2个,最多 5 个,app 端没有该限制
3072
+ *
3073
+ * @type {TabBarItem[]}
3074
+ */
3075
+ list?: TabBarItem[];
3076
+ /**
3077
+ * tab 位置
3078
+ *
3079
+ * @default "bottom"
3080
+ *
3081
+ * @desc "top" 仅微信小程序支持
3082
+ */
3083
+ position?: 'bottom' | 'top';
3084
+ /**
3085
+ * 文字默认大小
3086
+ *
3087
+ * @default "10px"
3088
+ *
3089
+ * @desc App 2.3.4+、H5 3.0.0+
3090
+ */
3091
+ fontSize?: string;
3092
+ /**
3093
+ * 图标默认宽度(高度等比例缩放)
3094
+ *
3095
+ * @default "24px"
3096
+ *
3097
+ * @desc App 2.3.4+、H5 3.0.0+
3098
+ */
3099
+ iconWidth?: string;
3100
+ /**
3101
+ * 图标和文字的间距
3102
+ *
3103
+ * @default "3px"
3104
+ *
3105
+ * @desc App 2.3.4+、H5 3.0.0+
3106
+ */
3107
+ spacing?: string;
3108
+ /**
3109
+ * tabBar 默认高度
3110
+ *
3111
+ * @default "50px"
3112
+ *
3113
+ * @desc App 2.3.4+、H5 3.0.0+
3114
+ */
3115
+ height?: string;
3116
+ /**
3117
+ * 中间按钮 仅在 list 项为偶数时有效
3118
+ *
3119
+ * @desc App 2.3.4+、H5 3.0.0+
3120
+ */
3121
+ midButton?: TabBarMidButton;
3122
+ /**
3123
+ * list 设置 iconfont 属性时,需要指定字体文件路径
3124
+ *
3125
+ * @desc App 3.4.4+、H5 3.5.3+
3126
+ */
3127
+ iconfontSrc?: string;
3128
+ /**
3129
+ * 设置背景图片,优先级高于 backgroundColor
3130
+ */
3131
+ backgroundImage?: string;
3132
+ /**
3133
+ * 设置标题栏的背景图平铺方式
3134
+ *
3135
+ * "repeat" 背景图片在垂直方向和水平方向平铺
3136
+ *
3137
+ * "repeat-x" 背景图片在水平方向平铺,垂直方向拉伸
3138
+ *
3139
+ * "repeat-y" 背景图片在垂直方向平铺,水平方向拉伸
3140
+ *
3141
+ * "no-repeat" 背景图片在垂直方向和水平方向都拉伸
3142
+ *
3143
+ * @default "no-repeat"
3144
+ */
3145
+ backgroundRepeat?: 'no-repeat' | 'repeat' | 'repeat-x' | 'repeat-y';
3146
+ /**
3147
+ * tabBar上红点颜色
3148
+ *
3149
+ * @format color
3150
+ */
3151
+ redDotColor?: string;
3152
+ [x: string]: any;
3153
+ }
3154
+ //#endregion
3155
+ //#region ../oiyo-config/src/pages/interfaces/theWindow.d.ts
3156
+ interface TheWindow {
3157
+ /**
3158
+ * 配置页面路径
3159
+ */
3160
+ path: string;
3161
+ /**
3162
+ * 配置页面窗口表现,配置项参考 [pageStyle](https://uniapp.dcloud.net.cn/collocation/pages#style)
3163
+ */
3164
+ style?: GlobalStyle;
3165
+ /**
3166
+ * 配置显示该窗口的规则,配置项参考 [matchMedia](https://uniapp.dcloud.net.cn/collocation/pages#matchmedia)
3167
+ */
3168
+ matchMedia?: {
3169
+ /**
3170
+ * 当设备可见区域宽度 >= minWidth 时,显示该 window
3171
+ *
3172
+ * @default 768
3173
+ */
3174
+ minWidth?: number;
3175
+ };
3176
+ }
3177
+ //#endregion
3178
+ //#region ../oiyo-config/src/pages/interfaces/uniIdRouter.d.ts
3179
+ interface UniIdRouter {
3180
+ /**
3181
+ * 登录页面路径
3182
+ *
3183
+ * @example "pages/index/index"
3184
+ */
3185
+ loginPage: string;
3186
+ /**
3187
+ * 需要登录才可以访问的页面列表,可以使用正则语法
3188
+ *
3189
+ * @example ["pages/detail/.*"]
3190
+ */
3191
+ needLogin: string[];
3192
+ /**
3193
+ * 是否是否自动解析云对象及 clientDB 的错误码,如果是客户端 token 不正确或 token 过期则自动跳转配置的登录页面
3194
+ *
3195
+ * @default true
3196
+ */
3197
+ resToLogin?: boolean;
3198
+ }
3199
+ //#endregion
3200
+ //#region ../oiyo-config/src/pages/interfaces/app.d.ts
3201
+ /**
3202
+ * 对 uni-app 进行全局配置,决定页面文件的路径、窗口样式、原生的导航栏、底部的原生 tabBar 等,类似微信小程序中 app.json 的页面管理部分
3203
+ *
3204
+ * 注意定位权限申请等原属于 app.json 的内容,需要在 manifest 中配置
3205
+ */
3206
+ interface PagesJson {
3207
+ /**
3208
+ * 设置默认页面的窗口表现
3209
+ */
3210
+ globalStyle?: GlobalStyle;
3211
+ /**
3212
+ * 设置页面路径及窗口表现
3213
+ */
3214
+ pages?: Page[];
3215
+ /**
3216
+ * 组件自动引入规则
3217
+ *
3218
+ * @desc 2.5.5+
3219
+ */
3220
+ easycom?: EasyCom;
3221
+ /**
3222
+ * 设置底部 tab 的表现
3223
+ */
3224
+ tabBar?: TabBar;
3225
+ /**
3226
+ * 启动模式配置,仅开发期间生效
3227
+ */
3228
+ condition?: Condition;
3229
+ /**
3230
+ * 分包加载配置
3231
+ *
3232
+ * @desc H5 不支持
3233
+ */
3234
+ subPackages?: SubPackage[];
3235
+ /**
3236
+ * 分包预下载规则
3237
+ *
3238
+ * @desc 微信小程序
3239
+ */
3240
+ preloadRule?: {
3241
+ /**
3242
+ * 页面路径
3243
+ */
3244
+ [path: string]: {
3245
+ /**
3246
+ * 进入页面后预下载分包的 root 或 name
3247
+ *
3248
+ * __APP__ 表示主包
3249
+ */
3250
+ packages: string[];
3251
+ /**
3252
+ * 在指定网络下预下载
3253
+ *
3254
+ * "all" 不限网络
3255
+ *
3256
+ * "wifi" 仅 wifi 下预下载
3257
+ *
3258
+ * @default "wifi"
3259
+ */
3260
+ network?: 'all' | 'wifi';
3261
+ };
3262
+ };
3263
+ /**
3264
+ * `Worker` 代码放置的目录
3265
+ *
3266
+ * @desc 微信小程序
3267
+ */
3268
+ workers?: string | {
3269
+ /**
3270
+ * `Worker` 代码放置的目录
3271
+ */
3272
+ path: string;
3273
+ /**
3274
+ * 是否打包为分包
3275
+ *
3276
+ * @desc 微信小程序基础库 v2.27.3
3277
+ *
3278
+ * @default false
3279
+ */
3280
+ isSubpackage?: boolean;
3281
+ };
3282
+ /**
3283
+ * 大屏左侧窗口
3284
+ *
3285
+ * @desc H5
3286
+ */
3287
+ leftWindow?: TheWindow;
3288
+ /**
3289
+ * 大屏顶部窗口
3290
+ *
3291
+ * @desc H5
3292
+ */
3293
+ topWindow?: TheWindow;
3294
+ /**
3295
+ * 大屏右侧窗口
3296
+ *
3297
+ * @desc H5
3298
+ */
3299
+ rightWindow?: TheWindow;
3300
+ /**
3301
+ * 自动跳转相关配置,新增于 HBuilderX 3.5.0
3302
+ *
3303
+ * @desc uni-app 3.5.0+、uni-app-x 3.99+
3304
+ */
3305
+ uniIdRouter?: UniIdRouter;
3306
+ /**
3307
+ * 默认启动首页,新增于 HBuilderX 3.7.0
3308
+ *
3309
+ * @desc 微信小程序、支付宝小程序
3310
+ */
3311
+ entryPagePath?: string;
3312
+ [x: string]: any;
3313
+ }
3314
+ //#endregion
3315
+ //#region src/oiyo/middleware/types/interface.d.ts
3316
+ type RouteMiddleware = (to: RouteLocation, from: RouteLocation) => RouteMiddlewareResult | Promise<RouteMiddlewareResult>;
3317
+ interface RouteLocation {
3318
+ /** 规范化后的完整路径,保留原始查询字符串。 */
3319
+ fullPath: string;
3320
+ /** pages.json 中该页面完整的 meta 对象。 */
3321
+ meta: PageMeta;
3322
+ /** 带前导斜杠、不含查询字符串的规范化页面路径。 */
3323
+ path: string;
3324
+ /** 从导航 URL 中解析并解码后的查询参数。 */
3325
+ query: Record<string, string>;
3326
+ }
3327
+ type RouteMiddlewareResult = void | boolean | string | RouteMiddlewareRedirect | RouteMiddlewareAbort;
3328
+ type RouteMiddlewareRedirectType = 'navigateTo' | 'redirectTo' | 'reLaunch' | 'switchTab';
3329
+ /**
3330
+ * 中间件可返回的重定向描述。
3331
+ *
3332
+ * 可通过 `type` 可显式指定 uni 导航方式。
3333
+ * 未指定 type 时,运行时会根据目标是否为 TabBar 页面以及 replace 自动选择 switchTab、redirectTo 或 navigateTo。
3334
+ */
3335
+ interface RouteMiddlewareRedirect {
3336
+ /** 内部判别字段,请通过 navigateTo() 创建。 */
3337
+ readonly __scope: 'redirect';
3338
+ type?: RouteMiddlewareRedirectType;
3339
+ path?: string;
3340
+ query?: Record<string, unknown>;
3341
+ replace?: boolean;
3342
+ }
3343
+ interface RouteMiddlewareRedirectOptions extends Omit<RouteMiddlewareRedirect, '__scope'> {}
3344
+ interface RouteMiddlewareAbort {
3345
+ /** 内部判别字段,请通过 abortNavigation() 创建。 */
3346
+ readonly __scope: 'abort';
3347
+ /** 可选的中止原因,会透传给原导航的 fail/complete 回调。 */
3348
+ readonly error?: unknown;
3349
+ }
3350
+ //#endregion
3351
+ //#region src/oiyo/middleware/types/runtime.d.ts
3352
+ interface RuntimeMiddlewareModule {
3353
+ /** 是否为全局中间件,对应文件名中的 `.global` 后缀。 */
3354
+ isGlobal: boolean;
3355
+ /** `import * as` 得到的模块命名空间。 */
3356
+ module: {
3357
+ default?: unknown;
3358
+ } | undefined;
3359
+ /** 中间件名称,即去掉扩展名与 `.global` 后的使用名称。 */
3360
+ useName: string;
3361
+ /** 生成代码中使用的 import id,仅用于诊断信息。 */
3362
+ importId: string;
3363
+ }
3364
+ interface RuntimeMiddlewareEntry {
3365
+ name: string;
3366
+ isGlobal: boolean;
3367
+ handler: RouteMiddleware;
3368
+ }
3369
+ //#endregion
3370
+ //#region src/oiyo/middleware/types/options.d.ts
3371
+ interface OiyoMiddlewareOptions {
3372
+ config: PagesJson;
3373
+ entries: RuntimeMiddlewareEntry[];
3374
+ }
3375
+ //#endregion
3376
+ //#region src/oiyo/middleware/create.d.ts
3377
+ declare function createOiyoMiddleware(options: OiyoMiddlewareOptions): Plugin;
3378
+ declare function toMiddlewareEntries(modules: RuntimeMiddlewareModule[]): RuntimeMiddlewareEntry[];
3379
+ //#endregion
3380
+ //#region src/oiyo/middleware/define.d.ts
3381
+ /**
3382
+ * 定义一个路由中间件。
3383
+ */
3384
+ declare function defineRouteMiddleware(middleware: RouteMiddleware): RouteMiddleware;
3385
+ /**
3386
+ * 跳转到指定页面
3387
+ *
3388
+ * @description
3389
+ * - 当前中间件返回本函数后,将采用以下策略导航到指定目标地址。
3390
+ * - 导航策略:TabBar 页面使用 `uni.switchTab`、普通页面默认使用 `uni.navigateTo`、当设置 `replace` 时使用 `uni.redirectTo`。
3391
+ *
3392
+ * @param to 目标页面 `path` 或者 `{ path, query }`。
3393
+ * @param options 重定向选项;`replace` 为 true 时替换当前页面记录。
3394
+ * @returns 供中间件识别的跳转结果,必须由 `return` 才会生效。
3395
+ */
3396
+ declare function goTo(to: string | RouteMiddlewareRedirectOptions, options?: Omit<RouteMiddlewareRedirectOptions, 'path'>): RouteMiddlewareRedirect;
3397
+ /**
3398
+ * 中止当前导航
3399
+ *
3400
+ * @description
3401
+ * - 在中间件中返回本函数的结果后,会停止执行余下中间件,同时中止前往目标地。
3402
+ * - 可选的 `error` 会透传给本次 uni 导航调用的 `fail` 与 `complete` 回调,便于调用方
3403
+ * 区分“被路由策略主动拦截”和普通运行时错误。
3404
+ *
3405
+ * @param error 可选的中止原因,建议传入 Error,方便上层记录和诊断。
3406
+ * @returns 供中间件识别的中止结果,必须由 `return` 才会生效。
3407
+ */
3408
+ declare function abortNavigation(error?: unknown): RouteMiddlewareAbort;
3409
+ //#endregion
3410
+ export { createHttpAborter as S, HttpDownloadResponse as _, toMiddlewareEntries as a, HttpUploadResponse as b, isHttpError as c, HttpCommonOptions as d, HttpConfig as f, HttpUploadOptions as g, HttpRequestOptions as h, createOiyoMiddleware as i, createHttp as l, HttpOptions as m, defineRouteMiddleware as n, RouteMiddleware as o, HttpDownloadOptions as p, goTo as r, HttpError as s, abortNavigation as t, http as u, HttpRequestResponse as v, ResponseBodyType as x, HttpResponse as y };