@uni-helper/uni-pages-types 0.4.8 → 0.5.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.
package/dist/index.d.mts CHANGED
@@ -105,6 +105,9 @@ interface TitleNViewButton {
105
105
  }
106
106
  //#endregion
107
107
  //#region src/condition.d.ts
108
+ /**
109
+ * @deprecated 请使用 ConditionListItem
110
+ */
108
111
  interface ConditionItem {
109
112
  /**
110
113
  * 启动模式名称
@@ -119,6 +122,25 @@ interface ConditionItem {
119
122
  */
120
123
  query?: string;
121
124
  }
125
+ interface ConditionListItem {
126
+ /**
127
+ * 启动模式名称
128
+ */
129
+ name: string;
130
+ /**
131
+ * 启动页面路径
132
+ */
133
+ path: string;
134
+ /**
135
+ * 启动参数,可在页面的 onLoad 函数里获得
136
+ */
137
+ query?: string;
138
+ [x: string]: any;
139
+ }
140
+ type ConditionList = ConditionListItem[];
141
+ /**
142
+ * 启动模式配置
143
+ */
122
144
  interface Condition {
123
145
  /**
124
146
  * 当前激活的模式,list 节点的索引值
@@ -127,10 +149,16 @@ interface Condition {
127
149
  /**
128
150
  * 启动模式列表
129
151
  */
130
- list: ConditionItem[];
152
+ list: ConditionList;
153
+ [x: string]: any;
131
154
  }
132
155
  //#endregion
133
156
  //#region src/easycom.d.ts
