@uni-helper/uni-pages-types 0.5.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/dist/index.d.mts +271 -39
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -7,11 +7,13 @@
|
|
|
7
7
|
</p>
|
|
8
8
|
<p style="text-align: center">
|
|
9
9
|
<a href="https://github.com/kejunmao"><img src="https://img.shields.io/badge/Author-KeJun-blue?style=for-the-badge" alt="Author"></a>
|
|
10
|
-
<a href="https://github.com/ModyQyW"><img src="https://img.shields.io/badge/Maintainer-ModyQyW-blue?style=for-the-badge" alt="
|
|
10
|
+
<a href="https://github.com/ModyQyW"><img src="https://img.shields.io/badge/Maintainer-ModyQyW-blue?style=for-the-badge" alt="Maintainer"></a>
|
|
11
11
|
</p>
|
|
12
12
|
|
|
13
13
|
为 `uni-app` 的 `pages.json` 提供 TypeScript 类型。
|
|
14
14
|
|
|
15
|
+
完整文档见 [uni-helper.js.org](https://uni-helper.js.org/vite-plugin-uni-pages),另有 [Netlify](https://vite-plugin-uni-pages.netlify.app) 和 [Cloudflare Pages](https://vite-plugin-uni-pages.pages.dev) 镜像。
|
|
16
|
+
|
|
15
17
|
不想看文档?直接问 AI 🤖 <a href="https://deepwiki.com/uni-helper/vite-plugin-uni-pages"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
|
|
16
18
|
|
|
17
19
|
> **请考虑持续[赞助](https://github.com/ModyQyW/sponsors)以维持该项目的持续健康发展,非常感谢!🙏**
|
|
@@ -30,6 +32,7 @@ import { AnimationType, Condition, EasyCom } from '@uni-helper/uni-pages-types'
|
|
|
30
32
|
|
|
31
33
|
## 关联项目
|
|
32
34
|
|
|
35
|
+
- [skiyee/oiyo](https://oiyo.js.org) - uni-app 增强型工程框架
|
|
33
36
|
- [@uni-helper/vite-plugin-uni-pages](https://github.com/uni-helper/vite-plugin-uni-pages/tree/main/packages/core) - 使用 TypeScript 编写 uni-app 的 pages.json,支持约定式路由
|
|
34
37
|
- [@uni-helper/pages-json-schema](https://github.com/uni-helper/vite-plugin-uni-pages/tree/main/packages/schema) - 为 uni-app 的 pages.json 提供 schema
|
|
35
38
|
- [@uni-helper/uni-pages-types](https://github.com/uni-helper/vite-plugin-uni-pages/tree/main/packages/types) - 为 uni-app 的 pages.json 提供 TypeScript 类型
|
package/dist/index.d.mts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
//#region src/common.d.ts
|
|
2
|
-
type RGBColor = `rgb(${number}, ${number}, ${number})`;
|
|
3
|
-
type RGBAColor = `rgba(${number}, ${number}, ${number}, ${number})`;
|
|
4
|
-
type HEXColor = `#${string}`;
|
|
5
|
-
type Color = RGBColor | RGBAColor | HEXColor;
|
|
6
|
-
type PxSize = `${number}px`;
|
|
7
|
-
type RpxSize = `${number}rpx`;
|
|
8
|
-
type PercentageSize = `${number}%`;
|
|
9
|
-
type ThemeVar = `@${string}`;
|
|
2
|
+
export type RGBColor = `rgb(${number}, ${number}, ${number})`;
|
|
3
|
+
export type RGBAColor = `rgba(${number}, ${number}, ${number}, ${number})`;
|
|
4
|
+
export type HEXColor = `#${string}`;
|
|
5
|
+
export type Color = RGBColor | RGBAColor | HEXColor;
|
|
6
|
+
export type PxSize = `${number}px`;
|
|
7
|
+
export type RpxSize = `${number}rpx`;
|
|
8
|
+
export type PercentageSize = `${number}%`;
|
|
9
|
+
export type ThemeVar = `@${string}`;
|
|
10
10
|
/**
|
|
11
11
|
* 窗口动画,详见 [窗口动画](https://uniapp.dcloud.net.cn/api/router.html#animation)
|
|
12
12
|
*/
|
|
13
|
-
type AnimationType = 'slide-in-right' | 'slide-in-left' | 'slide-in-top' | 'slide-in-bottom' | 'pop-in' | 'fade-in' | 'zoom-out' | 'zoom-fade-out' | 'none';
|
|
14
|
-
interface TitleNViewButton {
|
|
13
|
+
export type AnimationType = 'slide-in-right' | 'slide-in-left' | 'slide-in-top' | 'slide-in-bottom' | 'pop-in' | 'fade-in' | 'zoom-out' | 'zoom-fade-out' | 'none';
|
|
14
|
+
export interface TitleNViewButton {
|
|
15
15
|
/**
|
|
16
16
|
* 自定义按钮样式,详见 [自定义按钮样式](https://uniapp.dcloud.net.cn/collocation/pages#app-titlenview-buttons-type)
|
|
17
17
|
*
|
|
@@ -50,11 +50,19 @@ interface TitleNViewButton {
|
|
|
50
50
|
* @format color
|
|
51
51
|
*/
|
|
52
52
|
background?: HEXColor | RGBAColor;
|
|
53
|
+
/**
|
|
54
|
+
* 自定义按钮上显示的角标文本,最多显示 3 个字符,超过则显示为 ...
|
|
55
|
+
*
|
|
56
|
+
* @desc H5
|
|
57
|
+
*/
|
|
58
|
+
badgeText?: string;
|
|
53
59
|
/**
|
|
54
60
|
* 自定义按钮按下状态文字颜色,支持 HEX 和 RGBA 颜色
|
|
55
61
|
*
|
|
56
62
|
* @default color 属性值自动调整透明度为 0.3
|
|
57
63
|
*
|
|
64
|
+
* @desc H5 暂不支持
|
|
65
|
+
*
|
|
58
66
|
* @format color
|
|
59
67
|
*/
|
|
60
68
|
colorPressed?: HEXColor | RGBAColor;
|
|
@@ -108,7 +116,7 @@ interface TitleNViewButton {
|
|
|
108
116
|
/**
|
|
109
117
|
* @deprecated 请使用 ConditionListItem
|
|
110
118
|
*/
|
|
111
|
-
interface ConditionItem {
|
|
119
|
+
export interface ConditionItem {
|
|
112
120
|
/**
|
|
113
121
|
* 启动模式名称
|
|
114
122
|
*/
|
|
@@ -122,7 +130,7 @@ interface ConditionItem {
|
|
|
122
130
|
*/
|
|
123
131
|
query?: string;
|
|
124
132
|
}
|
|
125
|
-
interface ConditionListItem {
|
|
133
|
+
export interface ConditionListItem {
|
|
126
134
|
/**
|
|
127
135
|
* 启动模式名称
|
|
128
136
|
*/
|
|
@@ -137,11 +145,11 @@ interface ConditionListItem {
|
|
|
137
145
|
query?: string;
|
|
138
146
|
[x: string]: any;
|
|
139
147
|
}
|
|
140
|
-
type ConditionList = ConditionListItem[];
|
|
148
|
+
export type ConditionList = ConditionListItem[];
|
|
141
149
|
/**
|
|
142
150
|
* 启动模式配置
|
|
143
151
|
*/
|
|
144
|
-
interface Condition {
|
|
152
|
+
export interface Condition {
|
|
145
153
|
/**
|
|
146
154
|
* 当前激活的模式,list 节点的索引值
|
|
147
155
|
*/
|
|
@@ -159,7 +167,7 @@ interface Condition {
|
|
|
159
167
|
*
|
|
160
168
|
* @desc 2.5.5+
|
|
161
169
|
*/
|
|
162
|
-
interface EasyCom {
|
|
170
|
+
export interface EasyCom {
|
|
163
171
|
/**
|
|
164
172
|
* 是否开启自动扫描,开启后将会自动扫描符合 `components/组件名称/组件名称.vue` 目录结构的组件
|
|
165
173
|
*
|
|
@@ -819,6 +827,8 @@ interface AppPlus {
|
|
|
819
827
|
* "normal" 正常
|
|
820
828
|
*
|
|
821
829
|
* "bold" 粗体
|
|
830
|
+
*
|
|
831
|
+
* @default "normal"
|
|
822
832
|
*/
|
|
823
833
|
titleWeight?: 'normal' | 'bold';
|
|
824
834
|
[x: string]: any;
|
|
@@ -1348,6 +1358,10 @@ interface H5 {
|
|
|
1348
1358
|
* h5 平台下拉刷新动画,只有 circle 类型
|
|
1349
1359
|
*/
|
|
1350
1360
|
pullToRefresh?: {
|
|
1361
|
+
/**
|
|
1362
|
+
* 是否开启窗口的下拉刷新功能
|
|
1363
|
+
*/
|
|
1364
|
+
support?: boolean;
|
|
1351
1365
|
/**
|
|
1352
1366
|
* 下拉刷新控件颜色,支持 HEX 颜色
|
|
1353
1367
|
*
|
|
@@ -1356,12 +1370,54 @@ interface H5 {
|
|
|
1356
1370
|
* @format color
|
|
1357
1371
|
*/
|
|
1358
1372
|
color?: HEXColor;
|
|
1373
|
+
/**
|
|
1374
|
+
* 下拉刷新控件样式,h5 平台只有 "circle" 类型
|
|
1375
|
+
*/
|
|
1376
|
+
style?: 'default' | 'circle';
|
|
1377
|
+
/**
|
|
1378
|
+
* 下拉刷新控件进入刷新状态的拉拽高度,支持单位为 px 的逻辑像素值或百分比
|
|
1379
|
+
*/
|
|
1380
|
+
height?: PxSize | PercentageSize;
|
|
1381
|
+
/**
|
|
1382
|
+
* 可下拉拖拽的范围,支持单位为 px 的逻辑像素值或百分比
|
|
1383
|
+
*/
|
|
1384
|
+
range?: PxSize | PercentageSize;
|
|
1359
1385
|
/**
|
|
1360
1386
|
* 下拉刷新控件的起始位置,支持单位为 px 的逻辑像素值或百分比
|
|
1361
1387
|
*
|
|
1362
1388
|
* @default "0px"
|
|
1363
1389
|
*/
|
|
1364
1390
|
offset?: PxSize | PercentageSize;
|
|
1391
|
+
/**
|
|
1392
|
+
* 下拉可刷新状态时下拉刷新控件显示的内容,仅 style 为 "default" 时有效
|
|
1393
|
+
*/
|
|
1394
|
+
contentdown?: {
|
|
1395
|
+
/**
|
|
1396
|
+
* 下拉刷新控件上显示的标题内容
|
|
1397
|
+
*/
|
|
1398
|
+
caption?: string;
|
|
1399
|
+
[x: string]: any;
|
|
1400
|
+
};
|
|
1401
|
+
/**
|
|
1402
|
+
* 释放可刷新状态时下拉刷新控件显示的内容,仅 style 为 "default" 时有效
|
|
1403
|
+
*/
|
|
1404
|
+
contentover?: {
|
|
1405
|
+
/**
|
|
1406
|
+
* 下拉刷新控件上显示的标题内容
|
|
1407
|
+
*/
|
|
1408
|
+
caption?: string;
|
|
1409
|
+
[x: string]: any;
|
|
1410
|
+
};
|
|
1411
|
+
/**
|
|
1412
|
+
* 正在刷新状态时下拉刷新控件显示的内容,仅 style 为 "default" 时有效
|
|
1413
|
+
*/
|
|
1414
|
+
contentrefresh?: {
|
|
1415
|
+
/**
|
|
1416
|
+
* 下拉刷新控件上显示的标题内容
|
|
1417
|
+
*/
|
|
1418
|
+
caption?: string;
|
|
1419
|
+
[x: string]: any;
|
|
1420
|
+
};
|
|
1365
1421
|
[x: string]: any;
|
|
1366
1422
|
};
|
|
1367
1423
|
[x: string]: any;
|
|
@@ -1411,7 +1467,7 @@ interface MpAlipay {
|
|
|
1411
1467
|
/**
|
|
1412
1468
|
* 仅支持 iOS,是否支持手势返回
|
|
1413
1469
|
*
|
|
1414
|
-
* @default "
|
|
1470
|
+
* @default "NO"
|
|
1415
1471
|
*/
|
|
1416
1472
|
gestureBack?: 'YES' | 'NO';
|
|
1417
1473
|
/**
|
|
@@ -2355,6 +2411,8 @@ interface MpWeixin {
|
|
|
2355
2411
|
*
|
|
2356
2412
|
* "homePageAndLatestPage" 如果从这个页面退出小程序,下次冷启动后立刻加载这个页面,页面的参数保持不变(不可用于 tab 页)
|
|
2357
2413
|
*
|
|
2414
|
+
* @default "homePage"
|
|
2415
|
+
*
|
|
2358
2416
|
* @desc [2.8.0](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
|
|
2359
2417
|
*/
|
|
2360
2418
|
restartStrategy?: 'homePage' | 'homePageAndLatestPage';
|
|
@@ -2386,6 +2444,14 @@ interface MpWeixin {
|
|
|
2386
2444
|
* @default "static"
|
|
2387
2445
|
*/
|
|
2388
2446
|
handleWebviewPreload?: 'static' | 'manual' | 'auto';
|
|
2447
|
+
/**
|
|
2448
|
+
* 是否启用 ucss 样式覆盖
|
|
2449
|
+
*
|
|
2450
|
+
* @default true
|
|
2451
|
+
*
|
|
2452
|
+
* @desc 小程序
|
|
2453
|
+
*/
|
|
2454
|
+
enableUcssReset?: boolean;
|
|
2389
2455
|
[x: string]: any;
|
|
2390
2456
|
}
|
|
2391
2457
|
//#endregion
|
|
@@ -2588,6 +2654,80 @@ interface BaseStyle {
|
|
|
2588
2654
|
* @desc 支付宝小程序
|
|
2589
2655
|
*/
|
|
2590
2656
|
'allowsBounceVertical'?: 'YES' | 'NO';
|
|
2657
|
+
/**
|
|
2658
|
+
* 是否隐藏系统顶部状态栏
|
|
2659
|
+
*
|
|
2660
|
+
* @default false
|
|
2661
|
+
*
|
|
2662
|
+
* @desc uni-app x App
|
|
2663
|
+
*/
|
|
2664
|
+
'hideStatusBar'?: boolean;
|
|
2665
|
+
/**
|
|
2666
|
+
* 点击系统状态栏滚动条是否返回顶部
|
|
2667
|
+
*
|
|
2668
|
+
* @default false
|
|
2669
|
+
*
|
|
2670
|
+
* @desc uni-app x App
|
|
2671
|
+
*/
|
|
2672
|
+
'enableBackToTop'?: boolean;
|
|
2673
|
+
/**
|
|
2674
|
+
* 是否开启回弹效果,优先级高于 allowsBounceVertical
|
|
2675
|
+
*
|
|
2676
|
+
* @default false
|
|
2677
|
+
*
|
|
2678
|
+
* @desc uni-app x App
|
|
2679
|
+
*/
|
|
2680
|
+
'bounces'?: boolean;
|
|
2681
|
+
/**
|
|
2682
|
+
* Android 平台是否开启弹簧回弹效果
|
|
2683
|
+
*
|
|
2684
|
+
* @default false
|
|
2685
|
+
*
|
|
2686
|
+
* @desc uni-app x App-Android
|
|
2687
|
+
*/
|
|
2688
|
+
'androidOverscroll'?: boolean;
|
|
2689
|
+
/**
|
|
2690
|
+
* Android 平台下拉刷新前景颜色,支持 HEX 颜色
|
|
2691
|
+
*
|
|
2692
|
+
* @desc uni-app x App-Android
|
|
2693
|
+
*
|
|
2694
|
+
* @format color
|
|
2695
|
+
*/
|
|
2696
|
+
'androidRefresherColor'?: HEXColor | ThemeVar;
|
|
2697
|
+
/**
|
|
2698
|
+
* 是否隐藏系统底部导航栏
|
|
2699
|
+
*
|
|
2700
|
+
* 与 hideStatusBar 同时开启可实现页面全屏
|
|
2701
|
+
*
|
|
2702
|
+
* @default false
|
|
2703
|
+
*
|
|
2704
|
+
* @desc uni-app x App
|
|
2705
|
+
*/
|
|
2706
|
+
'hideBottomNavigationIndicator'?: boolean;
|
|
2707
|
+
/**
|
|
2708
|
+
* 页面内容是否可以渲染到虚拟按键区域
|
|
2709
|
+
*
|
|
2710
|
+
* @default false
|
|
2711
|
+
*
|
|
2712
|
+
* @desc uni-app x App-Android 4.41+
|
|
2713
|
+
*/
|
|
2714
|
+
'androidThreeButtonNavigationTranslucent'?: boolean;
|
|
2715
|
+
/**
|
|
2716
|
+
* 虚拟按键区域背景色,支持 HEX 颜色
|
|
2717
|
+
*
|
|
2718
|
+
* @desc uni-app x App-Android
|
|
2719
|
+
*
|
|
2720
|
+
* @format color
|
|
2721
|
+
*/
|
|
2722
|
+
'androidThreeButtonNavigationBackgroundColor'?: HEXColor | ThemeVar;
|
|
2723
|
+
/**
|
|
2724
|
+
* 虚拟按键区域前景色
|
|
2725
|
+
*
|
|
2726
|
+
* @desc uni-app x App-Android
|
|
2727
|
+
*
|
|
2728
|
+
* @format color
|
|
2729
|
+
*/
|
|
2730
|
+
'androidThreeButtonNavigationStyle'?: HEXColor | ThemeVar;
|
|
2591
2731
|
/**
|
|
2592
2732
|
* 设置编译到 App 平台的特定样式,配置项参考 [app-plus](https://uniapp.dcloud.net.cn/collocation/pages#app-plus)
|
|
2593
2733
|
*
|
|
@@ -2734,11 +2874,19 @@ interface BaseStyle {
|
|
|
2734
2874
|
* @desc H5(2.9.9+)
|
|
2735
2875
|
*/
|
|
2736
2876
|
'maxWidth'?: number;
|
|
2877
|
+
/**
|
|
2878
|
+
* 是否启用 ucss 样式覆盖
|
|
2879
|
+
*
|
|
2880
|
+
* @default true
|
|
2881
|
+
*
|
|
2882
|
+
* @desc 小程序
|
|
2883
|
+
*/
|
|
2884
|
+
'enableUcssReset'?: boolean;
|
|
2737
2885
|
}
|
|
2738
2886
|
/**
|
|
2739
2887
|
* globalStyle 节点的类型,用于设置应用的状态栏、导航条、标题、窗口背景色等
|
|
2740
2888
|
*/
|
|
2741
|
-
interface GlobalStyle extends BaseStyle {
|
|
2889
|
+
export interface GlobalStyle extends BaseStyle {
|
|
2742
2890
|
/**
|
|
2743
2891
|
* 页面容器背景色,支持 HEX 颜色
|
|
2744
2892
|
*
|
|
@@ -2820,7 +2968,33 @@ interface GlobalStyle extends BaseStyle {
|
|
|
2820
2968
|
*
|
|
2821
2969
|
* 页面中配置项会覆盖 globalStyle 中相同的配置项
|
|
2822
2970
|
*/
|
|
2823
|
-
interface PageStyle extends BaseStyle {
|
|
2971
|
+
export interface PageStyle extends BaseStyle {
|
|
2972
|
+
/**
|
|
2973
|
+
* 页面容器背景色,支持 HEX 颜色
|
|
2974
|
+
*
|
|
2975
|
+
* 会覆盖窗口背景色 backgroundColor,backgroundColor 仅在页面设置下拉刷新时才可能看到
|
|
2976
|
+
*
|
|
2977
|
+
* @default "#ffffff"
|
|
2978
|
+
*
|
|
2979
|
+
* @desc uni-app x
|
|
2980
|
+
*
|
|
2981
|
+
* @format color
|
|
2982
|
+
*/
|
|
2983
|
+
backgroundColorContent?: HEXColor | ThemeVar;
|
|
2984
|
+
/**
|
|
2985
|
+
* 页面旋转设置
|
|
2986
|
+
*
|
|
2987
|
+
* "auto" 设备自适应
|
|
2988
|
+
*
|
|
2989
|
+
* "portrait" 竖向
|
|
2990
|
+
*
|
|
2991
|
+
* "landscape" 横向
|
|
2992
|
+
*
|
|
2993
|
+
* @default "portrait"
|
|
2994
|
+
*
|
|
2995
|
+
* @desc uni-app x Android 4.13+、uni-app x iOS 4.25+,Web 由手机浏览器控制
|
|
2996
|
+
*/
|
|
2997
|
+
pageOrientation?: 'auto' | 'portrait' | 'landscape';
|
|
2824
2998
|
/**
|
|
2825
2999
|
* 导航栏阴影,配置参考 [导航栏阴影](https://uniapp.dcloud.net.cn/collocation/pages#navigationbarshadow)
|
|
2826
3000
|
*
|
|
@@ -2852,6 +3026,16 @@ interface PageStyle extends BaseStyle {
|
|
|
2852
3026
|
* @desc App-iOS(3.4.0+)
|
|
2853
3027
|
*/
|
|
2854
3028
|
disableSwipeBack?: boolean;
|
|
3029
|
+
/**
|
|
3030
|
+
* 是否将侧滑返回手势转为页面 onBackPress 事件
|
|
3031
|
+
*
|
|
3032
|
+
* 仅在 disableSwipeBack 为 false 时生效
|
|
3033
|
+
*
|
|
3034
|
+
* @default false
|
|
3035
|
+
*
|
|
3036
|
+
* @desc uni-app x
|
|
3037
|
+
*/
|
|
3038
|
+
swipeBackAsBackPress?: boolean;
|
|
2855
3039
|
[x: string]: any;
|
|
2856
3040
|
}
|
|
2857
3041
|
//#endregion
|
|
@@ -2861,7 +3045,7 @@ interface PageStyle extends BaseStyle {
|
|
|
2861
3045
|
*
|
|
2862
3046
|
* pages 数组的元素类型
|
|
2863
3047
|
*/
|
|
2864
|
-
interface PageMetaDatum {
|
|
3048
|
+
export interface PageMetaDatum {
|
|
2865
3049
|
/**
|
|
2866
3050
|
* 配置页面路径
|
|
2867
3051
|
*/
|
|
@@ -2881,7 +3065,7 @@ interface PageMetaDatum {
|
|
|
2881
3065
|
/**
|
|
2882
3066
|
* pages 数组的元素类型
|
|
2883
3067
|
*/
|
|
2884
|
-
interface PageItem {
|
|
3068
|
+
export interface PageItem {
|
|
2885
3069
|
/**
|
|
2886
3070
|
* 配置页面路径
|
|
2887
3071
|
*/
|
|
@@ -2903,13 +3087,13 @@ interface PageItem {
|
|
|
2903
3087
|
*
|
|
2904
3088
|
* 文档中为必填,类型上保持可选,插件可由文件扫描自动生成
|
|
2905
3089
|
*/
|
|
2906
|
-
type Pages = PageItem[];
|
|
3090
|
+
export type Pages = PageItem[];
|
|
2907
3091
|
//#endregion
|
|
2908
3092
|
//#region src/preload-rule.d.ts
|
|
2909
3093
|
/**
|
|
2910
3094
|
* 进入页面后预下载分包的规则
|
|
2911
3095
|
*/
|
|
2912
|
-
interface PreloadRuleItem {
|
|
3096
|
+
export interface PreloadRuleItem {
|
|
2913
3097
|
/**
|
|
2914
3098
|
* 进入页面后预下载分包的 root 或 name
|
|
2915
3099
|
*
|
|
@@ -2933,23 +3117,31 @@ interface PreloadRuleItem {
|
|
|
2933
3117
|
*
|
|
2934
3118
|
* @desc 微信小程序、QQ 小程序、抖音小程序、支付宝小程序、京东小程序
|
|
2935
3119
|
*/
|
|
2936
|
-
type PreloadRule = Record<string, PreloadRuleItem>;
|
|
3120
|
+
export type PreloadRule = Record<string, PreloadRuleItem>;
|
|
2937
3121
|
//#endregion
|
|
2938
3122
|
//#region src/sub-packages.d.ts
|
|
2939
3123
|
/**
|
|
2940
|
-
* subPackages
|
|
3124
|
+
* subPackages 数组的元素类型,即应用的分包
|
|
2941
3125
|
*/
|
|
2942
|
-
interface SubPackage {
|
|
3126
|
+
export interface SubPackage {
|
|
2943
3127
|
/**
|
|
2944
|
-
*
|
|
3128
|
+
* 分包的根目录
|
|
2945
3129
|
*/
|
|
2946
3130
|
root: string;
|
|
2947
3131
|
/**
|
|
2948
|
-
*
|
|
3132
|
+
* 是否声明对应分包为独立分包
|
|
3133
|
+
*
|
|
3134
|
+
* @default false
|
|
3135
|
+
*
|
|
3136
|
+
* @desc uni-app x
|
|
3137
|
+
*/
|
|
3138
|
+
independent?: boolean;
|
|
3139
|
+
/**
|
|
3140
|
+
* 分包由哪些页面组成,参数同 pages
|
|
2949
3141
|
*/
|
|
2950
3142
|
pages: Pages;
|
|
2951
3143
|
/**
|
|
2952
|
-
*
|
|
3144
|
+
* 分包的插件
|
|
2953
3145
|
*/
|
|
2954
3146
|
plugins?: Record<string, any>;
|
|
2955
3147
|
[x: string]: any;
|
|
@@ -2957,10 +3149,10 @@ interface SubPackage {
|
|
|
2957
3149
|
/**
|
|
2958
3150
|
* 分包加载配置,H5 不支持
|
|
2959
3151
|
*/
|
|
2960
|
-
type SubPackages = SubPackage[];
|
|
3152
|
+
export type SubPackages = SubPackage[];
|
|
2961
3153
|
//#endregion
|
|
2962
3154
|
//#region src/tab-bar.d.ts
|
|
2963
|
-
interface TabBarIconFont {
|
|
3155
|
+
export interface TabBarIconFont {
|
|
2964
3156
|
/**
|
|
2965
3157
|
* 字库 Unicode 码
|
|
2966
3158
|
*/
|
|
@@ -2987,7 +3179,7 @@ interface TabBarIconFont {
|
|
|
2987
3179
|
selectedColor?: HEXColor;
|
|
2988
3180
|
[x: string]: any;
|
|
2989
3181
|
}
|
|
2990
|
-
interface TabBarItem {
|
|
3182
|
+
export interface TabBarItem {
|
|
2991
3183
|
/**
|
|
2992
3184
|
* 页面路径,必须在 pages 中先定义
|
|
2993
3185
|
*/
|
|
@@ -3033,7 +3225,7 @@ interface TabBarItem {
|
|
|
3033
3225
|
iconfont?: TabBarIconFont;
|
|
3034
3226
|
[x: string]: any;
|
|
3035
3227
|
}
|
|
3036
|
-
interface TabBarMidButton {
|
|
3228
|
+
export interface TabBarMidButton {
|
|
3037
3229
|
/**
|
|
3038
3230
|
* 中间按钮的宽度,tabBar 其它项为减去此宽度后平分
|
|
3039
3231
|
*
|
|
@@ -3044,6 +3236,8 @@ interface TabBarMidButton {
|
|
|
3044
3236
|
* 中间按钮的高度,可以大于 tabBar 高度,达到中间凸起的效果
|
|
3045
3237
|
*
|
|
3046
3238
|
* @default "50px"
|
|
3239
|
+
*
|
|
3240
|
+
* @desc uni-app x 为 "80px"
|
|
3047
3241
|
*/
|
|
3048
3242
|
height?: string;
|
|
3049
3243
|
/**
|
|
@@ -3075,7 +3269,7 @@ interface TabBarMidButton {
|
|
|
3075
3269
|
/**
|
|
3076
3270
|
* 设置底部 tab 的表现
|
|
3077
3271
|
*/
|
|
3078
|
-
interface TabBar {
|
|
3272
|
+
export interface TabBar {
|
|
3079
3273
|
/**
|
|
3080
3274
|
* tab 上的文字默认颜色
|
|
3081
3275
|
*
|
|
@@ -3104,6 +3298,14 @@ interface TabBar {
|
|
|
3104
3298
|
* @format color
|
|
3105
3299
|
*/
|
|
3106
3300
|
borderStyle?: 'black' | 'white' | HEXColor | ThemeVar;
|
|
3301
|
+
/**
|
|
3302
|
+
* tabBar 上边框的颜色,优先级高于 borderStyle
|
|
3303
|
+
*
|
|
3304
|
+
* @desc uni-app x
|
|
3305
|
+
*
|
|
3306
|
+
* @format color
|
|
3307
|
+
*/
|
|
3308
|
+
borderColor?: HEXColor | ThemeVar;
|
|
3107
3309
|
/**
|
|
3108
3310
|
* iOS 高斯模糊效果,参考 [使用说明](https://uniapp.dcloud.net.cn/tutorial/app-blureffect.html)
|
|
3109
3311
|
*
|
|
@@ -3112,6 +3314,36 @@ interface TabBar {
|
|
|
3112
3314
|
* @desc App 2.4.0+、H5 3.0.0+(只有最新版浏览器才支持)
|
|
3113
3315
|
*/
|
|
3114
3316
|
blurEffect?: 'dark' | 'extralight' | 'light' | 'none';
|
|
3317
|
+
/**
|
|
3318
|
+
* 是否开启玻璃效果 tabBar
|
|
3319
|
+
*
|
|
3320
|
+
* iOS 26 及以上使用系统液态玻璃效果,iOS 26 以下降级为系统毛玻璃效果,启用后仅支持图片图标,不支持 iconfont
|
|
3321
|
+
*
|
|
3322
|
+
* 鸿蒙平台为开启沉浸光感效果并叠加在页面内容之上,启用后在 7.0.0(26) 之上为沉浸光感效果且为胶囊形态,在 6.1.0(23) 之上为毛玻璃效果且为胶囊形态,在更低版本为普通毛玻璃效果
|
|
3323
|
+
*
|
|
3324
|
+
* 启用后 tabBar 以悬浮方式覆盖在页面内容上方,页面排版高度包含 tabBar 覆盖区域
|
|
3325
|
+
*
|
|
3326
|
+
* @default false
|
|
3327
|
+
*
|
|
3328
|
+
* @desc uni-app x
|
|
3329
|
+
*/
|
|
3330
|
+
glassEffect?: boolean;
|
|
3331
|
+
/**
|
|
3332
|
+
* 鸿蒙平台沉浸光感效果的材质等级
|
|
3333
|
+
*
|
|
3334
|
+
* @default "adaptive"
|
|
3335
|
+
*
|
|
3336
|
+
* @desc uni-app x 鸿蒙 6.1.0(23)+
|
|
3337
|
+
*/
|
|
3338
|
+
glassEffectMaterialLevel?: 'exquisite' | 'gentle' | 'smooth' | 'adaptive';
|
|
3339
|
+
/**
|
|
3340
|
+
* 是否禁用玻璃效果 tabBar 自动上推页面滚动内容
|
|
3341
|
+
*
|
|
3342
|
+
* @default false
|
|
3343
|
+
*
|
|
3344
|
+
* @desc uni-app x
|
|
3345
|
+
*/
|
|
3346
|
+
disableGlassSafeAreaAutoFit?: boolean;
|
|
3115
3347
|
/**
|
|
3116
3348
|
* tab 列表,最少 2个,最多 5 个,app 端没有该限制
|
|
3117
3349
|
*
|
|
@@ -3225,7 +3457,7 @@ interface TabBar {
|
|
|
3225
3457
|
/**
|
|
3226
3458
|
* 配置显示该窗口的规则
|
|
3227
3459
|
*/
|
|
3228
|
-
interface MatchMedia {
|
|
3460
|
+
export interface MatchMedia {
|
|
3229
3461
|
/**
|
|
3230
3462
|
* 当设备可见区域宽度 >= minWidth 时,显示该 window
|
|
3231
3463
|
*
|
|
@@ -3236,7 +3468,7 @@ interface MatchMedia {
|
|
|
3236
3468
|
/**
|
|
3237
3469
|
* leftWindow / topWindow / rightWindow 的类型
|
|
3238
3470
|
*/
|
|
3239
|
-
interface TheWindow {
|
|
3471
|
+
export interface TheWindow {
|
|
3240
3472
|
/**
|
|
3241
3473
|
* 配置页面路径
|
|
3242
3474
|
*/
|
|
@@ -3258,7 +3490,7 @@ interface TheWindow {
|
|
|
3258
3490
|
*
|
|
3259
3491
|
* @desc uni-app 3.5.0+、uni-app-x 3.99+
|
|
3260
3492
|
*/
|
|
3261
|
-
interface UniIdRouter {
|
|
3493
|
+
export interface UniIdRouter {
|
|
3262
3494
|
/**
|
|
3263
3495
|
* 登录页面路径
|
|
3264
3496
|
*
|
|
@@ -3286,7 +3518,7 @@ interface UniIdRouter {
|
|
|
3286
3518
|
*
|
|
3287
3519
|
* 注意定位权限申请等原属于 app.json 的内容,需要在 manifest 中配置
|
|
3288
3520
|
*/
|
|
3289
|
-
interface PagesConfig {
|
|
3521
|
+
export interface PagesConfig {
|
|
3290
3522
|
/**
|
|
3291
3523
|
* 设置默认页面的窗口表现
|
|
3292
3524
|
*/
|
|
@@ -3369,6 +3601,6 @@ interface PagesConfig {
|
|
|
3369
3601
|
entryPagePath?: string;
|
|
3370
3602
|
[x: string]: any;
|
|
3371
3603
|
}
|
|
3372
|
-
interface UserPagesConfig extends PagesConfig {}
|
|
3604
|
+
export interface UserPagesConfig extends PagesConfig {}
|
|
3373
3605
|
//#endregion
|
|
3374
|
-
export {
|
|
3606
|
+
export type { AppHarmony, AppPlus, H5, MpAlipay, MpBaidu, MpHarmony, MpJd, MpKuaishou, MpLark, MpQq, MpToutiao, MpWeixin, MpXhs };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uni-helper/uni-pages-types",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.1",
|
|
5
5
|
"description": "Type definitions for uni-app pages.json",
|
|
6
6
|
"author": "KeJun",
|
|
7
7
|
"license": "MIT",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"tsdown": "^0.
|
|
50
|
+
"tsdown": "^0.23.1",
|
|
51
51
|
"typescript": "^6.0.3"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|