在項目中會遇到需要編輯單元格的雙向綁定問題,v-model雙向綁定會在添加contenteditable="true"屬性后失效
解決方法如下,親測好用(v-html和@blur實現):
<td class="width90" contenteditable="true" v-html="name3.LastProduct" @blur="name3.LastProduct=$event.target.innerText"></td>
完美好用!
在項目中會遇到需要編輯單元格的雙向綁定問題,v-model雙向綁定會在添加contenteditable="true"屬性后失效
解決方法如下,親測好用(v-html和@blur實現):
<td class="width90" contenteditable="true" v-html="name3.LastProduct" @blur="name3.LastProduct=$event.target.innerText"></td>
完美好用!
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。