責任 就是除了讓要遇上父母老去的速度 還要遇上子女成長的速度html
cd ~/Desktop
mkdir node_vue_directive_learningload
cd node_vue_directive_learningload
npm init
sudo npm install koa koa-static
index.jsvue
const serve = require('koa-static'); const Koa = require('koa'); const app = new Koa(); // $ GET /package.json app.use(serve('.')); app.listen(3000); console.log('listening on port 3000');
index.htmlnode
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>ArthurSlog</title> </head> <body> <h1>The static web server by ArthurSlog</h1> </body> </html>
v-model.htmlgit
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <!-- 開發環境版本,包含了有幫助的命令行警告 --> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> <title>ArthurSlog</title> </head> <body> <div id="app"> <input v-model="message" placeholder="edit me"> <p>Message is: {{ message }}</p> <br> <span>Multiline message is:</span> <p style="white-space: pre-line;">{{ msg }}</p> <br> <textarea v-model="msg" placeholder="add multiple lines"></textarea> </div> <script> new Vue({ el: '#app', data: { message: '', msg: '' } }) </script> </body> </html>