-
Notifications
You must be signed in to change notification settings - Fork 0
/
prompts.js
63 lines (63 loc) · 1.3 KB
/
prompts.js
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
56
57
58
59
60
61
62
63
module.exports = [
{
type: 'input',
name: 'appName',
message: '请填写应用名称:',
validate: input => !!input,
},
{
type: 'input',
name: 'appDesc',
message: '请填写应用描述:',
validate: input => !!input,
},
{
type: 'list',
name: 'choiceTheme',
message: '请选择主题:',
choices: [
{ name: '默认', value: 'default' },
{ name: '天翼云', value: 'yun' }
]
},
{
type: 'confirm',
name: 'helpLink',
message: '是否生成帮助文档链接?',
},
{
type: 'confirm',
name: 'innerComp',
message: '是否启用自带组件?',
},
{
type: 'checkbox',
name: 'choiceComp',
message: '请选择需要的组件:',
choices: [
{ name: '表格树', value: 'tableTree' },
{ name: '计数器', value: 'count' }
],
when: answers => answers.innerComp
},
{
type: 'confirm',
name: 'chart',
message: '是否启用可视化图表?',
},
{
type: 'list',
name: 'choiceChart',
message: '请选择需要的可视化图表:',
choices: [
{ name: 'G2', value: 'g2' },
{ name: 'EChart', value: 'echart' }
],
when: answers => answers.chart
},
{
type: 'confirm',
name: 'choiceProxy',
message: '是否启用反向代理设置?',
}
]