export interface Snippet {
body: string | string[]
description?: string
/** 程序中生成的,不需要配置 */
markdown?: string
}
export interface Snippets { [key: string]: Snippet }
export const PugSnippets: Snippets = {
icon: {
body: 'icon(type="${1|success,success_no_circle,info,warn,waiting,cancel,download,search,clear|}" size="${2:23}" color="$3") $0'
},
}
export const WxmlSnippets: Snippets = {
'swiper': {
body: [
'',
'\t',
'\t\t',
'\t\t\t',
'\t\t',
'\t',
'$0'
]
},
'icon': {
body: ' $0'
},
'button': {
body: [
'$0'
]
},
'picker time': {
body: [
'',
'\t当前选择: {{${1:time}}}',
'$0'
]
},
'picker date': {
body: [
'',
'\t当前选择: {{${1:date}}}',
'$0'
]
},
'picker region': {
body: [
'',
'\t当前选择:{{${1:region}[0]}},{{${1:region}[1]}},{{${1:region}[2]}}',
'$0'
]
},
'checkbox-group': {
body: [
'',
'\t',
'$0'
]
},
'radio-group': {
body: [
'',
'\t',
'$0'
]
}
}