Procházet zdrojové kódy

Use v-for instead of hard-coded data

sbkwgh před 8 roky
rodič
revize
4846283046
1 změnil soubory, kde provedl 6 přidání a 6 odebrání
  1. 6 6
      src/components/routes/Index.vue

+ 6 - 6
src/components/routes/Index.vue

@@ -22,14 +22,14 @@
 				</tr>
 			</thead>
 			<tbody>
-				<tr class='thread'>
-					<td>A thread title here........</td>
+				<tr class='thread' v-for='thread in threads'>
+					<td>{{thread.title}}</td>
 					<td>
-						<div>User</div>
-						<div>0201/2017 10:07</div>
+						<div>{{thread.latestPostUser}}</div>
+						<div>{{thread.latestPostDate}}</div>
 					</td>
-					<td>A category here</td>
-					<td>29</td>
+					<td>{{thread.category}}</td>
+					<td>{{thread.replies}}</td>
 				</tr>
 			</tbody>
 		</div>