springeye / vue-for-idea

This is vue plugin for idea
https://plugins.jetbrains.com/plugin/9188
BSD 3-Clause "New" or "Revised" License
321 stars 45 forks source link

*.vue里script中不支持() => {}方式的函数。导致代码提示报错 #41

Closed wuchuguang closed 8 years ago

wuchuguang commented 8 years ago

*.vue

<script>
 ready(){
          this.$on("xxxx", (xxx,xxx) => {xxxxx});
 }
</script>
springeye commented 8 years ago

看这里。http://vue-loader.vuejs.org/en/start/spec.html script标签的说明 Default language: js (ES2015 is supported by default via Babel). 你可以指定lang="babel"

<script lang="babel">
  import Hello from './components/Hello'
  export default {
    components: {
      Hello
    },
    ready(){
      this.$on("xxxx", (xxx,xxx) => {xxxxx});
    }
  }
</script>
springeye commented 8 years ago

@wuchuguang 下一版,我会修改script默认语言为es2015

wuchuguang commented 8 years ago

谢谢~~