简体   繁体   English

emacs Web模式缩进javascript不正确

[英]emacs web-mode indent javascript not correct

web mode indent not correct when line too long. 行长时,Web模式缩进不正确。 the code: 编码:

<script>
  import axios from 'axios'

  export default {
    components: {

    },
    asyncData ({ params }) {

      return axios
        .get().then((res) => {
          return { title: res.data.title }
      })
    }
  }
</script>

The following is correct. 以下是正确的。

      return axios
        .get().then((res) => {
          return { title: res.data.title }
      })

but: 但:

      return axios.get()
             .then((res) => {
          return { title: res.data.title }
      })

when i break line behind "axios", it's not correct 当我在“ axios”后面换行时,这是不正确的

anybody help?? 有人帮忙吗?

啊...我找到了。

(add-to-list 'web-mode-indentation-params '("lineup-calls" . nil))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM