第一次提交
This commit is contained in:
57
components/stationItem/index.scss
Normal file
57
components/stationItem/index.scss
Normal file
@@ -0,0 +1,57 @@
|
||||
.site-list-item {
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 95%;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 2rpx 6rpx 2rpx rgba(191, 191, 191, 0.18);
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
opacity: 1;
|
||||
margin: 0 auto;
|
||||
margin-top: 30rpx;
|
||||
.look{
|
||||
padding: 10rpx 30rpx;
|
||||
background: #F83D3D;
|
||||
border-radius: 56rpx 56rpx 56rpx 56rpx;
|
||||
opacity: 1;
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.site-list-item-left {
|
||||
flex-shrink: 0;
|
||||
width: 125rpx;
|
||||
height: 125rpx;
|
||||
background: #F9F9F9;
|
||||
border-radius: 2rpx 2rpx 2rpx 2rpx;
|
||||
opacity: 1;
|
||||
margin-right: 15rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.site-list-item-right {
|
||||
overflow: hidden;
|
||||
flex: 1;
|
||||
|
||||
.name {
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.distance {
|
||||
color: #000000;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.address {
|
||||
color: #666666;
|
||||
font-size: 26rpx;
|
||||
width: 100%;
|
||||
margin: 10rpx 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
44
components/stationItem/stationItem.vue
Normal file
44
components/stationItem/stationItem.vue
Normal file
@@ -0,0 +1,44 @@
|
||||
<template>
|
||||
<view class="site-list-item flex ">
|
||||
<view class="site-list-item-left">
|
||||
<image v-if="item.siteImages" mode="widthFix" :src="item.siteImages"></image>
|
||||
</view>
|
||||
<view class="site-list-item-right">
|
||||
<view class="name">{{item.siteName}}</view>
|
||||
<view class="address textov">{{item.address}}</view>
|
||||
<view style="margin-top: 15rpx;" class="flex jw ac">
|
||||
<view class="distance">距离:{{ Number(item.juli / 1000).toFixed(2) }}KM</view>
|
||||
<slot name="button">
|
||||
<view @click="$emit('stationClick',item)" class="look"> 立即查看</view>
|
||||
</slot>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "stationItem",
|
||||
props: {
|
||||
item: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import 'index.scss';
|
||||
</style>
|
||||
Reference in New Issue
Block a user