vscode 自定义代码块
vscode Vue 代码块
vue 代码块
"vue2Component": {
"prefix": "vue2",
"body": [
"<template>",
" <div>\n",
" </div>",
"</template>",
"<script>",
"export default {",
" name: \"$1\",",
" data() {",
" return {\n",
" }",
" },",
" methods:{\n",
" }",
"}",
"</script>",
"<style lang=\"scss\" scoped>\n",
"</style>",
"$2"
],
"description": "vue2 speed component"
},
"vue3Component": {
"prefix": "vue3",
"body": [
"<script setup lang=\"ts\">",
" import { ref, reactive, computed, onMounted } from \"vue\"",
" const msg = ref<string>('this is msg')",
"</script>\n",
"<template>",
" <div >",
" ",
" </div>",
"</template>\n",
"<style lang=\"scss\" scoped>",
" ",
"</style>",
"$2"
],
"description": "vue3 speed component"
},
vscode React 代码块
"reactTypescriptClassComponent":{
"prefix": "rtcc",
"body": [
"import React, { Component } from 'react';\n",
"type IProps = {",
" ",
"}\n",
"type IState = {",
" data: Array<string>",
"}\n",
"class $1 extends React.Component<IProps,IState> {\n",
" state:IState = {",
" data : []",
" }\n",
" render () {",
" return (",
" <>",
" <div> $1 </div>",
" </>",
" );",
" }",
"}\n",
"export default $1"
],
"description": "this is function typescript component"
},
"reactTypescriptFunctionComponent":{
"prefix": "rtfc",
"body": [
"import React from 'react';\n",
"export interface IProps {",
" ",
"}",
"const $1: React.FC<IProps> = props => {\n",
" return (<div> this is component </div>)\n",
"}\n",
"export default $1"
],
"description": "this is class typescript component"
},
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· winform 绘制太阳,地球,月球 运作规律
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人