2025-03-14 17:52:05 +08:00
|
|
|
<template>
|
2025-03-17 17:34:32 +08:00
|
|
|
<div class="demo roll-list" style="height: 90%">
|
2025-03-14 17:52:05 +08:00
|
|
|
<vue3ScrollSeamless class="scroll-wrap" :classOptions="classOptions" :dataList="list">
|
|
|
|
<div v-for="(item, index) in items" :key="index" class="list-item">
|
|
|
|
<div class="list-item-content">
|
2025-03-17 17:34:32 +08:00
|
|
|
<div class="list-item-l">
|
|
|
|
<div class="item-top">
|
|
|
|
<span class="label"> {{ item.title || '--' }}</span>
|
|
|
|
<span class="value"> {{ item.value || '0' }}</span>
|
|
|
|
</div>
|
|
|
|
<el-progress :percentage="50" :show-text="false" :stroke-width="3" color="#6cd1f9" />
|
|
|
|
</div>
|
2025-03-14 17:52:05 +08:00
|
|
|
<div class="list-item-r">
|
|
|
|
{{ '0' + (index + 1) }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</vue3ScrollSeamless>
|
|
|
|
</div>
|
|
|
|
<!-- </div> -->
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { ref, onMounted, onUnmounted, computed, reactive } from 'vue';
|
|
|
|
import { vue3ScrollSeamless } from 'vue3-scroll-seamless';
|
|
|
|
const props = defineProps({
|
|
|
|
items: {
|
|
|
|
type: Array,
|
|
|
|
default: () => [],
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
let list = reactive(props.items);
|
|
|
|
|
|
|
|
const classOptions = {
|
|
|
|
singleHeight: 48,
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
2025-03-17 17:34:32 +08:00
|
|
|
.roll-list {
|
|
|
|
.scroll-wrap {
|
|
|
|
height: 80%;
|
2025-03-14 17:52:05 +08:00
|
|
|
width: 100%;
|
2025-03-17 17:34:32 +08:00
|
|
|
margin: 0 auto;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.list-item {
|
|
|
|
// border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
|
|
|
|
line-height: 36px;
|
|
|
|
.list-item-content {
|
|
|
|
display: inline-flex;
|
|
|
|
width: 100%;
|
|
|
|
justify-content: space-around;
|
|
|
|
position: relative;
|
|
|
|
.list-item-l,
|
|
|
|
.list-item-r {
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
.list-item-l {
|
|
|
|
width: calc(100% - 0px);
|
|
|
|
.item-top {
|
|
|
|
width: 100%;
|
|
|
|
line-height: 16px;
|
|
|
|
.label,
|
|
|
|
.value {
|
|
|
|
display: inline-block;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
.label {
|
|
|
|
font-size: 12px;
|
|
|
|
}
|
|
|
|
.value {
|
|
|
|
font-size: 10px;
|
|
|
|
color: #6cd1f9;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.list-item-r {
|
|
|
|
text-align: right;
|
|
|
|
font-size: 20px;
|
|
|
|
font-weight: bold;
|
|
|
|
color: #6cd1f9;
|
|
|
|
position: absolute;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
}
|
2025-03-14 17:52:05 +08:00
|
|
|
}
|
|
|
|
}
|
2025-03-17 17:34:32 +08:00
|
|
|
.ui-wrap {
|
|
|
|
list-style: none;
|
|
|
|
padding: 0;
|
|
|
|
margin: 0 auto;
|
|
|
|
}
|
|
|
|
.li-item {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
width: 100%;
|
|
|
|
text-align: center;
|
|
|
|
}
|
2025-03-14 17:52:05 +08:00
|
|
|
}
|
2025-03-17 17:34:32 +08:00
|
|
|
.demo {
|
2025-03-14 17:52:05 +08:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2025-03-17 17:34:32 +08:00
|
|
|
justify-content: center;
|
|
|
|
margin-top: 10px;
|
2025-03-14 17:52:05 +08:00
|
|
|
}
|
|
|
|
</style>
|