Skip to content

Commit 7a12a9a

Browse files
committed
Fix: Iteration key now for inner components
1 parent bb5c098 commit 7a12a9a

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed
Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
<template>
2-
<vue-content-loading v-bind="$attrs" :width="230" :height="height">
3-
<template v-for="i in rows" :key="i">
4-
<circle :key="i" cx="8" :cy="getYPos(i, 8)" r="8" />
5-
<rect :key="i" x="22" :y="getYPos(i, 3)" rx="3" ry="3" width="200" height="9" />
6-
</template>
7-
</vue-content-loading>
2+
<vue-content-loading v-bind="$attrs" :width="230" :height="height">
3+
<template v-for="i in rows">
4+
<circle cx="8" :cy="getYPos(i, 8)" r="8" :key="i + '_c'" />
5+
<rect x="22" :y="getYPos(i, 3)" rx="3" ry="3" width="200" height="9" :key="i + '_r'" />
6+
</template>
7+
</vue-content-loading>
88
</template>
99

1010
<script>
11-
import VueContentLoading from '../VueContentLoading.vue';
11+
import VueContentLoading from 'vue-content-loading';
1212
13-
export default {
14-
components: {
15-
VueContentLoading,
16-
},
13+
export default {
14+
components: {
15+
VueContentLoading,
16+
},
1717
18-
props: {
19-
rows: {
20-
default: 5,
21-
type: Number,
22-
},
18+
props: {
19+
rows: {
20+
default: 5,
21+
type: Number,
2322
},
23+
},
2424
25-
computed: {
26-
height () {
27-
return this.rows * 21;
28-
},
25+
computed: {
26+
height() {
27+
return this.rows * 21;
2928
},
29+
},
3030
31-
methods: {
32-
getYPos (row, plus) {
33-
return plus + ((row - 1) * 22);
34-
},
31+
methods: {
32+
getYPos(row, plus) {
33+
return plus + ((row - 1) * 22);
3534
},
36-
};
37-
</script>
35+
},
36+
};
37+
</script>

0 commit comments

Comments
 (0)