docs(fg-tabbar): 完善 tabbar 策略的注释说明
添加更详细的注释说明 tabbar 策略选项及其使用注意事项 提醒代码更改后需要重新运行以更新 pages.json
This commit is contained in:
parent
2a97bf0aaa
commit
e2eda79403
@ -1,17 +1,22 @@
|
|||||||
// 是否使用自定义的tabbar?
|
/**
|
||||||
export const TABBAR_STRATEGY = {
|
* tabbar 选择的策略,更详细的介绍见 tabbar.md 文件
|
||||||
0: 'NATIVE_TABBAR',
|
* 0: 'NATIVE_TABBAR'
|
||||||
1: 'HALF_CUSTOM_TABBAR',
|
* 2: 'FULL_CUSTOM_TABBAR'
|
||||||
2: 'FULL_CUSTOM_TABBAR',
|
* 1: 'HALF_CUSTOM_TABBAR'
|
||||||
3: 'NO_TABBAR',
|
* 3: 'NO_TABBAR'
|
||||||
}
|
*
|
||||||
|
* 温馨提示:本文件的任何代码更改了之后,都需要重新运行,否则 pages.json 不会更新导致错误
|
||||||
|
*/
|
||||||
|
|
||||||
// TODO:通过这里切换使用tabbar的策略
|
// TODO:通过这里切换使用tabbar的策略
|
||||||
export const selectedTabbarStrategy = 0
|
export const selectedTabbarStrategy = 0
|
||||||
|
|
||||||
|
// 0 和 1 时,需要tabbar缓存
|
||||||
export const cacheTabbarEnable = selectedTabbarStrategy < 2
|
export const cacheTabbarEnable = selectedTabbarStrategy < 2
|
||||||
|
|
||||||
// selectedTabbarStrategy==0 时,需要填 iconPath 和 selectedIconPath
|
// selectedTabbarStrategy==0 时,需要填 iconPath 和 selectedIconPath
|
||||||
// selectedTabbarStrategy==1 or 2 时,需要填 icon 和 iconType
|
// selectedTabbarStrategy==1 or 2 时,需要填 icon 和 iconType
|
||||||
|
// selectedTabbarStrategy==3 时,tabbarList 不生效
|
||||||
export const tabbarList = [
|
export const tabbarList = [
|
||||||
{
|
{
|
||||||
iconPath: 'static/tabbar/home.png',
|
iconPath: 'static/tabbar/home.png',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user