更改寺庙列表导航和定位
This commit is contained in:
@@ -3,8 +3,10 @@
|
||||
<img :src="data.picture" alt="">
|
||||
<div class="info">
|
||||
<span class="name">{{data.unit_name}}</span>
|
||||
<span class="visitor">{{data.visit}} 人到访</span>
|
||||
<span class="iconfont icon-dingwei"></span>
|
||||
<span class="location" @click.stop="onLocationTo">
|
||||
<span class="visitor">{{data.visit}} 人到访</span>
|
||||
<span class="iconfont icon-dingwei" ></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -17,9 +19,9 @@ export default {
|
||||
type: Object,
|
||||
default(){
|
||||
return {
|
||||
picture: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg8.zol.com.cn%2Fbbs%2Fupload%2F24237%2F24236884.jpg&refer=http%3A%2F%2Fimg8.zol.com.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1638518604&t=074af50479ac14ca13fc6616380fe0f5',
|
||||
unit_name: '重庆石林寺',
|
||||
visit: 100
|
||||
picture: '',
|
||||
unit_name: '',
|
||||
visit: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,6 +29,9 @@ export default {
|
||||
methods: {
|
||||
onTo(){
|
||||
this.$router.push({ name: 'temple-home', query: { temple_id: this.data.id }})
|
||||
},
|
||||
onLocationTo(){
|
||||
this.$emit('location-to', this.data)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -44,26 +49,35 @@ export default {
|
||||
img{
|
||||
height: 4rem;
|
||||
width: 100%;
|
||||
vertical-align: top;
|
||||
}
|
||||
.info{
|
||||
display: flex;
|
||||
height: 1.07rem;
|
||||
align-items: center;
|
||||
padding: 0 .4rem;
|
||||
padding: .4rem .4rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.name{
|
||||
font-size: .37rem;
|
||||
flex: 1;
|
||||
}
|
||||
.visitor{
|
||||
font-size: .3rem;
|
||||
color: #666;
|
||||
margin-right: .4rem;
|
||||
}
|
||||
.iconfont{
|
||||
font-size: .4rem;
|
||||
padding: 0;
|
||||
color: rgb(60, 202, 60);
|
||||
}
|
||||
|
||||
.location{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.visitor{
|
||||
font-size: .3rem;
|
||||
color: #666;
|
||||
margin-right: .1rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.iconfont{
|
||||
font-size: .4rem;
|
||||
|
||||
padding: 0;
|
||||
color: rgb(60, 202, 60);
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -50,6 +50,7 @@ export default {
|
||||
vertical-align: top;
|
||||
display: inline-block;
|
||||
margin-right: .4rem;
|
||||
line-height: 1.3;
|
||||
}
|
||||
span:last-child {
|
||||
font-size: 0.32rem;
|
||||
|
||||
Reference in New Issue
Block a user