computed計算屬性提示錯誤
寫的這段代碼
報錯是:
[Vue warn]: Computed property "fullName" was assigned to but it has no setter.
(found in <Anonymous>)
寫的這段代碼
報錯是:
[Vue warn]: Computed property "fullName" was assigned to but it has no setter.
(found in <Anonymous>)
2018-07-09
舉報
2018-08-16
在data里面設(shè)置fullName:''
2018-07-13
具體原因我不清楚,不過你這么想,v-model是雙向綁定,你從后臺綁定到標簽return可以反回一個值給你,可是當(dāng)你在input中輸入一個值,他要賦給fullName,可是fullName是個函數(shù),他要怎么處理這個值?賦給值?如果是賦值,那么賦給之后原本的函數(shù)不久沒了嗎?函數(shù)沒了怎么讓他綁定到前臺
2018-07-09
因為我的input標簽寫的v-model="fullName",所以報錯 請問? 為什么不能這么寫?