javascript - Why is eslint checking so troublesome?
PHP中文网
PHP中文网 2017-05-19 10:25:10
0
2
561

Can you see what's wrong?

  loadMore () {
    this.loading = true
    setTimeout (() => {
      let last = this.list[this.list.length - 1]
      for (let i = 1; i <= 10; i++) {
        this.list.push(last + i)
      }
      this.loading = false
    }, 2500)
  }
error  in ./src/views/index.vue


  ✘  http://eslint.org/docs/rules/func-call-spacing  Unexpected space between function name and paren
  /Users/wscart/Sites/node/toutiao/src/views/index.vue:92:5
      setTimeout (() => {
       ^


✘ 1 problem (1 error, 0 warnings)
PHP中文网
PHP中文网

认证高级PHP讲师

reply all(2)
PHPzhong

There is a space between the name of your function setTimeout and the brackets.

仅有的幸福
  1. setTimeout();

  2. Indentation problem

  3. Indentation problem

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!