157
+ /**
158
+ * 组件自动引入规则
159
+ *
160
+ * @desc 2.5.5+
161
+ */
134
162
  interface EasyCom {
135
163
  /**
136
164
  * 是否开启自动扫描,开启后将会自动扫描符合 `components/组件名称/组件名称.vue` 目录结构的组件
@@ -151,7 +179,7 @@ interface EasyCom {
151
179
  custom?: Record<string, string>;
152
180
  }
153
181
  //#endregion
154
- //#region src/global-style/app-harmony.d.ts
182
+ //#region src/style/app-harmony.d.ts
155
183
  /**
156
184
  * 设置编译到 App(Harmony)平台的特定样式
157
185
  *
@@ -161,15 +189,19 @@ interface EasyCom {
161
189
  */
162
190
  interface AppHarmony {
163
191
  /**
164
- * 软键盘弹出模式,仅支持 "adjustResize" / "adjustPan"
192
+ * 软键盘弹出模式
193
+ *
194
+ * "adjustResize" 重新测量并压缩布局尺寸
195
+ *
196
+ * "adjustPan" 整体平移窗口而不改变布局大小
165
197
  *
166
198
  * @default "adjustPan"
167
199
  */
168
- softInputMode?: 'adjustResize' | 'adjustPan';
200
+ softinputMode?: 'adjustResize' | 'adjustPan';
169
201
  [x: string]: any;
170
202
  }
171
203
  //#endregion
172
- //#region src/global-style/app-plus.d.ts
204
+ //#region src/style/app-plus.d.ts
173
205
  interface AppPlus {
174
206
  /**
175
207
  * 窗体背景色,支持 HEX 颜色
@@ -1094,15 +1126,17 @@ interface AppPlus {
1094
1126
  *
1095
1127
  * @desc App-iOS
1096
1128
  */
1097
- softInputNavBar?: 'auto' | 'none';
1129
+ softinputNavBar?: 'auto' | 'none';
1098
1130
  /**
1099
1131
  * 软键盘弹出模式,仅支持 "adjustResize" / "adjustPan"
1100
1132
  *
1101
- * @default "adjustPan"
1133
+ * "adjustResize" 重新测量并压缩布局尺寸
1102
1134
  *
1103
- * @desc App
1135
+ * "adjustPan" 整体平移窗口而不改变布局大小
1136
+ *
1137
+ * @default "adjustPan"
1104
1138
  */
1105
- softInputMode?: 'adjustResize' | 'adjustPan';
1139
+ softinputMode?: 'adjustResize' | 'adjustPan';
1106
1140
  /**
1107
1141
  * 下拉刷新
1108
1142
  *
@@ -1204,7 +1238,7 @@ interface AppPlus {
1204
1238
  [x: string]: any;
1205
1239
  }
1206
1240
  //#endregion
1207
- //#region src/global-style/h5.d.ts
1241
+ //#region src/style/h5.d.ts
1208
1242
  interface H5 {
1209
1243
  /**
1210
1244
  * 导航栏,详见 [导航栏](https://uniapp.dcloud.net.cn/collocation/pages#h5-titlenview)
@@ -1219,7 +1253,7 @@ interface H5 {
1219
1253
  */
1220
1254
  backgroundColor?: HEXColor;
1221
1255
  /**
1222
- * 自定义按钮,详见 [自定义按钮](https://uniapp.dcloud.net.cn/collocation/pages#app-titlenview-buttons)
1256
+ * 自定义按钮,详见 [自定义按钮](https://uniapp.dcloud.net.cn/collocation/pages#h5-titlenview-buttons)
1223
1257
  */
1224
1258
  buttons?: TitleNViewButton[];
1225
1259
  /**
@@ -1310,16 +1344,20 @@ interface H5 {
1310
1344
  };
1311
1345
  /**
1312
1346
  * 下拉刷新,详见 [下拉刷新](https://uniapp.dcloud.net.cn/collocation/pages#h5-pulltorefresh)
1347
+ *
1348
+ * h5 平台下拉刷新动画,只有 circle 类型
1313
1349
  */
1314
1350
  pullToRefresh?: {
1315
1351
  /**
1316
1352
  * 下拉刷新控件颜色,支持 HEX 颜色
1317
1353
  *
1318
1354
  * @default "#2BD009"
1355
+ *
1356
+ * @format color
1319
1357
  */
1320
1358
  color?: HEXColor;
1321
1359
  /**
1322
- * 下拉刷新控件起始位置,支持支持单位为 px 的逻辑像素值或百分比
1360
+ * 下拉刷新控件的起始位置,支持单位为 px 的逻辑像素值或百分比
1323
1361
  *
1324
1362
  * @default "0px"
1325
1363
  */
@@ -1329,9 +1367,9 @@ interface H5 {
1329
1367
  [x: string]: any;
1330
1368
  }
1331
1369
  //#endregion
1332
- //#region src/global-style/mp-alipay.d.ts
1370
+ //#region src/style/mp-alipay.d.ts
1333
1371
  /**
1334
- * 设置编译到 mp-alipay 平台的特定样式,配置项参考 [MP-ALIPAY](https://uniapp.dcloud.net.cn/collocation/pages#mp-alipay) 和 <https://opendocs.alipay.com/mini/framework/app-json#window>
1372
+ * 设置编译到 mp-alipay 平台的特定样式,配置项参考 <https://opendocs.alipay.com/mini/framework/app-json#window>
1335
1373
  *
1336
1374
  * 相应的类型是 MpAlipay
1337
1375
  *
@@ -1357,7 +1395,7 @@ interface MpAlipay {
1357
1395
  */
1358
1396
  backgroundImageColor?: HEXColor;
1359
1397
  /**
1360
- * 下拉露出显示背景图的链接,支持网络地址和本地地址,尽量使用绝对地址
1398
+ * 下拉露出显示背景图的链接
1361
1399
  */
1362
1400
  backgroundImageUrl?: string;
1363
1401
  /**
@@ -1423,13 +1461,15 @@ interface MpAlipay {
1423
1461
  */
1424
1462
  titlePenetrate?: 'YES' | 'NO';
1425
1463
  /**
1426
- * 导航栏图片地址,会替换当前文字标题,只支持 https 图片链接
1464
+ * 导航栏图片地址
1427
1465
  */
1428
1466
  titleImage?: string;
1429
1467
  /**
1430
1468
  * 导航栏背景色,支持 HEX 颜色
1469
+ *
1470
+ * @format color
1431
1471
  */
1432
- titleBarColor?: HEXColor;
1472
+ titleBarColor?: HEXColor | ThemeVar;
1433
1473
  /**
1434
1474
  * 导航栏前景色
1435
1475
  *
@@ -1439,9 +1479,9 @@ interface MpAlipay {
1439
1479
  [x: string]: any;
1440
1480
  }
1441
1481
  //#endregion
1442
- //#region src/global-style/mp-baidu.d.ts
1482
+ //#region src/style/mp-baidu.d.ts
1443
1483
  /**
1444
- * 设置编译到 mp-baidu 平台的特定样式,配置项参考 [MP-BAIDU](https://uniapp.dcloud.net.cn/collocation/pages.html#mp-baidu) 和 <https://smartprogram.baidu.com/docs/develop/framework/process/#window>
1484
+ * 设置编译到 mp-baidu 平台的特定样式,配置项参考 <https://smartprogram.baidu.com/docs/develop/framework/process/#window>
1445
1485
  *
1446
1486
  * 相应的类型是 MpBaidu
1447
1487
  *
@@ -1494,12 +1534,16 @@ interface MpBaidu {
1494
1534
  * 顶部窗口的背景色,仅 iOS 支持
1495
1535
  *
1496
1536
  * @default "#FFFFFF"
1537
+ *
1538
+ * @format color
1497
1539
  */
1498
1540
  backgroundColorTop?: HEXColor | ThemeVar;
1499
1541
  /**
1500
1542
  * 底部窗口的背景色,仅 iOS 支持
1501
1543
  *
1502
1544
  * @default "#FFFFFF"
1545
+ *
1546
+ * @format color
1503
1547
  */
1504
1548
  backgroundColorBottom?: HEXColor | ThemeVar;
1505
1549
  /**
@@ -1543,7 +1587,7 @@ interface MpBaidu {
1543
1587
  [x: string]: any;
1544
1588
  }
1545
1589
  //#endregion
1546
- //#region src/global-style/mp-harmony.d.ts
1590
+ //#region src/style/mp-harmony.d.ts
1547
1591
  /**
1548
1592
  * 设置编译到 mp-harmony 平台的特定样式,配置项参考 <https://developer.huawei.com/consumer/cn/doc/SPPartnerCenter-develop-Guides/extjson-description-0000002554249601>
1549
1593
  *
@@ -1574,6 +1618,8 @@ interface MpHarmony {
1574
1618
  * 窗口的背景色,支持 HEX 颜色
1575
1619
  *
1576
1620
  * @default "#FFFFFF"
1621
+ *
1622
+ * @format color
1577
1623
  */
1578
1624
  backgroundColor?: HEXColor | ThemeVar;
1579
1625
  /**
@@ -1597,7 +1643,7 @@ interface MpHarmony {
1597
1643
  [x: string]: any;
1598
1644
  }
1599
1645
  //#endregion
1600
- //#region src/global-style/mp-jd.d.ts
1646
+ //#region src/style/mp-jd.d.ts
1601
1647
  /**
1602
1648
  * 设置编译到 mp-jd 平台的特定样式,配置项参考 <https://mp-docs.jd.com/doc/miniapp/dev/reference/2595#heading-3>
1603
1649
  *
@@ -1638,6 +1684,8 @@ interface MpJd {
1638
1684
  * 下拉窗口的背景色,不是页面的背景颜色
1639
1685
  *
1640
1686
  * @default "#FFFFFF"
1687
+ *
1688
+ * @format color
1641
1689
  */
1642
1690
  backgroundColor?: HEXColor | ThemeVar;
1643
1691
  /**
@@ -1650,12 +1698,16 @@ interface MpJd {
1650
1698
  * 顶部窗口的背景色,仅 iOS 支持
1651
1699
  *
1652
1700
  * @default "#FFFFFF"
1701
+ *
1702
+ * @format color
1653
1703
  */
1654
1704
  backgroundColorTop?: HEXColor | ThemeVar;
1655
1705
  /**
1656
1706
  * 底部窗口的背景色,仅 iOS 支持
1657
1707
  *
1658
1708
  * @default "#FFFFFF"
1709
+ *
1710
+ * @format color
1659
1711
  */
1660
1712
  backgroundColorBottom?: HEXColor | ThemeVar;
1661
1713
  /**
@@ -1673,7 +1725,7 @@ interface MpJd {
1673
1725
  [x: string]: any;
1674
1726
  }
1675
1727
  //#endregion
1676
- //#region src/global-style/mp-kuaishou.d.ts
1728
+ //#region src/style/mp-kuaishou.d.ts
1677
1729
  /**
1678
1730
  * 设置编译到 mp-kuaishou 平台的特定样式,配置项参考 <https://mp.kuaishou.com/docs/develop/frame/config/conf_appjson.html#window>
1679
1731
  *
@@ -1685,7 +1737,7 @@ interface MpKuaishou {
1685
1737
  /**
1686
1738
  * 导航栏背景颜色,支持 HEX 颜色
1687
1739
  *
1688
- * @default "#000000"
1740
+ * @default "#ffffff"
1689
1741
  *
1690
1742
  * @format color
1691
1743
  */
@@ -1714,6 +1766,8 @@ interface MpKuaishou {
1714
1766
  * 窗口的背景色,支持 HEX 颜色
1715
1767
  *
1716
1768
  * @default "#FFFFFF"
1769
+ *
1770
+ * @format color
1717
1771
  */
1718
1772
  backgroundColor?: HEXColor | ThemeVar;
1719
1773
  /**
@@ -1726,12 +1780,16 @@ interface MpKuaishou {
1726
1780
  * 顶部窗口的背景色,仅 iOS 支持
1727
1781
  *
1728
1782
  * @default "#FFFFFF"
1783
+ *
1784
+ * @format color
1729
1785
  */
1730
1786
  backgroundColorTop?: HEXColor | ThemeVar;
1731
1787
  /**
1732
1788
  * 底部窗口的背景色,仅 iOS 支持
1733
1789
  *
1734
1790
  * @default "#FFFFFF"
1791
+ *
1792
+ * @format color
1735
1793
  */
1736
1794
  backgroundColorBottom?: HEXColor | ThemeVar;
1737
1795
  /**
@@ -1761,7 +1819,7 @@ interface MpKuaishou {
1761
1819
  [x: string]: any;
1762
1820
  }
1763
1821
  //#endregion
1764
- //#region src/global-style/mp-lark.d.ts
1822
+ //#region src/style/mp-lark.d.ts
1765
1823
  /**
1766
1824
  * 设置编译到 mp-lark 平台的特定样式,配置项参考 <https://open.feishu.cn/document/client-docs/gadget/introduction/global-settings#a172b7dd>
1767
1825
  *
@@ -1826,6 +1884,8 @@ interface MpLark {
1826
1884
  * @desc iOS, Android, PC(3.14.0+)
1827
1885
  *
1828
1886
  * @default "#FFFFFF"
1887
+ *
1888
+ * @format color
1829
1889
  */
1830
1890
  backgroundColor?: HEXColor | ThemeVar;
1831
1891
  /**
@@ -1842,6 +1902,8 @@ interface MpLark {
1842
1902
  * @desc iOS
1843
1903
  *
1844
1904
  * @default "#FFFFFF"
1905
+ *
1906
+ * @format color
1845
1907
  */
1846
1908
  backgroundColorTop?: HEXColor | ThemeVar;
1847
1909
  /**
@@ -1850,6 +1912,8 @@ interface MpLark {
1850
1912
  * @desc iOS
1851
1913
  *
1852
1914
  * @default "#FFFFFF"
1915
+ *
1916
+ * @format color
1853
1917
  */
1854
1918
  backgroundColorBottom?: HEXColor | ThemeVar;
1855
1919
  /**
@@ -1870,12 +1934,14 @@ interface MpLark {
1870
1934
  onReachBottomDistance?: number;
1871
1935
  /**
1872
1936
  * PCMode 模式下特定的窗口配置,支持的属性与通用 window 配置属性一致,仅当在 ext 内配置了 defaultPages.PCMode 时生效
1937
+ *
1938
+ * @desc PC(3.14.0+)
1873
1939
  */
1874
1940
  PCMode?: Omit<MpLark, 'PCMode'>;
1875
1941
  [x: string]: any;
1876
1942
  }
1877
1943
  //#endregion
1878
- //#region src/global-style/mp-qq.d.ts
1944
+ //#region src/style/mp-qq.d.ts
1879
1945
  /**
1880
1946
  * 设置编译到 mp-qq 平台的特定样式,配置项参考 <https://q.qq.com/wiki/develop/miniprogram/frame/dispose.html#window>
1881
1947
  *
@@ -1916,6 +1982,8 @@ interface MpQq {
1916
1982
  * 窗口的背景色,支持 HEX 颜色
1917
1983
  *
1918
1984
  * @default "#FFFFFF"
1985
+ *
1986
+ * @format color
1919
1987
  */
1920
1988
  backgroundColor?: HEXColor | ThemeVar;
1921
1989
  /**
@@ -1928,12 +1996,16 @@ interface MpQq {
1928
1996
  * 顶部窗口的背景色,仅 iOS 支持
1929
1997
  *
1930
1998
  * @default "#FFFFFF"
1999
+ *
2000
+ * @format color
1931
2001
  */
1932
2002
  backgroundColorTop?: HEXColor | ThemeVar;
1933
2003
  /**
1934
2004
  * 底部窗口的背景色,仅 iOS 支持
1935
2005
  *
1936
2006
  * @default "#FFFFFF"
2007
+ *
2008
+ * @format color
1937
2009
  */
1938
2010
  backgroundColorBottom?: HEXColor | ThemeVar;
1939
2011
  /**
@@ -1963,7 +2035,7 @@ interface MpQq {
1963
2035
  [x: string]: any;
1964
2036
  }
1965
2037
  //#endregion
1966
- //#region src/global-style/mp-toutiao.d.ts
2038
+ //#region src/style/mp-toutiao.d.ts
1967
2039
  /**
1968
2040
  * 设置编译到 mp-toutiao 平台的特定样式,配置项参考 <https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/framework/general-configuration#window>
1969
2041
  *
@@ -1991,7 +2063,13 @@ interface MpToutiao {
1991
2063
  */
1992
2064
  navigationBarTitleText?: string;
1993
2065
  /**
1994
- * 导航栏样式
2066
+ * 导航栏样式,导航栏样式,仅支持 "default" / "custom"
2067
+ *
2068
+ * custom 模式可自定义导航栏,具体效果样式效果参照 [页面自定义结构文档](https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/open-capacity/basic-capacities/custom-page-structure/)
2069
+ *
2070
+ * 具体申请入口在[「控制台」-「我的应用」](https://developer.open-douyin.com/console?type=1)-「具体小程序」-「能力」-「互动能力」中完成自定义导航栏权限申请
2071
+ *
2072
+ * 注意:custom 需要申请权限,否则会阻碍代码包上传,2022 年 5 月 23 日会强制变动,详细参考[获取小程序页面结构自定义能力规范](https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/operation/platform-capabilities/custom-page-structure/custom/)
1995
2073
  *
1996
2074
  * "default" 默认样式
1997
2075
  *
@@ -2004,6 +2082,8 @@ interface MpToutiao {
2004
2082
  * 窗口的背景色,支持 HEX 颜色
2005
2083
  *
2006
2084
  * @default "#FFFFFF"
2085
+ *
2086
+ * @format color
2007
2087
  */
2008
2088
  backgroundColor?: HEXColor | ThemeVar;
2009
2089
  /**
@@ -2016,12 +2096,16 @@ interface MpToutiao {
2016
2096
  * 顶部窗口的背景色,仅 iOS 支持
2017
2097
  *
2018
2098
  * @default 同 backgroundColor
2099
+ *
2100
+ * @format color
2019
2101
  */
2020
2102
  backgroundColorTop?: HEXColor | ThemeVar;
2021
2103
  /**
2022
2104
  * 底部窗口的背景色,仅 iOS 支持
2023
2105
  *
2024
2106
  * @default 同 backgroundColor
2107
+ *
2108
+ * @format color
2025
2109
  */
2026
2110
  backgroundColorBottom?: HEXColor | ThemeVar;
2027
2111
  /**
@@ -2151,9 +2235,9 @@ interface MpToutiao {
2151
2235
  [x: string]: any;
2152
2236
  }
2153
2237
  //#endregion
2154
- //#region src/global-style/mp-weixin.d.ts
2238
+ //#region src/style/mp-weixin.d.ts
2155
2239
  /**
2156
- * 设置编译到 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>
2240
+ * 设置编译到 mp-weixin 平台的特定样式,配置项参考 <https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/app.html#window>
2157
2241
  *
2158
2242
  * 相应的类型是 MpWeixin
2159
2243
  *
@@ -2185,7 +2269,13 @@ interface MpWeixin {
2185
2269
  *
2186
2270
  * "custom" 自定义导航栏,只保留右上角胶囊按钮
2187
2271
  *
2188
- * @desc iOS / Android 微信客户端 6.6.0,Windows 微信客户端不支持
2272
+ * @desc iOS / Android 微信客户端 6.6.0,Windows / Mac 微信基础库 3.6.1
2273
+ *
2274
+ * @desc iOS/Android 客户端 7.0.0 以下版本,navigationStyle 只在 app.json 中生效
2275
+ *
2276
+ * @desc iOS/Android 客户端 6.7.2 版本开始,navigationStyle: custom 对 web-view 组件无效
2277
+ *
2278
+ * @desc 开启 custom 后,低版本客户端需要做好兼容。开发者工具基础库版本切到 1.7.0(不代表最低版本,只供调试用)可方便切到旧视觉
2189
2279
  *
2190
2280
  * @default "default"
2191
2281
  */
@@ -2202,6 +2292,8 @@ interface MpWeixin {
2202
2292
  * 窗口的背景色,支持 HEX 颜色
2203
2293
  *
2204
2294
  * @default "#FFFFFF"
2295
+ *
2296
+ * @format color
2205
2297
  */
2206
2298
  backgroundColor?: HEXColor | ThemeVar;
2207
2299
  /**
@@ -2216,6 +2308,8 @@ interface MpWeixin {
2216
2308
  * @desc 微信客户端 6.5.16
2217
2309
  *
2218
2310
  * @default "#FFFFFF"
2311
+ *
2312
+ * @format color
2219
2313
  */
2220
2314
  backgroundColorTop?: HEXColor | ThemeVar;
2221
2315
  /**
@@ -2224,6 +2318,8 @@ interface MpWeixin {
2224
2318
  * @desc 微信客户端 6.5.16
2225
2319
  *
2226
2320
  * @default "#FFFFFF"
2321
+ *
2322
+ * @format color
2227
2323
  */
2228
2324
  backgroundColorBottom?: HEXColor | ThemeVar;
2229
2325
  /**
@@ -2293,9 +2389,9 @@ interface MpWeixin {
2293
2389
  [x: string]: any;
2294
2390
  }
2295
2391
  //#endregion
2296
- //#region src/global-style/mp-xhs.d.ts
2392
+ //#region src/style/mp-xhs.d.ts
2297
2393
  /**
2298
- * 设置编译到 mp-xhs 平台的特定样式,配置项参考 <https://miniapp.xiaohongshu.com/doc/DC813994>
2394
+ * 设置编译到 mp-xhs 平台的特定样式,配置项参考 <https://miniapp.xiaohongshu.com/doc/DC813994#anchorId-window>>
2299
2395
  *
2300
2396
  * 相应的类型是 MpXhs
2301
2397
  *
@@ -2334,6 +2430,8 @@ interface MpXhs {
2334
2430
  * 窗口的背景色,支持 HEX 颜色
2335
2431
  *
2336
2432
  * @default "#FFFFFF"
2433
+ *
2434
+ * @format color
2337
2435
  */
2338
2436
  backgroundColor?: HEXColor | ThemeVar;
2339
2437
  /**
@@ -2369,8 +2467,11 @@ interface MpXhs {
2369
2467
  [x: string]: any;
2370
2468
  }
2371
2469
  //#endregion
2372
- //#region src/global-style/index.d.ts
2373
- interface GlobalStyle {
2470
+ //#region src/style/index.d.ts
2471
+ /**
2472
+ * globalStyle 与 pageStyle 共有的配置项
2473
+ */
2474
+ interface BaseStyle {
2374
2475
  /**
2375
2476
  * 导航栏背景颜色(同状态栏背景色),支持 HEX 颜色
2376
2477
  *
@@ -2383,23 +2484,12 @@ interface GlobalStyle {
2383
2484
  * 导航栏标题颜色及状态栏前景颜色,仅支持 "black" / "white"
2384
2485
  *
2385
2486
  * @default "black"
2386
- *
2387
- * @desc 支付宝小程序不支持,请使用 my.setNavigationBar
2388
2487
  */
2389
2488
  'navigationBarTextStyle'?: 'black' | 'white' | ThemeVar;
2390
2489
  /**
2391
2490
  * 导航栏标题文字内容
2392
2491
  */
2393
2492
  'navigationBarTitleText'?: string;
2394
- /**
2395
- * 导航栏阴影
2396
- */
2397
- 'navigationBarShadow'?: {
2398
- /**
2399
- * 阴影颜色
2400
- */
2401
- colorType?: 'grey' | 'blue' | 'green' | 'orange' | 'red' | 'yellow';
2402
- };
2403
2493
  /**
2404
2494
  * 导航栏样式,仅支持 "default" / "custom"
2405
2495
  *
@@ -2441,21 +2531,21 @@ interface GlobalStyle {
2441
2531
  */
2442
2532
  'onReachBottomDistance'?: number;
2443
2533
  /**
2444
- * 顶部窗口的背景色(bounce回弹区域)
2534
+ * 顶部窗口的背景色(bounce 回弹区域),支持 HEX 颜色
2445
2535
  *
2446
2536
  * @default "#ffffff"
2447
2537
  *
2448
- * @desc iOS
2538
+ * @desc 仅 iOS 平台
2449
2539
  *
2450
2540
  * @format color
2451
2541
  */
2452
2542
  'backgroundColorTop'?: HEXColor | ThemeVar;
2453
2543
  /**
2454
- * 底部窗口的背景色(bounce回弹区域)
2544
+ * 底部窗口的背景色(bounce 回弹区域),支持 HEX 颜色
2455
2545
  *
2456
2546
  * @default "#ffffff"
2457
2547
  *
2458
- * @desc iOS
2548
+ * @desc 仅 iOS 平台
2459
2549
  *
2460
2550
  * @format color
2461
2551
  */
@@ -2469,7 +2559,7 @@ interface GlobalStyle {
2469
2559
  */
2470
2560
  'titleImage'?: string;
2471
2561
  /**
2472
- * 导航栏整体(前景、背景)透明设置,仅支持 "always" / "auto" / "none
2562
+ * 导航栏整体(前景、背景)透明设置,仅支持 "always" / "auto" / "none"
2473
2563
  *
2474
2564
  * "always" 一直透明
2475
2565
  *
@@ -2498,52 +2588,6 @@ interface GlobalStyle {
2498
2588
  * @desc 支付宝小程序
2499
2589
  */
2500
2590
  'allowsBounceVertical'?: 'YES' | 'NO';
2501
- /**
2502
- * 横屏配置,屏幕旋转设置,仅支持 "auto" / "portrait" / "landscape",详见 [响应显示区域变化](https://developers.weixin.qq.com/miniprogram/dev/framework/view/resizable.html)
2503
- *
2504
- * "auto" 自动
2505
- *
2506
- * "portrait" 竖屏
2507
- *
2508
- * "landscape" 横屏
2509
- *
2510
- * @default "portrait"
2511
- *
2512
- * @desc App 2.4.7+、微信小程序、QQ小程序
2513
- */
2514
- 'pageOrientation'?: 'auto' | 'portrait' | 'landscape';
2515
- /**
2516
- * 窗口显示的动画效果,详见 [窗口动画](https://uniapp.dcloud.net.cn/api/router#animation)
2517
- *
2518
- * @default "pop-in"
2519
- *
2520
- * @desc App
2521
- */
2522
- 'animationType'?: AnimationType;
2523
- /**
2524
- * 窗口显示动画的持续时间,单位为 ms
2525
- *
2526
- * @default 300
2527
- *
2528
- * @desc App
2529
- */
2530
- 'animationDuration'?: number;
2531
- /**
2532
- * 设置为 true 则页面整体不能上下滚动(bounce 效果),只在页面配置中有效,在 globalStyle 中设置无效
2533
- *
2534
- * @default false
2535
- *
2536
- * @desc 微信小程序(iOS)、百度小程序(iOS)
2537
- */
2538
- 'disableScroll'?: boolean;
2539
- /**
2540
- * 是否禁用滑动返回
2541
- *
2542
- * @default false
2543
- *
2544
- * @desc App-iOS(3.4.0+)
2545
- */
2546
- 'disableSwipeBack'?: boolean;
2547
2591
  /**
2548
2592
  * 设置编译到 App 平台的特定样式,配置项参考 [app-plus](https://uniapp.dcloud.net.cn/collocation/pages#app-plus)
2549
2593
  *
@@ -2569,7 +2613,7 @@ interface GlobalStyle {
2569
2613
  */
2570
2614
  'h5'?: H5;
2571
2615
  /**
2572
- * 设置编译到 mp-alipay 平台的特定样式,配置项参考 [MP-ALIPAY](https://uniapp.dcloud.net.cn/collocation/pages#mp-alipay) 和 <https://opendocs.alipay.com/mini/framework/app-json#window>
2616
+ * 设置编译到 mp-alipay 平台的特定样式,配置项参考 [MP-ALIPAY](https://uniapp.dcloud.net.cn/collocation/pages#mp-alipay)
2573
2617
  *
2574
2618
  * 相应的类型是 MpAlipay
2575
2619
  *
@@ -2577,7 +2621,7 @@ interface GlobalStyle {
2577
2621
  */
2578
2622
  'mp-alipay'?: MpAlipay;
2579
2623
  /**
2580
- * 设置编译到 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>
2624
+ * 设置编译到 mp-weixin 平台的特定样式,配置项参考 [MP-WEIXIN](https://uniapp.dcloud.net.cn/collocation/pages#mp-weixin)
2581
2625
  *
2582
2626
  * 相应的类型是 MpWeixin
2583
2627
  *
@@ -2585,7 +2629,7 @@ interface GlobalStyle {
2585
2629
  */
2586
2630
  'mp-weixin'?: MpWeixin;
2587
2631
  /**
2588
- * 设置编译到 mp-baidu 平台的特定样式,配置项参考 [MP-BAIDU](https://uniapp.dcloud.net.cn/collocation/pages.html#mp-baidu) 和 <https://smartprogram.baidu.com/docs/develop/framework/process/#window>
2632
+ * 设置编译到 mp-baidu 平台的特定样式,配置项参考 [MP-BAIDU](https://uniapp.dcloud.net.cn/collocation/pages.html#mp-baidu)
2589
2633
  *
2590
2634
  * 相应的类型是 MpBaidu
2591
2635
  *
@@ -2593,7 +2637,7 @@ interface GlobalStyle {
2593
2637
  */
2594
2638
  'mp-baidu'?: MpBaidu;
2595
2639
  /**
2596
- * 设置编译到 mp-toutiao 平台的特定样式,配置项参考 <https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/framework/general-configuration#window>
2640
+ * 设置编译到 mp-toutiao 平台的特定样式
2597
2641
  *
2598
2642
  * 相应的类型是 MpToutiao
2599
2643
  *
@@ -2654,12 +2698,6 @@ interface GlobalStyle {
2654
2698
  * @desc App、微信小程序、支付宝小程序、百度小程序、京东小程序
2655
2699
  */
2656
2700
  'usingComponents'?: Record<string, string>;
2657
- /**
2658
- * 同层渲染,webrtc(实时音视频)无法正常时尝试配置为 "seperated" 强制关掉同层渲染
2659
- *
2660
- * @desc 微信小程序
2661
- */
2662
- 'renderingMode'?: string;
2663
2701
  /**
2664
2702
  * 当存在 leftWindow 时,默认是否显示 leftWindow,详见 [topWindow](https://uniapp.dcloud.net.cn/collocation/pages.html#topwindow)
2665
2703
  *
@@ -2684,6 +2722,65 @@ interface GlobalStyle {
2684
2722
  * @desc H5
2685
2723
  */
2686
2724
  'rightWindow'?: boolean;
2725
+ /**
2726
+ * 当浏览器可见区域宽度大于 maxWidth 时两侧留白,当小于等于 maxWidth 时页面铺满,单位为 px
2727
+ *
2728
+ * 不同页面支持配置不同的 maxWidth
2729
+ *
2730
+ * maxWidth = leftWindow(可选)+ page(页面主体)+ rightWindow(可选)
2731
+ *
2732
+ * 使用时,页面内 fixed 元素需要使用 --window-left 和 --window-right 来保证布局位置正确
2733
+ *
2734
+ * @desc H5(2.9.9+)
2735
+ */
2736
+ 'maxWidth'?: number;
2737
+ }
2738
+ /**
2739
+ * globalStyle 节点的类型,用于设置应用的状态栏、导航条、标题、窗口背景色等
2740
+ */
2741
+ interface GlobalStyle extends BaseStyle {
2742
+ /**
2743
+ * 页面容器背景色,支持 HEX 颜色
2744
+ *
2745
+ * @desc App、H5、小程序
2746
+ *
2747
+ * @format color
2748
+ */
2749
+ backgroundColorContent?: HEXColor | ThemeVar;
2750
+ /**
2751
+ * 横屏配置,屏幕旋转设置,仅支持 "auto" / "portrait" / "landscape",详见 [响应显示区域变化](https://developers.weixin.qq.com/miniprogram/dev/framework/view/resizable.html)
2752
+ *
2753
+ * "auto" 自动
2754
+ *
2755
+ * "portrait" 竖屏
2756
+ *
2757
+ * "landscape" 横屏
2758
+ *
2759
+ * @default "portrait"
2760
+ */
2761
+ pageOrientation?: 'auto' | 'portrait' | 'landscape';
2762
+ /**
2763
+ * 窗口显示的动画效果,详见 [窗口动画](https://uniapp.dcloud.net.cn/api/router#animation)
2764
+ *
2765
+ * @default "pop-in"
2766
+ *
2767
+ * @desc App
2768
+ */
2769
+ animationType?: AnimationType;
2770
+ /**
2771
+ * 窗口显示动画的持续时间,单位为 ms
2772
+ *
2773
+ * @default 300
2774
+ *
2775
+ * @desc App
2776
+ */
2777
+ animationDuration?: number;
2778
+ /**
2779
+ * 同层渲染,webrtc(实时音视频)无法正常时尝试配置为 "seperated" 强制关掉同层渲染
2780
+ *
2781
+ * @desc 微信小程序
2782
+ */
2783
+ renderingMode?: string;
2687
2784
  /**
2688
2785
  * rpx 计算所支持的最大设备宽度,单位为 px
2689
2786
  *
@@ -2691,7 +2788,7 @@ interface GlobalStyle {
2691
2788
  *
2692
2789
  * @desc App(vue2 且不含 nvue)、H5(2.8.12+)
2693
2790
  */
2694
- 'rpxCalcMaxDeviceWidth'?: number;
2791
+ rpxCalcMaxDeviceWidth?: number;
2695
2792
  /**
2696
2793
  * rpx 计算使用的基准设备宽度,设备实际宽度超出 rpx 计算所支持的最大设备宽度时将按基准宽度计算,单位为 px
2697
2794
  *
@@ -2699,7 +2796,7 @@ interface GlobalStyle {
2699
2796
  *
2700
2797
  * @desc App(vue2 且不含 nvue)、H5(2.8.12+)
2701
2798
  */
2702
- 'rpxCalcBaseDeviceWidth'?: number;
2799
+ rpxCalcBaseDeviceWidth?: number;
2703
2800
  /**
2704
2801
  * rpx 计算特殊处理的值,始终按实际的设备宽度计算,单位为 rpx
2705
2802
  *
@@ -2707,30 +2804,161 @@ interface GlobalStyle {
2707
2804
  *
2708
2805
  * @desc App(vue2 且不含 nvue)、H5(2.8.12+)
2709
2806
  */
2710
- 'rpxCalcIncludeWidth'?: number;
2807
+ rpxCalcIncludeWidth?: number;
2711
2808
  /**
2712
2809
  * 是否使用动态 rpx,屏幕大小变化会重新渲染 rpx
2713
2810
  *
2714
2811
  * @default false
2715
2812
  *
2716
- * @desc App-nvue(vue3 固定值为 true) 3.2.13+
2813
+ * @desc App-nvue(vue3 固定值为 true) 3.2.13+、App 5.0+
2717
2814
  */
2718
- 'dynamicRpx'?: boolean;
2815
+ dynamicRpx?: boolean;
2816
+ [x: string]: any;
2817
+ }
2818
+ /**
2819
+ * pages 每个页面 style 节点的类型,用于设置每个页面的状态栏、导航条、标题、窗口背景色等
2820
+ *
2821
+ * 页面中配置项会覆盖 globalStyle 中相同的配置项
2822
+ */
2823
+ interface PageStyle extends BaseStyle {
2719
2824
  /**
2720
- * 当浏览器可见区域宽度大于 maxWidth 时两侧留白,当小于等于 maxWidth 时页面铺满,单位为 px
2825
+ * 导航栏阴影,配置参考 [导航栏阴影](https://uniapp.dcloud.net.cn/collocation/pages#navigationbarshadow)
2721
2826
  *
2722
- * 不同页面支持配置不同的 maxWidth
2827
+ * 微信/百度/头条小程序需要配置: "disableScroll": true
2723
2828
  *
2724
- * maxWidth = leftWindow(可选)+ page(页面主体)+ rightWindow(可选)
2829
+ * 支付宝小程序需要配置 "allowsBounceVertical": "NO"
2830
+ */
2831
+ navigationBarShadow?: {
2832
+ /**
2833
+ * 阴影颜色
2834
+ *
2835
+ * 支持 grey、blue、green、orange、red、yellow
2836
+ */
2837
+ colorType?: 'grey' | 'blue' | 'green' | 'orange' | 'red' | 'yellow';
2838
+ };
2839
+ /**
2840
+ * 设置为 true 则页面整体不能上下滚动(bounce 效果),只在页面配置中有效,在 globalStyle 中设置无效
2725
2841
  *
2726
- * 使用时,页面内 fixed 元素需要使用 --window-left 和 --window-right 来保证布局位置正确
2842
+ * @default false
2727
2843
  *
2728
- * @desc H5(2.9.9+)
2844
+ * @desc 微信小程序(iOS)、百度小程序(iOS)
2729
2845
  */
2730
- 'maxWidth'?: number;
2846
+ disableScroll?: boolean;
2847
+ /**
2848
+ * 是否禁用滑动返回
2849
+ *
2850
+ * @default false
2851
+ *
2852
+ * @desc App-iOS(3.4.0+)
2853
+ */
2854
+ disableSwipeBack?: boolean;
2731
2855
  [x: string]: any;
2732
2856
  }
2733
2857
  //#endregion
2858
+ //#region src/pages.d.ts
2859
+ /**
2860
+ * @deprecated 请使用 Page
2861
+ *
2862
+ * pages 数组的元素类型
2863
+ */
2864
+ interface PageMetaDatum {
2865
+ /**
2866
+ * 配置页面路径
2867
+ */
2868
+ path: string;
2869
+ /**
2870
+ * 配置页面窗口表现,配置项参考 [pageStyle](https://uniapp.dcloud.net.cn/collocation/pages#style)
2871
+ */
2872
+ style?: PageStyle;
2873
+ /**
2874
+ * 当前页面是否需要登录才可以访问,此配置优先级高于 uniIdRouter 下的 needLogin
2875
+ *
2876
+ * @default false
2877
+ */
2878
+ needLogin?: boolean;
2879
+ [x: string]: any;
2880
+ }
2881
+ /**
2882
+ * pages 数组的元素类型
2883
+ */
2884
+ interface PageItem {
2885
+ /**
2886
+ * 配置页面路径
2887
+ */
2888
+ path: string;
2889
+ /**
2890
+ * 配置页面窗口表现,配置项参考 [pageStyle](https://uniapp.dcloud.net.cn/collocation/pages#style)
2891
+ */
2892
+ style?: PageStyle;
2893
+ /**
2894
+ * 当前页面是否需要登录才可以访问,此配置优先级高于 uniIdRouter 下的 needLogin
2895
+ *
2896
+ * @default false
2897
+ */
2898
+ needLogin?: boolean;
2899
+ [x: string]: any;
2900
+ }
2901
+ /**
2902
+ * 设置页面路径及窗口表现
2903
+ *
2904
+ * 文档中为必填,类型上保持可选,插件可由文件扫描自动生成
2905
+ */
2906
+ type Pages = PageItem[];
2907
+ //#endregion
2908
+ //#region src/preload-rule.d.ts
2909
+ /**
2910
+ * 进入页面后预下载分包的规则
2911
+ */
2912
+ interface PreloadRuleItem {
2913
+ /**
2914
+ * 进入页面后预下载分包的 root 或 name
2915
+ *
2916
+ * __APP__ 表示主包
2917
+ */
2918
+ packages: string[];
2919
+ /**
2920
+ * 在指定网络下预下载
2921
+ *
2922
+ * "all" 不限网络
2923
+ *
2924
+ * "wifi" 仅 wifi 下预下载
2925
+ *
2926
+ * @default "wifi"
2927
+ */
2928
+ network?: 'all' | 'wifi';
2929
+ [x: string]: any;
2930
+ }
2931
+ /**
2932
+ * 分包预下载规则
2933
+ *
2934
+ * @desc 微信小程序、QQ 小程序、抖音小程序、支付宝小程序、京东小程序
2935
+ */
2936
+ type PreloadRule = Record<string, PreloadRuleItem>;
2937
+ //#endregion
2938
+ //#region src/sub-packages.d.ts
2939
+ /**
2940
+ * subPackages 数组的元素类型,即应用的子包
2941
+ */
2942
+ interface SubPackage {
2943
+ /**
2944
+ * 子包的根目录
2945
+ */
2946
+ root: string;
2947
+ /**
2948
+ * 子包由哪些页面组成,参数同 pages
2949
+ */
2950
+ pages: Pages;
2951
+ /**
2952
+ * 子包的插件
2953
+ */
2954
+ plugins?: Record<string, any>;
2955
+ [x: string]: any;
2956
+ }
2957
+ /**
2958
+ * 分包加载配置,H5 不支持
2959
+ */
2960
+ type SubPackages = SubPackage[];
2961
+ //#endregion
2734
2962
  //#region src/tab-bar.d.ts
2735
2963
  interface TabBarIconFont {
2736
2964
  /**
@@ -2747,10 +2975,14 @@ interface TabBarIconFont {
2747
2975
  fontSize?: string;
2748
2976
  /**
2749
2977
  * 字体图标颜色
2978
+ *
2979
+ * @format color
2750
2980
  */
2751
2981
  color?: HEXColor;
2752
2982
  /**
2753
2983
  * 字体图标选中颜色
2984
+ *
2985
+ * @format color
2754
2986
  */
2755
2987
  selectedColor?: HEXColor;
2756
2988
  [x: string]: any;
@@ -2770,6 +3002,9 @@ interface TabBarItem {
2770
3002
  * 当 position 为 "top" 时,此参数无效
2771
3003
  *
2772
3004
  * 不支持网络图片,不支持字体图标
3005
+ *
3006
+ * 支持 `@xxx` 主题变量:微信小程序 darkmode(themeLocation)下可按主题切换图标,
3007
+ * uni-app 会原样透传该字段(官方文档表格只标注 String,但 darkmode 场景依赖主题变量)
2773
3008
  */
2774
3009
  iconPath?: string | ThemeVar;
2775
3010
  /**
@@ -2778,10 +3013,14 @@ interface TabBarItem {
2778
3013
  * 当 position 为 "top" 时,此参数无效
2779
3014
  *
2780
3015
  * 不支持网络图片,不支持字体图标
3016
+ *
3017
+ * 支持 `@xxx` 主题变量,同 iconPath 的 darkmode 说明
2781
3018
  */
2782
3019
  selectedIconPath?: string | ThemeVar;
2783
3020
  /**
2784
- * 该项是否显示,默认显示
3021
+ * 该项是否显示
3022
+ *
3023
+ * @default true
2785
3024
  *
2786
3025
  * @desc App (3.2.10+)、H5 (3.2.10+)
2787
3026
  */
@@ -2796,7 +3035,7 @@ interface TabBarItem {
2796
3035
  }
2797
3036
  interface TabBarMidButton {
2798
3037
  /**
2799
- * 中间按钮的宽度,tabBar 其它项为减去此宽度后平分,默认值为与其它项平分宽度
3038
+ * 中间按钮的宽度,tabBar 其它项为减去此宽度后平分
2800
3039
  *
2801
3040
  * @default "80px"
2802
3041
  */
@@ -2833,6 +3072,9 @@ interface TabBarMidButton {
2833
3072
  iconfont?: TabBarIconFont;
2834
3073
  [x: string]: any;
2835
3074
  }
3075
+ /**
3076
+ * 设置底部 tab 的表现
3077
+ */
2836
3078
  interface TabBar {
2837
3079
  /**
2838
3080
  * tab 上的文字默认颜色
@@ -2857,13 +3099,13 @@ interface TabBar {
2857
3099
  *
2858
3100
  * @default "black"
2859
3101
  *
2860
- * @desc App 2.3.4+、H5 3.0.0+
3102
+ * @desc App 2.3.4+、H5 3.0.0+、微信小程序、小红书小程序、京东小程序
2861
3103
  *
2862
3104
  * @format color
2863
3105
  */
2864
3106
  borderStyle?: 'black' | 'white' | HEXColor | ThemeVar;
2865
3107
  /**
2866
- * iOS 高斯模糊效果,参考 [使用说明](https://ask.dcloud.net.cn/article/36617)
3108
+ * iOS 高斯模糊效果,参考 [使用说明](https://uniapp.dcloud.net.cn/tutorial/app-blureffect.html)
2867
3109
  *
2868
3110
  * @default "none"
2869
3111
  *
@@ -2930,6 +3172,8 @@ interface TabBar {
2930
3172
  iconfontSrc?: string;
2931
3173
  /**
2932
3174
  * 设置背景图片,优先级高于 backgroundColor
3175
+ *
3176
+ * @desc App
2933
3177
  */
2934
3178
  backgroundImage?: string;
2935
3179
  /**
@@ -2944,11 +3188,15 @@ interface TabBar {
2944
3188
  * "no-repeat" 背景图片在垂直方向和水平方向都拉伸
2945
3189
  *
2946
3190
  * @default "no-repeat"
3191
+ *
3192
+ * @desc App
2947
3193
  */
2948
3194
  backgroundRepeat?: 'no-repeat' | 'repeat' | 'repeat-x' | 'repeat-y';
2949
3195
  /**
2950
3196
  * tabBar上红点颜色
2951
3197
  *
3198
+ * @desc App
3199
+ *
2952
3200
  * @format color
2953
3201
  */
2954
3202
  redDotColor?: string;
@@ -2973,99 +3221,21 @@ interface TabBar {
2973
3221
  [x: string]: any;
2974
3222
  }
2975
3223
  //#endregion
2976
- //#region src/page-meta.d.ts
2977
- interface PageMetaDatum {
2978
- /**
2979
- * 配置页面路径
2980
- */
2981
- path: string;
2982
- type?: string;
2983
- /**
2984
- * 配置页面窗口表现,配置项参考下方 pageStyle
2985
- */
2986
- style?: GlobalStyle;
2987
- /**
2988
- * 当前页面是否需要登录才可以访问,此配置优先级高于 uniIdRouter 下的 needLogin
2989
- */
2990
- needLogin?: boolean;
2991
- [x: string]: any;
2992
- }
2993
- type ExcludeIndexSignature<T> = { [K in keyof T as string extends K ? never : number extends K ? never : K]: T[K] };
2994
- interface SubPageMetaDatum {
2995
- /**
2996
- * 子包的根目录
2997
- */
2998
- root: string;
2999
- /**
3000
- * 子包由哪些页面组成
3001
- */
3002
- pages: PageMetaDatum[];
3003
- /**
3004
- * 子包插件
3005
- */
3006
- plugins?: {
3007
- [pluginName: string]: {
3008
- version: string;
3009
- provider: string;
3010
- export?: string;
3011
- [key: string]: any;
3012
- };
3013
- };
3014
- }
3015
- interface UserTabBarItem extends Partial<TabBarItem> {
3016
- /**
3017
- * 配置页面路径
3018
- * @deprecated 可选,将会根据文件路径自动生成
3019
- */
3020
- pagePath?: string;
3021
- /**
3022
- * 排序,数字越小越靠前
3023
- */
3024
- index?: number;
3025
- }
3026
- interface UserPageMeta extends Partial<PageMetaDatum> {
3027
- /**
3028
- * 配置页面路径
3029
- * @deprecated 可选,将会根据文件路径自动生成
3030
- */
3031
- path?: string;
3032
- /**
3033
- * 底部 tabBar 的子项 [tabBar](https://uniapp.dcloud.net.cn/collocation/pages#tabBar)
3034
- */
3035
- tabBar?: UserTabBarItem;
3036
- [x: string]: any;
3037
- }
3038
- type MaybePromise<T> = T | Promise<T>;
3039
- type MaybeCallable<T> = T | (() => T);
3040
- type MaybePromiseCallable<T> = T | (() => T) | (() => Promise<T>);
3041
- declare function definePage(options: MaybePromiseCallable<UserPageMeta>): void;
3042
- type DefinePage = typeof definePage;
3043
- //#endregion
3044
- //#region src/sub-packages.d.ts
3045
- interface SubPackage {
3046
- /**
3047
- * 子包的根目录
3048
- */
3049
- root: string;
3050
- /**
3051
- * 子包由哪些页面组成,参数同 pages
3052
- */
3053
- pages: PageMetaDatum[];
3224
+ //#region src/the-window.d.ts
3225
+ /**
3226
+ * 配置显示该窗口的规则
3227
+ */
3228
+ interface MatchMedia {
3054
3229
  /**
3055
- * 分包插件
3230
+ * 当设备可见区域宽度 >= minWidth 时,显示该 window
3231
+ *
3232
+ * @default 768
3056
3233
  */
3057
- plugins?: {
3058
- [pluginName: string]: {
3059
- version: string;
3060
- provider: string;
3061
- export?: string;
3062
- [key: string]: any;
3063
- };
3064
- };
3234
+ minWidth?: number;
3065
3235
  }
3066
- type SubPackages = SubPackage[];
3067
- //#endregion
3068
- //#region src/the-window.d.ts
3236
+ /**
3237
+ * leftWindow / topWindow / rightWindow 的类型
3238
+ */
3069
3239
  interface TheWindow {
3070
3240
  /**
3071
3241
  * 配置页面路径
@@ -3074,43 +3244,43 @@ interface TheWindow {
3074
3244
  /**
3075
3245
  * 配置页面窗口表现,配置项参考 [pageStyle](https://uniapp.dcloud.net.cn/collocation/pages#style)
3076
3246
  */
3077
- style?: GlobalStyle;
3247
+ style?: PageStyle;
3078
3248
  /**
3079
3249
  * 配置显示该窗口的规则,配置项参考 [matchMedia](https://uniapp.dcloud.net.cn/collocation/pages#matchmedia)
3080
3250
  */
3081
- matchMedia?: {
3082
- /**
3083
- * 当设备可见区域宽度 >= minWidth 时,显示该 window
3084
- *
3085
- * @default 768
3086
- */
3087
- minWidth?: number;
3088
- };
3251
+ matchMedia?: MatchMedia;
3252
+ [x: string]: any;
3089
3253
  }
3090
3254
  //#endregion
3091
3255
  //#region src/uni-id-router.d.ts
3256
+ /**
3257
+ * 自动跳转相关配置,新增于 HBuilderX 3.5.0
3258
+ *
3259
+ * @desc uni-app 3.5.0+、uni-app-x 3.99+
3260
+ */
3092
3261
  interface UniIdRouter {
3093
3262
  /**
3094
3263
  * 登录页面路径
3095
3264
  *
3096
3265
  * @example "pages/index/index"
3097
3266
  */
3098
- loginPage: string;
3267
+ loginPage?: string;
3099
3268
  /**
3100
- * 需要登录才可以访问的页面列表,可以使用正则语法
3269
+ * 需要登录才可访问的页面列表,可以使用正则语法
3101
3270
  *
3102
3271
  * @example ["pages/detail/.*"]
3103
3272
  */
3104
- needLogin: string[];
3273
+ needLogin?: string[];
3105
3274
  /**
3106
- * 是否是否自动解析云对象及 clientDB 的错误码,如果是客户端 token 不正确或 token 过期则自动跳转配置的登录页面
3275
+ * 是否自动解析云对象及 clientDB 的错误码,如果是客户端 token 不正确或 token 过期则自动跳转配置的登录页面,
3107
3276
  *
3108
3277
  * @default true
3109
3278
  */
3110
3279
  resToLogin?: boolean;
3280
+ [x: string]: any;
3111
3281
  }
3112
3282
  //#endregion
3113
- //#region src/pages-config.d.ts
3283
+ //#region src/config.d.ts
3114
3284
  /**
3115
3285
  * 对 uni-app 进行全局配置,决定页面文件的路径、窗口样式、原生的导航栏、底部的原生 tabBar 等,类似微信小程序中 app.json 的页面管理部分
3116
3286
  *
@@ -3123,8 +3293,10 @@ interface PagesConfig {
3123
3293
  globalStyle?: GlobalStyle;
3124
3294
  /**
3125
3295
  * 设置页面路径及窗口表现
3296
+ *
3297
+ * 文档中为必填,类型上保持可选,插件可由文件扫描自动生成
3126
3298
  */
3127
- pages?: PageMetaDatum[];
3299
+ pages?: Pages;
3128
3300
  /**
3129
3301
  * 组件自动引入规则
3130
3302
  *
@@ -3148,45 +3320,18 @@ interface PagesConfig {
3148
3320
  /**
3149
3321
  * 分包预下载规则
3150
3322
  *
3151
- * @desc 微信小程序
3323
+ * @desc 微信小程序、QQ 小程序、抖音小程序、支付宝小程序、京东小程序
3152
3324
  */
3153
- preloadRule?: {
3154
- /**
3155
- * 页面路径
3156
- */
3157
- [path: string]: {
3158
- /**
3159
- * 进入页面后预下载分包的 root 或 name
3160
- *
3161
- * __APP__ 表示主包
3162
- */
3163
- packages: string[];
3164
- /**
3165
- * 在指定网络下预下载
3166
- *
3167
- * "all" 不限网络
3168
- *
3169
- * "wifi" 仅 wifi 下预下载
3170
- *
3171
- * @default "wifi"
3172
- */
3173
- network?: 'all' | 'wifi';
3174
- };
3175
- };
3325
+ preloadRule?: PreloadRule;
3176
3326
  /**
3177
- * `Worker` 代码放置的目录
3327
+ * worker 代码目录
3178
3328
  *
3179
- * @desc 微信小程序
3329
+ * @desc 微信小程序、支付宝小程序
3180
3330
  */
3181
3331
  workers?: string | {
3182
- /**
3183
- * `Worker` 代码放置的目录
3184
- */
3185
3332
  path: string;
3186
3333
  /**
3187
- * 是否打包为分包
3188
- *
3189
- * @desc 微信小程序基础库 v2.27.3
3334
+ * 是否把 worker 打包为分包
3190
3335
  *
3191
3336
  * @default false
3192
3337
  */
@@ -3226,4 +3371,4 @@ interface PagesConfig {
3226
3371
  }
3227
3372
  interface UserPagesConfig extends PagesConfig {}
3228
3373
  //#endregion
3229
- export { AnimationType, type AppHarmony, type AppPlus, Color, Condition, ConditionItem, DefinePage, EasyCom, ExcludeIndexSignature, GlobalStyle, type H5, HEXColor, MaybeCallable, MaybePromise, MaybePromiseCallable, type MpAlipay, type MpBaidu, type MpHarmony, type MpJd, type MpKuaishou, type MpLark, type MpQq, type MpToutiao, type MpWeixin, type MpXhs, PageMetaDatum, PagesConfig, PercentageSize, PxSize, RGBAColor, RGBColor, RpxSize, SubPackage, SubPackages, SubPageMetaDatum, TabBar, TabBarIconFont, TabBarItem, TabBarMidButton, TheWindow, ThemeVar, TitleNViewButton, UniIdRouter, UserPageMeta, UserPagesConfig, UserTabBarItem, definePage };
3374
+ export { AnimationType, type AppHarmony, type AppPlus, Color, Condition, ConditionItem, ConditionList, ConditionListItem, EasyCom, GlobalStyle, type H5, HEXColor, MatchMedia, type MpAlipay, type MpBaidu, type MpHarmony, type MpJd, type MpKuaishou, type MpLark, type MpQq, type MpToutiao, type MpWeixin, type MpXhs, PageItem, PageMetaDatum, PageStyle, Pages, PagesConfig, PercentageSize, PreloadRule, PreloadRuleItem, PxSize, RGBAColor, RGBColor, RpxSize, SubPackage, SubPackages, TabBar, TabBarIconFont, TabBarItem, TabBarMidButton, TheWindow, ThemeVar, TitleNViewButton, UniIdRouter, UserPagesConfig };