DIV模擬輸入框
- 2020 年 4 月 2 日
- 筆記
<div contenteditable class="con" @input="onDivInput($event,fd)"></div>
onDivInput: function(e) { this.myHtmlCode = e.target.innerHTML; console.log("Text: %o", this.myHtmlCode); },
- $event事件回調
<div contenteditable class="con" @input="onDivInput($event,fd)"></div>
onDivInput: function(e) { this.myHtmlCode = e.target.innerHTML; console.log("Text: %o", this.myHtmlCode); },