無論你接不接受 意外總會發生 人生就是由各類各樣的意外組成 重要的是 你的那顆炙熱的心是否還在燃燒javascript
cd ~/Desktop
mkdir node_vue_directive_learningload
cd node_vue_directive_learningload
npm init
sudo npm install koa koa-static
index.jshtml
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.htmlvue
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>ArthurSlog</title> </head> <body> <h1>The static web server by ArthurSlog</h1> </body> </html>
v-bind.htmljava
<!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"> <button v-bind:disabled="Output">Hello ArthurSlog</button> </div> <script> new Vue({ el: '#app', data: { Output: true } }) </script> </body> </html>
v-bind.htmlnode
<button v-bind:disabled="Output">Hello ArthurSlog</button> <script> new Vue({ el: '#app', data: { Output: true } }) </script>
v-bind.htmlgit
<button v-bind:disabled="Output">Hello ArthurSlog</button>
v-bind.htmlgithub
<script> new Vue({ el: '#app', data: { Output: true } }) </script>
v-bind.htmlweb
<!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"> <button v-bind:disabled="Output">Hello ArthurSlog</button> </div> <script> new Vue({ el: '#app', data: { Output: false } }) </script> </body> </html>