feat: templates
This commit is contained in:
parent
1cd85adff9
commit
90b0346b65
|
|
@ -11,6 +11,38 @@ export const trackCommand: MdCommanderCommand = {
|
|||
description: "Emmet 格式的追踪项目:tag#class1.class2[attr=value]",
|
||||
type: "string",
|
||||
required: true,
|
||||
templates: [
|
||||
{
|
||||
label: "NPC",
|
||||
description: "基础 NPC 模板",
|
||||
insertText: "npc",
|
||||
},
|
||||
{
|
||||
label: "Enemy",
|
||||
description: "敌人模板",
|
||||
insertText: "enemy",
|
||||
},
|
||||
{
|
||||
label: "Ally",
|
||||
description: "盟友模板",
|
||||
insertText: "ally",
|
||||
},
|
||||
{
|
||||
label: "Vehicle",
|
||||
description: "载具模板",
|
||||
insertText: "vehicle",
|
||||
},
|
||||
{
|
||||
label: "Location",
|
||||
description: "地点模板",
|
||||
insertText: "location",
|
||||
},
|
||||
{
|
||||
label: "Item",
|
||||
description: "物品模板",
|
||||
insertText: "item",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
handler: (args, commands) => {
|
||||
|
|
|
|||
|
|
@ -35,6 +35,13 @@ export interface MdCommanderParameter {
|
|||
min?: number;
|
||||
max?: number;
|
||||
values?: string[];
|
||||
templates?: MdCommanderTemplate[];
|
||||
}
|
||||
|
||||
export interface MdCommanderTemplate {
|
||||
label: string;
|
||||
description?: string;
|
||||
insertText: string;
|
||||
}
|
||||
|
||||
export type MdCommanderOptionType =
|
||||
|
|
|
|||
Loading…
Reference in New Issue