1 回答

TA貢獻(xiàn)1827條經(jīng)驗(yàn) 獲得超4個(gè)贊
dynamic: true您可以在添加項(xiàng)中添加額外的屬性:
this.shareholders.push({
username: "Username",
investment: "Investment",
dynamic: true
})
并在顯示輸入時(shí)檢查它:
<div>
<input v-model="shareholder.username" :name="`shareholders[${index}][username]`" type="text" class="form-control input" >
<i v-if="shareholder.dynamic" class="fa fa-plus-circle fa-lg" />
</div>
<div>
<input v-model="shareholder.investment" :name="`shareholders[${index}][investment]`" type="text" class="form-control input" >
<i v-if="shareholder.dynamic" class="fa fa-plus-circle fa-lg" />
</div>
添加回答
舉報(bào)