app.config.js
1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-05-27 15:57:59
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-09-30 14:12:24
* @FilePath: /swx/src/app.config.js
* @Description:
*/
const vantComponentNames = require("../vantComponentConf");
const getVantComponentConf = (arr) => {
const result = {};
arr.forEach((key) => {
result[`van-${key}`] = `./components/vant-weapp/${key}/index`;
});
return result;
};
export default {
pages: [
'pages/index/index',
'pages/foo/index',
'pages/my/index',
'pages/createActivity/index',
'pages/activityDetail/index',
'pages/post/index',
'pages/joinActivity/index',
'pages/joinSuccess/index',
'pages/joinVolunteer/index',
'pages/joinInfo/index',
'pages/joinList/index',
'pages/userInfo/index',
'pages/addRecord/index',
'pages/editInfo/index',
],
subpackages: [ // 配置在tabBar中的页面不能分包写到subpackages中去
{
root: 'pages/demo',
pages: ['index'],
},
],
window: {
backgroundTextStyle: 'light',
navigationBarBackgroundColor: '#fff',
navigationBarTitleText: 'WeChat',
navigationBarTextStyle: 'black'
},
usingComponents: {
...getVantComponentConf(vantComponentNames),
// "van-button": "./components/vant-weapp/button/index",
// "van-tab": "./components/vant-weapp/tab/index",
// "van-tabs": "./components/vant-weapp/tabs/index"
}
}