vscode会经常用到的代码片段(会定期更新)
vue
{ "Print to vueTemplate": { "prefix": "vueTemplate", "body": [ "<template>", " <div>", " $3", " </div>", "</template>", "<script>", "export default {", " name:'$1',", " props: {", " },", " data() {", " return {", " $2", " }", " },", " created() {", " },", " mouted() {", " },", " methods: {", " }", "}", "</script>", "<style scoped lang='less'>", "</style>" ], "description": "vue 模板" }}
js
{ "Print to jsNoteTitle": { "prefix": "jsNote", "body": [ "/**", " * description: $1", " * @author: taoxiaolin", " * @create-date: ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}", " * @version: V $2", "*/" ], "description": "js文件title" }, "Print to jsfn": { "prefix": "jsfn", "body": [ "/**", " * @function: $1", " * @description: $2", " * @author: taoixaolin", "*/" ], "description": "函数注释" }, "Print to jsModify": { "prefix": "jsModify", "body": [ "/**", " * @description: $1", " * @modifyContent: $2", " * @author: taoxiaolin", " * @modify-date: ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}", "*/" ], "description": "修改注明" }, "Print to console": { "prefix": "cons", "body": [ "console.log('$1');", "$2" ], "description": "Log output to console" }}
css
{ "Print to cssNote": { "prefix": "cssNote", "body": [ "/**", " * @description: $1", " * @author: taoxiaolin", " * @create-date: ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}", "*/" ], "description": "css注释" }}
less
"Print to lessNote": { "prefix": "lessNote", "body": [ "/*", " *@description: $1", " *@author: taoxiaolin", " *@create-date: ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}", "*/" ], "description": "less注释" }, "Print to rem": { "prefix": "lessRem", "body": [ "/*", "---", "rootSize:$1", "---", "*/" ], "description": "rem注释" }