Advertisement
Guest User

html

a guest
Aug 21st, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.93 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.     <title>Document</title>
  7.     <link rel="stylesheet" href="index.css">
  8.     <script src="vue.js"></script>
  9. </head>
  10. <body>
  11.  
  12.     <div id="app">
  13.         <div>
  14.             <input type="text" v-on:input="findBook" placeholder="Cari Berdasarkan Title">
  15.             <!-- <span>{{ hasiltitle }}</span><br> -->
  16.             <!-- <span>{{ output }}</span> -->
  17.             <!-- <span>{{ cari }}</span> -->
  18.         </div><br>
  19.  
  20.         <!-- list buku -->
  21.         <table border="1" v-show="tampilSemua">
  22.             <tr v-for="book in books" :key="book.title">
  23.                 <td><img v-bind:src="book.image"width="90" height="90"></td>
  24.                 <td>{{ book.id }} <br/>
  25.                     {{ book.title }} <br/>
  26.                     {{ book.description }} <br/>
  27.                     {{ book.authors }} <br/>
  28.                     {{ book.publish_year }} <br/>
  29.                     {{ book.price }}
  30.                 </td>
  31.             </tr>
  32.         </table>
  33.  
  34.         <!-- tampil detail -->
  35.         <div v-if="!tampilSemua">
  36.             <table v-show="!tampilSemua">
  37.                 <tr v-for="book in books" :key="book.title">
  38.                     <!-- <td v-if="book.title === hasiltitle">Mantul</td> -->
  39.                     <td v-if="book.title === hasiltitle"><img v-bind:src="book.image"width="90" height="90"></td>
  40.                     <td v-if="book.title === hasiltitle">{{ book.id }} <br/>
  41.                         {{ book.title }} <br/>
  42.                         {{ book.description }} <br/>
  43.                         {{ book.authors }} <br/>
  44.                         {{ book.publish_year }} <br/>
  45.                         {{ book.price }}
  46.                     </td>
  47.                 </tr>
  48.             </table>
  49.         </div>
  50.     </div>
  51.  
  52.     <script src="index.js"></script>
  53.    
  54. </body>
  55. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement