1
を削減するための新しい変数に大きなオブジェクト、私はその名前を減らすために、新しい変数に大きなオブジェクトを割り当てるが、私はエラーを持っている:"realEstateProjectFundReuse" is read-only
Javascriptを - 割り当て(クローンではない)、その名前
const realEstateProjectFundReuse = this.project.realEstateProjectMotivation.realEstateProjectFundReuse
realEstateProjectFundReuse = omit(realEstateProjectFundReuse, [this.fundReuseTypeChoose(), 'description'])
しかし、この構文は、あなたが(あなたの2行目のように)別の値を割り当てられますできない、定数を作成し、キーワードconst
を使用して
const realEstateProjectFundReuse = this.project.realEstateProjectMotivation.realEstateProjectFundReuse
this.project.realEstateProjectMotivation.realEstateProjectFundReuse = omit(realEstateProjectFundReuse, [this.fundReuseTypeChoose(), 'description'])