vue/return-in-computed-property Enforce that a return statement is present in computed property
生活随笔
收集整理的這篇文章主要介紹了
vue/return-in-computed-property Enforce that a return statement is present in computed property
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
此規則強制return語句在computed屬性中得完整存在。
<script> export default {computed: {/* ? GOOD */foo () {if (this.bar) {return this.baz} else {return this.baf}},bar: function () {return false},/* ? BAD */baz () {if (this.baf) {return this.baf}},baf: function () {}} } </script>?
總結
以上是生活随笔為你收集整理的vue/return-in-computed-property Enforce that a return statement is present in computed property的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: vue 出现Elements in it
- 下一篇: 链式调用setTimeout()与set