|
|
|
@ -4,11 +4,18 @@ |
|
|
|
<span class="fs22" :style="{ color: `${color}`}">{{ title }}</span> |
|
|
|
<span class="today" :style="{ color: `${color}`,borderColor:`${todayColor}`}">今日</span> |
|
|
|
</div> |
|
|
|
<div class="nums" :style="{ color: `${color}`}">{{ cardData.nums }}</div> |
|
|
|
<div class="middle"> |
|
|
|
<img class="middle_icon" :src="`${iconurl}`" /> |
|
|
|
<span class="nums" :style="{ color: `${color}`}">{{ cardData.nums }}</span> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="line"></div> |
|
|
|
<div class="footer"> |
|
|
|
<div class="item"> |
|
|
|
<div class="precent"> |
|
|
|
<span> |
|
|
|
周环比 |
|
|
|
</span> |
|
|
|
<div class="precent"> |
|
|
|
<span |
|
|
|
class="precent" |
|
|
|
:class="{ |
|
|
|
@ -18,8 +25,8 @@ |
|
|
|
> |
|
|
|
{{ cardData.precent || 0 }}% |
|
|
|
</span> |
|
|
|
<span v-if="cardData.precent > 0" class="triangle up"></span> |
|
|
|
<span v-if="cardData.precent < 0" class="triangle down"></span> |
|
|
|
<span v-if="cardData.precent > 0" class="arrow triangle up"></span> |
|
|
|
<span v-if="cardData.precent < 0" class="arrow triangle down"></span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="item"> |
|
|
|
@ -61,6 +68,10 @@ export default { |
|
|
|
type: String, |
|
|
|
default: null |
|
|
|
}, |
|
|
|
iconurl: { |
|
|
|
type: String, |
|
|
|
default: null |
|
|
|
}, |
|
|
|
backgroundColor: { |
|
|
|
type: String, |
|
|
|
default: null |
|
|
|
@ -78,51 +89,81 @@ export default { |
|
|
|
|
|
|
|
<style lang="scss"> |
|
|
|
.homeCardComponent{ |
|
|
|
padding: 15px; |
|
|
|
padding-top: 30px; |
|
|
|
padding-bottom: 20px; |
|
|
|
display: inline-flex; |
|
|
|
flex-direction: column; |
|
|
|
min-width: 200px; |
|
|
|
min-height: 200px; |
|
|
|
border-radius: 16px; |
|
|
|
border-radius: 10px; |
|
|
|
background-color: #FFF; |
|
|
|
.top{ |
|
|
|
font-size: 22px; |
|
|
|
margin: 12px 0 12px 12px; |
|
|
|
font-size: 16px; |
|
|
|
display: flex; |
|
|
|
margin-left: 20px; |
|
|
|
margin-right: 20px; |
|
|
|
justify-content: space-between; |
|
|
|
align-items: center; |
|
|
|
.fs22{ |
|
|
|
font-size: 16px; |
|
|
|
color:#475262; |
|
|
|
} |
|
|
|
.today{ |
|
|
|
font-size: 14px; |
|
|
|
padding: 8px 16px; |
|
|
|
padding: 3px 5px; |
|
|
|
border: 1px solid; |
|
|
|
border-radius: 4px; |
|
|
|
line-height: 15px; |
|
|
|
} |
|
|
|
} |
|
|
|
.middle{ |
|
|
|
line-height: 56px; |
|
|
|
margin-top: 25px; |
|
|
|
margin-bottom: 25px; |
|
|
|
margin-left: 20px; |
|
|
|
margin-right: 20px; |
|
|
|
height: 56px; |
|
|
|
|
|
|
|
.middle_icon{ |
|
|
|
width: 56px; |
|
|
|
height: 56px; |
|
|
|
} |
|
|
|
.nums{ |
|
|
|
margin: 8px; |
|
|
|
font-size: 48px; |
|
|
|
margin-left: 8px; |
|
|
|
margin-right: 8px; |
|
|
|
margin-top: auto; |
|
|
|
margin-bottom: auto; |
|
|
|
position: absolute; |
|
|
|
font-size: 36px; |
|
|
|
font-weight:bold; |
|
|
|
} |
|
|
|
} |
|
|
|
.line{ |
|
|
|
height: 1px; |
|
|
|
background-color: rgba(83, 83, 83, 0.1); |
|
|
|
|
|
|
|
} |
|
|
|
.footer{ |
|
|
|
height: 115px; |
|
|
|
font-size: 16px; |
|
|
|
padding: 12px 0; |
|
|
|
height: 57px; |
|
|
|
font-size: 14px; |
|
|
|
margin-left: 20px; |
|
|
|
margin-right: 20px; |
|
|
|
color: #828C9A; |
|
|
|
border-radius: 8px; |
|
|
|
background-color: rgba($color: #FFF, $alpha: .8); |
|
|
|
box-shadow: 0px 10px 20px 1px rgba(27, 85, 175, 0.05000000074505806); |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
justify-content: space-around; |
|
|
|
justify-content: space-between; |
|
|
|
align-items: center; |
|
|
|
.item{ |
|
|
|
margin: 0 12px; |
|
|
|
// line-height: 40px; |
|
|
|
display: flex; |
|
|
|
justify-content: space-between; |
|
|
|
align-items: center; |
|
|
|
color: #333; |
|
|
|
flex-flow: column; |
|
|
|
justify-content: center; |
|
|
|
align-items: flex-start; |
|
|
|
// opacity: .5; |
|
|
|
.precent{ |
|
|
|
$red: #D04A41; |
|
|
|
$green: #427A0A; |
|
|
|
span{ |
|
|
|
margin-top: 3px; |
|
|
|
.arrow{ |
|
|
|
margin-left: 18px; |
|
|
|
// opacity: 1; |
|
|
|
} |
|
|
|
|