commit | author | age | ||
bf6fbe | 1 | <template> |
L | 2 | <div> |
3 | <div v-for="(item, index) in articles" :key="index" @click="emitIndex(index)">{{item}}</div> | |
4 | </div> | |
5 | </template> | |
6 | ||
7 | <script> | |
8 | export default { | |
9 | props: ['articles'], | |
10 | methods: { | |
11 | emitIndex(index) { | |
12 | this.$emit('onEmitIndexEvent', index) | |
13 | } | |
14 | } | |
15 | } | |
16 | </script> |