idea支持创建vue文件

一、File->Settings,搜索"File" 将会打开File and Code Templates如下

二、在File创建下翻看是否有vue文件,没有则按如下新建

 默认文件内容,上图标注3内容自定义,以下是模板

<template>
    <div>
        {{msg}}
    </div>
</template>
<script>
  // import __ from '__' // __是需要手动引入的文件
  export default {
    name: '',
    components: {},
      data () {
          return {msg: '这个是Home模板页'}
      },
      methods: {}
  }
</script>
<style lang="postcss" scoped>
  body {
      background-color: #ff0000;
  }
</style>

三、重新新建文件发现有了Vue File选项

猜你喜欢

转载自blog.csdn.net/weixin_41996632/article/details/85923137
今日推荐