<template v-for="index in 12" :key="index">
<td> {{ index }} </td>
</template>
/** 결과
1
2
3
4
5
6
7
8
9
10
11
12
*/
<template v-for="(n, index in 12)" :key="index">
<td> {{ index }} </td>
</template>
/** 결과
0
1
2
3
4
5
6
7
8
9
10
11
*/
'📕 Language > Vue' 카테고리의 다른 글
[vuejs] vue-router 중첩 라우팅 (0) | 2023.02.07 |
---|---|
[vuejs] vue-router 동적 라우팅 (0) | 2023.02.07 |
[vuejs] deep watch가 반환한 이전 값이 현재 값과 동일한 경우 (0) | 2023.01.30 |
[vuejs] <input> 태그의 데이터 변화 감지 (0) | 2023.01.27 |
[vuejs] axios get/post 요청에 따른 param 형식 (0) | 2023.01.18 |