安装vscode基础配置,es6基础语法,

https://code.visualstudio.com/

es6

定义变量

const声明常量(只读变量)

// 1、声明之后不允许改变

const PI = "3.1415926"

PI = 3 // TypeError: Assignment to constant variable.

// 2、一但声明必须初始化,否则会报错

const MY_AGE // Missing initializer in const declaration

结构赋值

声明对象简写

箭头函数

箭头函数提供了一种更加简洁的函数书写方式。基本语法是:

参数 => 函数体

箭头函数多用于匿名函数的定义

创建默认页面基础代码

文件 => 首选项 => 用户片段 => 新建全局代码片段文件:

cpp 复制代码
{
	"vue htm": {
		"scope": "html",
		"prefix": "vuehtml",
		"body": [
			"<!DOCTYPE html>",
			"<html lang=\"en\">",
			"",
			"<head>",
			"    <meta charset=\"UTF-8\">",
			"    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">",
			"    <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">",
			"    <title>Document</title>",
			"</head>",
			"",
			"<body>",
			"    <div id=\"app\">",
			"",
			"    </div>",
			"    <script src=\"vue.min.js\"></script>",
			"    <script>",
			"        new Vue({",
			"            el: '#app',",
			"            data: {",
			"                $1",
			"            }",
			"        })",
			"    </script>",
			"</body>",
			"",
			"</html>",
		],
		"description": "my vue template in html"
	}
}

单项绑定

双向绑定

事件

条件渲染


相关推荐
2501_9418230616 小时前
强化学习在边缘AI智能控制中的应用与多语言实现实践指南
ide
a***13141 天前
vscode配置django环境并创建django项目(全图文操作)
vscode·django·sqlite
YY&DS1 天前
VSCode Remote SSH 远程 Linux 无法连接
vscode
Pocker_Spades_A1 天前
在家写的代码,办公室接着改?Jupyter通过cpolar实现远程访问这么玩
ide·python·jupyter
liwulin05061 天前
【ESP32-S3-CAM】如何在Arduino IDE中关闭调试
ide
三更两点1 天前
第196期 TRAE 与 Amazon Kiro 智能体驱动集成开发环境(Agentic IDE)对比
ide
Nan_Shu_6142 天前
学习:Sass
javascript·学习·es6
ol木子李lo2 天前
Visual studio 2022高亮汇编(ASM)语法方法
汇编·ide·windows·visual studio
(づど)2 天前
解决VSCode中安装Go环境Gopls失败的问题
vscode·golang
曹牧3 天前
Eclipse为方法添加注释
java·ide·eclipse