簡體   English   中英

emacs Web模式縮進javascript不正確

[英]emacs web-mode indent javascript not correct

行長時,Web模式縮進不正確。 編碼:

<script>
  import axios from 'axios'

  export default {
    components: {

    },
    asyncData ({ params }) {

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

以下是正確的。

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

但:

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

當我在“ axios”后面換行時,這是不正確的

有人幫忙嗎?

啊...我找到了。

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM