index.html 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Title</title>
  6. <link rel="stylesheet" href="../lib/bulma-0.5.0.css" />
  7. <link rel="stylesheet" href="../styles.css" />
  8. <link rel="stylesheet" href="styles.css" />
  9. </head>
  10. <body class="section">
  11. <nav>
  12. <h1><span class="index">18</span>Vue Ajax requests with Axios</h1>
  13. <ul>
  14. <li><a href="../lesson18">Prev</a></li>
  15. <li><a href="../lesson20">Next</a></li>
  16. </ul>
  17. </nav>
  18. <div id="root" class="container">
  19. <list :projects="projects">
  20. <template></template>
  21. </list>
  22. <form method="post" action="projects" @submit.prevent="onSubmit" @keydown="errors.clear($event.target.name)">
  23. <div class="control">
  24. <label for="name" class="label">Project name:</label>
  25. <input type="text" id="name" name="name" class="input" v-model="name"/>
  26. </div>
  27. <div class="control">
  28. <label for="description" class="label">Project description:</label>
  29. <input type="text" id="description" name="description" class="input" v-model="description" />
  30. </div>
  31. <div class="control">
  32. <button class="button is-primary" :disabled="errors.any()">Create</button>
  33. </div>
  34. <span class="help is-danger" v-if="errors.has('name')" v-text="errors.get('name')"></span>
  35. </form>
  36. </div>
  37. <script src="../lib/axios-0.16.2.min.js"></script>
  38. <!-- script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.16.2/axios.js"></script -->
  39. <script src="../lib/vue-2.1.6.js"></script>
  40. <script src="code.js"></script>
  41. </body>
  42. </html>