feat: 常用vscode代码片段

master
LCJ-MinYa 4 months ago
parent 0e2049bfe6
commit b1ee272a82

@ -3,3 +3,64 @@
## 快速选中整行 ## 快速选中整行
* 在当前行鼠标点击三下即可选中整行 * 在当前行鼠标点击三下即可选中整行
## vscode常用代码片段
* ①. **vue3引入markdown模版**
```json
{
"Render Markdown in Vue3": {
"prefix": "lcj_vue3_md_tmp",
"body": [
"<template>",
" <div",
" class=\"markdown-body\"",
" v-html=\"htmlStr\"",
" />",
"</template>",
"",
"<script setup>",
"import { ref } from 'vue';",
"import { marked } from 'marked';",
"import { getMarkdownContent } from '@/utils/tools';",
"",
"const htmlStr = ref('');",
"",
"getMarkdownContent('./md/${TM_FILENAME_BASE}.md').then((res) => {",
" htmlStr.value = marked(res);",
"});",
"</script>"
],
"description": "在vue3中渲染markdown"
}
}
```
* ②. **vue3引入less样式**
```json
{
"Render DemoItem in Vue3": {
"prefix": "lcj_vue3_item_tmp",
"body": [
"<template>",
" <div class=\"p-5 space-y-5 !bg-gray-100\">",
" <el-card header=\"$1\">",
" </el-card>",
" </div>",
"</template>",
"",
"<script setup>",
"import { ref } from 'vue';",
"</script>",
"",
"<style lang=\"scss\" scoped>",
"</style>",
],
"description": "vue3中基本示例组件"
}
}
```
## 特殊符号
```
① ② ③ ④ ⑤ ⑥ ⑦ ⑧ ⑨ ⑩
```

Loading…
Cancel
Save