Commit d5a92f76 by 李伟康

3.19.0需求

1 parent ef22b7fe
...@@ -41,7 +41,9 @@ ...@@ -41,7 +41,9 @@
></div> ></div>
</div> </div>
</div> </div>
<div class="content"> <!-- <div class="content"> -->
<el-scrollbar class="content">
<template v-if="c.list.length"> <template v-if="c.list.length">
<template v-for="(item,ind) in c.list"> <template v-for="(item,ind) in c.list">
<template> <template>
...@@ -73,10 +75,11 @@ ...@@ -73,10 +75,11 @@
</template> </template>
<template v-else> <template v-else>
<div class="nothing"> <div class="nothing">
<img src="@/assets/icon/nodata.png" > <img src="@/assets/icon/nodata.png">
</div> </div>
</template> </template>
</div> </el-scrollbar>
<!-- </div> -->
</div> </div>
</template> </template>
</template> </template>
...@@ -84,6 +87,7 @@ ...@@ -84,6 +87,7 @@
</template> </template>
</template> </template>
</el-carousel> </el-carousel>
<template v-if="viewList.length">
<div <div
class="arrow left" class="arrow left"
@click="$refs.carousel.prev()" @click="$refs.carousel.prev()"
...@@ -96,6 +100,7 @@ ...@@ -96,6 +100,7 @@
> >
<img :src="viewIndex < viewList.length - 1 ?rightActiveIcon:rightIcon" /> <img :src="viewIndex < viewList.length - 1 ?rightActiveIcon:rightIcon" />
</div> </div>
</template>
</div> </div>
</div> </div>
</template> </template>
...@@ -131,54 +136,56 @@ export default { ...@@ -131,54 +136,56 @@ export default {
console.log(JSON.parse(JSON.stringify(params))) console.log(JSON.parse(JSON.stringify(params)))
this.dataViewLoading = true this.dataViewLoading = true
setTimeout(() => { setTimeout(() => {
this.viewList = [ let arr = [
[{ {
title: '待跟进', title: '待跟进',
list: new Array(8).fill({}), list: new Array(8).fill({}),
width: '12.5%'
}, },
{ {
title: '已成交', title: '已成交',
list: new Array(15).fill({}), list: new Array(15).fill({}),
width: '25%'
}, },
{ {
title: '有意向', title: '有意向',
list: [], list: [],
width: '37.5%'
}, },
{ {
title: '已报价', title: '已报价',
list: new Array(5).fill({}), list: new Array(5).fill({}),
width: '50%'
}, },
],
[
{ {
title: '小熊猫', title: '小熊猫',
list: new Array(115).fill({}), list: new Array(115).fill({}),
width: '62.5%'
}, },
{ {
title: '啊啊啊', title: '啊啊啊',
list: new Array(11).fill({}), list: new Array(11).fill({}),
width: '75%'
}, },
{ {
title: '恒河猴', title: '恒河猴',
list: new Array(16).fill({}), list: new Array(16).fill({}),
width: '87.5%'
}, },
{ // {
title: '嘻嘻嘻', // title: '嘻嘻嘻',
list: new Array(3).fill({}), // list: new Array(3).fill({}),
width: '100%' // }
}]
] ]
function splitArrayIntoChunks (arr, chunkSize) {
const weight = 1 / arr.length
return arr.reduce((result, item, index) => {
const chunkIndex = Math.floor(index / chunkSize)
item.width = `${(weight * index + weight) * 100}%`
result[chunkIndex] = result[chunkIndex] || []
result[chunkIndex].push(item)
return result
}, [])
}
this.viewList = splitArrayIntoChunks(arr, 4)
this.dataViewLoading = false this.dataViewLoading = false
}, 2e3) }, 2e3)
}, },
...@@ -208,8 +215,7 @@ export default { ...@@ -208,8 +215,7 @@ export default {
display: flex; display: flex;
gap: 8px; gap: 8px;
.group { .group {
flex: 1; width: 25%;
// min-width: 280px;
height: 100%; height: 100%;
background: #f9f9fe; background: #f9f9fe;
border-radius: 4px; border-radius: 4px;
...@@ -248,10 +254,17 @@ export default { ...@@ -248,10 +254,17 @@ export default {
box-sizing: border-box; box-sizing: border-box;
padding: 16px 16px 8px; padding: 16px 16px 8px;
position: relative; position: relative;
/deep/.el-scrollbar__wrap{
&::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
}
&::-webkit-scrollbar { &::-webkit-scrollbar {
// width: 0; width: 0;
// height: 0; height: 0;
// color: transparent; color: transparent;
} }
.item { .item {
height: 91px; height: 91px;
...@@ -293,11 +306,11 @@ export default { ...@@ -293,11 +306,11 @@ export default {
} }
} }
} }
.nothing{ .nothing {
position: absolute; position: absolute;
left: 50%; left: 50%;
top: 50%; top: 50%;
transform: translate(-50%,-50%); transform: translate(-50%, -50%);
width: 270px; width: 270px;
height: 112px; height: 112px;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!