How to use .vue code in vscode

php中世界最好的语言
Release: 2018-06-01 14:39:26
Original
1697 people have browsed it

这次给大家带来怎样操作vscode内使用.vue代码,操作vscode内使用.vue代码的注意事项有哪些,下面就是实战案例,一起来看一下。

1.设置.vue模板

打开编辑器,点击文件 —— 首选项 —— 用户代码片段,会弹出来一个输入框。

在输入框输入vue,回车,会打开一个vue.json文件。

在里面复制以下代码:

{ "Print to console": { "prefix": "vue", "body": [ "\n", "\n", "", "$2" ], "description": "Log output to console" } }
Copy after login

模板内容可按自己的喜好自行修改。

然后新建一个.vue文件,输入vue然后按tab键。

2.如果第一步没有成功

如果第一步成功是最好的,万一按tab键没有成功生成模板,而是多了一个空格:

步骤一:点击文件 —— 首选项 —— 设置,修改以下设置:

"emmet.syntaxProfiles": { "vue-html": "html", "vue": "html" }, "emmet.triggerExpansionOnTab": true
Copy after login

相信看了本文案例你已经掌握了方法,更多精彩请关注php中文网其它相关文章!

推荐阅读:

怎样进行JS内DOM节点使用

使用缓存调用链实现JS方法重载步骤详解

The above is the detailed content of How to use .vue code in vscode. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!