Skip to content

Commit

Permalink
Merge pull request #609 from aijiacy/patch-1
Browse files Browse the repository at this point in the history
补充分包加载配置,ts声明定义
  • Loading branch information
yuche authored Sep 11, 2018
2 parents de6964a + 57e39cf commit 0351b8b
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion packages/taro/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,37 @@ declare namespace Taro {
list: TarbarList[]
}

interface SubPackage {
/**
* 分包根路径
* - 注意:不能放在主包pages目录下
*/
root: string,
/**
* 分包路径下的所有页面配置
*/
pages: string[]
}

interface AppConfig {
/**
* 接受一个数组,每一项都是字符串,来指定小程序由哪些页面组成,数组的第一项代表小程序的初始页面
*/
pages?: string[],
tabBar?: TabBar
tabBar?: TabBar,
/**
* 分包加载配置
* 示例:
* [
* {
* root: 'packages/module',
* pages: [
* 'pages/page/index'
* ]
* }
* ]
*/
subPackages?: SubPackage[]
}

interface Config extends PageConfig, AppConfig {
Expand Down

0 comments on commit 0351b8b

Please sign in to comment.