在Windows環境下:
1、安裝Vue插件
點擊file,找到plugins
如果查找到Vue,就將后面的check框勾選上,如果沒有,最右邊框有相關資源,點擊加入就好,然后點擊應用
2、設置Vue新建模板
file-->settings --> editor --> file and code template
如圖所示:
3、將JavaScript 的版本改成es6
file --> settings --> languages & frameworks -->javascript
點擊應用,就可以看到 這里可以創建Vue compone 文件了
這里送上我的模板
<template>
<div>
</div>
</template>
<script>
export default {
data() {
return {
msg: 'hello world!'
}
} ,
methods:{},
components:{}
}
</script>
在mac環境下:
mac 的 settings 是在 webstrom --> preferences 下。 其余設置方法和Windows一樣。