You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.2 KiB
61 lines
1.2 KiB
module.exports = (inquirer) => {
|
|
return [
|
|
{
|
|
type: "checkbox",
|
|
message: "选择一个框架",
|
|
name: "framework",
|
|
choices: [
|
|
new inquirer.Separator(" = Vue = "),
|
|
{
|
|
name: "element",
|
|
message: "Element UI"
|
|
},
|
|
{
|
|
name: "Ham",
|
|
},
|
|
{
|
|
name: "Ground Meat",
|
|
},
|
|
{
|
|
name: "Bacon",
|
|
},
|
|
new inquirer.Separator(" = The Cheeses = "),
|
|
{
|
|
name: "Mozzarella",
|
|
checked: true,
|
|
},
|
|
{
|
|
name: "Cheddar",
|
|
},
|
|
{
|
|
name: "Parmesan",
|
|
},
|
|
new inquirer.Separator(" = The usual ="),
|
|
{
|
|
name: "Mushroom",
|
|
},
|
|
{
|
|
name: "Tomato",
|
|
},
|
|
new inquirer.Separator(" = The extras = "),
|
|
{
|
|
name: "Pineapple",
|
|
},
|
|
{
|
|
name: "Olives",
|
|
disabled: "out of stock",
|
|
},
|
|
{
|
|
name: "Extra cheese",
|
|
},
|
|
],
|
|
validate(answer) {
|
|
if (answer.length < 1) {
|
|
return "You must choose at least one topping.";
|
|
}
|
|
|
|
return true;
|
|
},
|
|
},
|
|
];
|
|
};
|
|
|