2021-01-12 18:04:14 +08:00

29 lines
578 B
Plaintext

<style type="less">
.groupitem {
}
</style>
<template>
<div class="groupitem">
--<span class="id">{{gitem.childid}}.</span>
<span class="name" @tap="tap"> {{gitem.childname}}</span>
</div>
</template>
<script>
import wepy from '@wepy/core';
wepy.component({
props: {
gitem: {}
},
data: {
},
methods: {
tap () {
this.gitem.childname = `Child Random(${Math.random()})`
let index = this.$parent.$children.indexOf(this);
console.log(`Item ${index}, ID is ${this.gitem.childid}`)
}
}
});
</script>