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