构建版本修改
This commit is contained in:
156
components/layout/AiDvSummary/components/Summary2.vue
Normal file
156
components/layout/AiDvSummary/components/Summary2.vue
Normal file
@@ -0,0 +1,156 @@
|
||||
<template>
|
||||
<div class="summary2">
|
||||
<div class="summary2-title">{{ summaryTitle }}</div>
|
||||
<div class="summary2-item" v-for="(item, index) in data" :key="index" v-show="index < 2">
|
||||
<h2>{{ item[value] }}</h2>
|
||||
<p>{{ item[keys] }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'summary2',
|
||||
|
||||
props: {
|
||||
data: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
|
||||
summaryTitle: {
|
||||
type: String,
|
||||
default: '居民上报统计'
|
||||
},
|
||||
|
||||
keys: {
|
||||
type: String,
|
||||
default: 'key'
|
||||
},
|
||||
|
||||
value: {
|
||||
type: String,
|
||||
default: 'value'
|
||||
}
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.summary2 {
|
||||
display: flex;
|
||||
position: relative;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 800px;
|
||||
height: 180px;
|
||||
padding: 0 90px;
|
||||
box-sizing: border-box;
|
||||
background: url(./../asset/summary1-bg.svg) center;
|
||||
background-size: 800px 180px;
|
||||
|
||||
.summary2-title {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
z-index: 1;
|
||||
font-size: 28px;
|
||||
background-image: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(161, 228, 255, 1) 100% );
|
||||
text-shadow: 0px 4px 20px rgb(52, 95, 255);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
&:after {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: -20px;
|
||||
z-index: 1;
|
||||
width: 35px;
|
||||
height: 22px;
|
||||
content: '';
|
||||
background: url(./../asset/jt.svg) center;
|
||||
background-size: 40px 112px;
|
||||
transform: translate(-100%, -50%);
|
||||
}
|
||||
|
||||
&::before {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: -20px;
|
||||
z-index: 1;
|
||||
width: 35px;
|
||||
height: 22px;
|
||||
content: '';
|
||||
background: url(./../asset/jt.svg) center;
|
||||
background-size: 40px 112px;
|
||||
transform: translate(100%, -50%) rotate(180deg);
|
||||
}
|
||||
}
|
||||
|
||||
&:after {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
width: 40px;
|
||||
height: 112px;
|
||||
content: '';
|
||||
background: url(./../asset/top.svg) center;
|
||||
background-size: 40px 112px;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
&::before {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
width: 40px;
|
||||
height: 112px;
|
||||
content: '';
|
||||
background: url(./../asset/top.svg) center;
|
||||
background-size: 40px 112px;
|
||||
transform: translateY(-50%) rotate(180deg);
|
||||
}
|
||||
|
||||
div {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.summary2-item {
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
width: 195px;
|
||||
height: 180px;
|
||||
line-height: 1;
|
||||
padding-top: 58px;
|
||||
|
||||
h2 {
|
||||
color: #fff;
|
||||
font-size: 40px;
|
||||
font-weight: bold;
|
||||
background-image: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 253, 243, 1) 36%, rgba(255, 203, 101, 1) 100% );
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 14px;
|
||||
color: #8BCCFF;
|
||||
background-image: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 253, 243, 1) 36%, rgba(255, 203, 101, 1) 100% );
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user