| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <template>
- <div class="basicCard">
- <div class="card-box" v-for="(item, index) in cardContentLists" :key="index">
- <img class="card-box-img" :src="item.imgSrc" alt="">
- <div class="card-box-item">
- <div class="item-labels">{{ item.label }}</div>
- <div class="item-vals">{{ item.val }}</div>
- </div>
- </div>
- </div>
- </template>
- <script setup lang="ts">
- import { ref, reactive,defineProps,watch } from 'vue'
- let props=defineProps({
- cardContentList:{
- type:Array,
- default:()=>{
- return []
- }
- }
- })
- let cardContentLists=ref<any[]>([])
- watch(()=>props.cardContentList,(newV,oldV)=>{
- console.log(newV,'工作面卡片-----')
- cardContentLists.value=newV
-
- },{immediate:true,deep:true})
- </script>
- <style lang="less" scoped>
- .basicCard {
- position: relative;
- width: 100%;
- height: 100%;
- display: flex;
- justify-content: space-between;
- align-items: center;
- background-color: rgba(41, 49, 53, .6);
- overflow-x: auto;
- .card-box {
- width: 416px;
- height: 100%;
- display: flex;
- justify-content: center;
- align-items: center;
- flex-shrink: 0;
- border-left: 2px solid;
- border-image: linear-gradient(to bottom, transparent, rgba(2, 70, 136, 1), transparent) 1 1 1;
- &:first-child {
- border: none;
- }
- .card-box-img {
- width: 94px;
- height: 94px;
- }
- .card-box-item {
- height: 94px;
- margin-left: 10px;
- display: flex;
- flex-direction: column;
- justify-content: space-around;
- .item-labels {
- color: #fff
- }
- .item-vals {
- font-family: 'douyuFont';
- font-size: 20px;
- color: #02bbe9;
- }
- }
- }
- }</style>
|