安装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"
	}
}

单项绑定

双向绑定

事件

条件渲染


相关推荐
oooost20 小时前
Jupyter Notebook 常用快捷键速查
ide·python·jupyter
承渊政道1 天前
Linux系统学习【线程概念与控制核心知识详解】
linux·运维·vscode·学习·ubuntu·线程创建 终止 等待
yqj2341 天前
ESP32-S3中小智项目优化内容
ide·macos·xcode
阿斌.com1 天前
Visual Studio 2026安装全攻略
ide·visual studio
我要神龙摆尾2 天前
IDEA 阅读插件
java·ide·intellij-idea·idea-plugs·plugs
梦幻通灵2 天前
IDEA 实用快捷键【持续更新】
java·ide·intellij-idea
风华同学3 天前
vscode远程连接
ide·vscode·编辑器
sunoo-2293 天前
【嵌入式 ARM 学习第十二天】SPI 裸机驱动 + I2C 触摸屏驱动 + 三大串行协议深度对比
arm开发·笔记·vscode·学习·imx6ull
kiss strong3 天前
idea显示前进后退按钮
java·ide·intellij-idea
ShuiShenHuoLe3 天前
Visual Studio 2022 Community 下载指南
ide·visual studio