8 changed files with 135 additions and 96 deletions
-
BINsrc/assets/font/PangMenZhengDaoBiaoTiTiMianFeiBan-2.ttf
-
BINsrc/assets/images/dashboard/bg.png
-
BINsrc/assets/images/dashboard/item/0.png
-
BINsrc/assets/images/dashboard/item/1.png
-
5src/styles/base/base.less
-
42src/views/dashboard/common/model.ts
-
64src/views/dashboard/comp/item.vue
-
120src/views/dashboard/main.vue
|
After Width: 1920 | Height: 1080 | Size: 410 KiB |
|
After Width: 158 | Height: 160 | Size: 27 KiB |
|
After Width: 158 | Height: 160 | Size: 27 KiB |
@ -0,0 +1,64 @@ |
|||||
|
<template> |
||||
|
<div class="item-container"> |
||||
|
<div class="wrapper" v-for="(val, index) in item.data || []" :key="index"> |
||||
|
<img :src="$util.getImg('/src/assets/images/dashboard/item/' + index + '.png')" alt="" /> |
||||
|
<div class="main"> |
||||
|
<div class="title">{{ `${val.label}(${val.unit})` }}</div> |
||||
|
<div class="value">{{ val.value }}</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts"> |
||||
|
import { computed, defineComponent, nextTick, onMounted, reactive, toRefs } from 'vue'; |
||||
|
import { IObject } from '@/types/interface'; |
||||
|
import utilService from '@/service/utilService'; |
||||
|
export default defineComponent({ |
||||
|
name: 'item', |
||||
|
props: { item: { type: Object, default: () => ({}) }, dataForm: { type: Object, default: () => ({}) }, sizeType: { type: String, default: () => '1' } }, |
||||
|
setup(props) { |
||||
|
const state = reactive({}); |
||||
|
|
||||
|
return { |
||||
|
...toRefs(state), |
||||
|
}; |
||||
|
}, |
||||
|
}); |
||||
|
</script> |
||||
|
|
||||
|
<style scoped lang="less"> |
||||
|
.item-container { |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
padding-left: 16px; |
||||
|
// align-items: center; |
||||
|
> .wrapper { |
||||
|
display: flex; |
||||
|
flex: 1; |
||||
|
> img { |
||||
|
//width: 158px; |
||||
|
height: 120px; |
||||
|
} |
||||
|
> .main { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
justify-content: center; |
||||
|
|
||||
|
> .title { |
||||
|
font-size: 16px; |
||||
|
color: #fff; |
||||
|
} |
||||
|
> .value { |
||||
|
font-family: 'pmzt'; |
||||
|
background: linear-gradient(0deg, #1bc0fd 0%, #1eeaf1 100%); |
||||
|
font-size: 31px; |
||||
|
-webkit-background-clip: text; |
||||
|
-webkit-text-fill-color: transparent; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue