我是 Vue 的新手。我想知道計算中的函數被調用了多少次,所以我寫了這個組件:const ComputedCounter = { name: "ComputedCounter", template: ` <span>{{ value }}</span> `, computed: { value() { const current = this.value || 0; return current + 1; } }}但是,會拋出“渲染錯誤:“內部錯誤:遞歸過多””錯誤。我很困惑,這里發生了什么,有沒有辦法使這項工作?
當引用與計算中相同的鍵時,Vue 計算會拋出“渲染中的錯誤:“內部錯誤:遞歸過多””
天涯盡頭無女友
2022-10-27 16:34:12