- Vue.js 2 Web Development Projects
- Guillaume Chau
- 109字
- 2021-07-02 22:34:25
The note editor
Now that we have our app running, let's add the text editor. We will use a simple textarea element and the v-model directive we saw in Chapter 1, Getting Started with Vue.
Create a section element and put the textarea inside, then add the v-model directive bound to our content property:
<!-- Main pane --> <section class="main"> <textarea v-model="content"></textarea> </section>
Now, if you change the text ;inside the note editor, the value of content should automatically chance in the devtools.
The v-model directive is not limited to text inputs. You can also use it in other form elements, such as checkboxes, radio buttons, or even custom components, as we will see later in the book.
推薦閱讀
- Java逍遙游記
- DBA攻堅指南:左手Oracle,右手MySQL
- UML和模式應用(原書第3版)
- DevOps with Kubernetes
- 高效微控制器C語言編程
- Rake Task Management Essentials
- Hands-On Data Structures and Algorithms with JavaScript
- C語言程序設計
- Java:Data Science Made Easy
- 零基礎學MQL:基于EA的自動化交易編程
- 微信公眾平臺開發:從零基礎到ThinkPHP5高性能框架實踐
- MySQL數據庫管理與開發(慕課版)
- INSTANT OpenNMS Starter
- Test-Driven Machine Learning
- Frank Kane's Taming Big Data with Apache Spark and Python