vscode好用的扩展工具

1.Image preview

介绍:可在vscode预览图片,鼠标悬至图片链接可进行预览

2.wechat-snippet

介绍:微信小程序代码辅助,代码片段自动完成

3.VueHelper

介绍:对vue一些属性或者其他方法的 helper说明

4.Vetur

介绍:提供语法高亮、智能代码补全、代码片段、代码导航、代码格式化和语法检查等功能,可以大幅提高你的开发效率和代码质量。

5.TODO Highlight

介绍:TODO高亮,在插件->找到TODO HIGHLIGHT, 设置->扩展设置->TODO HIGHLIGHT Keywords->在setting.json中编辑。在json文件中编辑,模板已经有了,只需添加{ }中的内容(这儿以关键字,字体颜色,背景色为例),保存即可

{
    "editor.fontSize": 15,
    "window.zoomLevel": 0,
    "todo-tree.tree.showScanModeButton": false,
    "todohighlight.keywords": [
        {
            "text": "你的关键字:",
            "color": "#0000ff",
            "backgroundColor": "#ff0000",
        }
    ]
}

显示高亮效果:

6.Stylelint

介绍:样式的扩展

7.React/Redux/react-router Snippets或JS JSX Snippets或

介绍:react快捷输入,例如输入rcc,快速创建类组件

8.Prettier - Code formatter

介绍:让代码更加优美,代码格式化

9.Live Server

介绍:在项目中实时用Live Server作为一个实时服务器实时查看开发的网页或项目效果。

10.Git History

介绍:可查看提交代码历史记录

11.ESLint

介绍:语法检查

12.CSS Variable Autocomplete

13.Code Spell Checker

介绍:代码拼写检查插件,可以为开发者报告一些常见的拼写错误。在TypeScript, JavaScript, Text 等文件中,如果拼写的单词不在正确则会出现下方出现波浪线。

14.Chinese (Simplified) (简体中文) Language Pack for Visual Studio Code

介绍:vscode汉化

15.Auto Rename Tag

介绍:修改了前面的开始标签,自动remane 后面的闭合标签

16.Vue Language Features (Volar)

17.Python

18.px to rem & rpx & vw (cssrem)

介绍:使用快捷键px转rem

19.GitLens — Git supercharged

介绍:鼠标放到代码行上可以显示,改行的上一次修改记录

20.Error Lens

介绍:在代码行内提示报错或警告信息

21.ChatGPT

22.ES7 React/Redux/GraphQL/React-Native snippets

介绍:ES7代码片段提示

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
以下是TodoMVC-vue.js的js文件: ```javascript /*global Vue, todoStorage */ (function (exports) { 'use strict'; // 定义过滤器 var filters = { all: function (todos) { return todos; }, active: function (todos) { return todos.filter(function (todo) { return !todo.completed; }); }, completed: function (todos) { return todos.filter(function (todo) { return todo.completed; }); } }; // TodoMVC 应用程序 var app = new Vue({ // 应用程序绑定的根元素 el: '.todoapp', // 应用程序的数据 data: { todos: todoStorage.fetch(), newTodo: '', editedTodo: null, visibility: 'all' }, // 计算属性 computed: { filteredTodos: function () { return filters[this.visibility](this.todos); }, remaining: function () { return filters.active(this.todos).length; }, allDone: { get: function () { return this.remaining === 0; }, set: function (value) { this.todos.forEach(function (todo) { todo.completed = value; }); } } }, // 观察者 watch: { todos: { deep: true, handler: todoStorage.save } }, // 方法 methods: { addTodo: function () { var value = this.newTodo && this.newTodo.trim(); if (!value) { return; } this.todos.push({ title: value, completed: false }); this.newTodo = ''; }, removeTodo: function (todo) { this.todos.splice(this.todos.indexOf(todo), 1); }, editTodo: function (todo) { this.beforeEditCache = todo.title; this.editedTodo = todo; }, doneEdit: function (todo) { if (!this.editedTodo) { return; } this.editedTodo = null; todo.title = todo.title.trim(); if (!todo.title) { this.removeTodo(todo); } }, cancelEdit: function (todo) { this.editedTodo = null; todo.title = this.beforeEditCache; }, removeCompleted: function () { this.todos = filters.active(this.todos); } }, // 自定义指令 directives: { 'todo-focus': function (el, binding) { if (binding.value) { el.focus(); } } } }); // 应用程序启动后,将输入框聚焦 app.$nextTick(function () { app.newTodo = ''; }); exports.app = app; })(window); ``` 这是一个使用了Vue.js框架的TodoMVC应用程序的JavaScript文件。其中定义了一些过滤器、计算属性、观察者、方法和自定义指令,用于实现TodoMVC应用程序的各种功能,比如添加、删除、编辑、筛选和保存待办事项等。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值