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

单项绑定

双向绑定

事件

条件渲染


相关推荐
AM艾玛17 分钟前
Flutter 环境搭建实录
vscode·flutter
来自内蒙古的田园蒙牛1 小时前
WebStorm 接入 Ollama:使用 Qwen2.5-Coder 在本地运行 AI 编程助手
ide·人工智能·webstorm
程序员爱德华2 小时前
VSCode git/gerrit解冲突
git·vscode·gerrit
疏狂难除15 小时前
JetBrains IDE插件开发教程(五)——File Header
ide·kotlin
harmful_sheep1 天前
idea相关设置
java·ide·intellij-idea
蓝冰凌1 天前
vscode 用户级 settings.json
ide·vscode·json
九九落1 天前
VSCode AI编程完全指南:从环境搭建到实战应用
ide·vscode·ai编程
DevangLic2 天前
【第一次使用Visual Studio 2026+使用claude 拓展】
android·ide·visual studio
开发者联盟league2 天前
vscode接入deepseek
vscode·deepseek
小小放舟、2 天前
VS Code Code Runner 中文乱码修复与 IDEA 风格输出配置
vscode·python·code runner