shopDarenHot.vue
1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<template>
<div v-if="item" class="recommendDaren" @click="userJump(item)">
<div class="daren_box">
<img class="head_portrait" v-lazy="item.logo" />
<div class="name">
{{item.title}}
</div>
<div class="desc">
{{item.titles}}
</div>
<div v-if="item.is_fans==0" @click.stop.prevent @click="fansShop(item)" class="btn">
关注
</div>
<div v-else @click.stop.prevent @click="fansShop(item)" class="btn">
已关注
</div>
</div>
</div>
</template>
<script>
export default {
name: 'recommendDaren',
data () {
return {
}
},
props:["item"],
created(){
console.log(this.item)
},
methods: {
/**
* 点击跳转
* @param {object} item [数据对象]
*/
userJump(item) {
this.$emit("userJump", item);
},
/**
* 关注达人
* @param {object} item [数据对象]
*/
fansShop(item) {
this.$emit("fansShop", item);
},
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style rel="stylesheet/less" lang="less" scoped>
@import "shopDarenHot";
</style>