提交 7be81feb 编写于 作者: huangwensu's avatar huangwensu

滚动条样式

上级 ebac1107
...@@ -56,7 +56,7 @@ import BreadCrumb from "@/components/breadcrumb.vue"; ...@@ -56,7 +56,7 @@ import BreadCrumb from "@/components/breadcrumb.vue";
import { doUpload, getFilePath } from "@/utils/qiniu-util"; import { doUpload, getFilePath } from "@/utils/qiniu-util";
import { openLoading, closeLoading, betaHandle, timeHandle } from "@/utils/utils"; import { openLoading, closeLoading, betaHandle, timeHandle } from "@/utils/utils";
import { getPicaKFAccid } from "@/utils"; import { getPicaKFAccid } from "@/utils";
import * as commonUtil from "@/utils/utils"; // import * as commonUtil from "@/utils/utils";
export default { export default {
components: { components: {
BreadCrumb BreadCrumb
...@@ -228,22 +228,27 @@ export default { ...@@ -228,22 +228,27 @@ export default {
} }
this.POST(url, req).then((res) => { this.POST(url, req).then((res) => {
if(res.code == '000000') { if(res.code == '000000') {
let arr = [], sortArr = [];
if(res.data.length > 0) { if(res.data.length > 0) {
this.historyTime = res.data[0].timestamp;
this.hasHistoryData = true; this.hasHistoryData = true;
let arr = res.data; this.historyTime = res.data[0].timestamp;
arr = this.dataconcatHandle(res.data.reverse());
this.detailData.unshift(...arr); this.detailData.unshift(...arr);
this.detailData = this.dataconcatHandle(this.detailData); let el = this.getElmByID('scroll-set');
setTimeout(() => { el.scrollTop = 500;
const scrollBoxDom = document.getElementById("scroll-set");
scrollBoxDom.scrollTop = 200;
},100);
}else { }else {
this.hasHistoryData = false; this.hasHistoryData = false;
} }
} }
}) })
}, },
// 按照时间大小排序
timeSort(arrList) {
arrList.sort((a, b) => {
return a.timestamp - b.timestamp;
});
return arrList
},
// 数据合并转换 // 数据合并转换
dataconcatHandle(data) { dataconcatHandle(data) {
let currentTaskId = ''; let currentTaskId = '';
...@@ -282,10 +287,11 @@ export default { ...@@ -282,10 +287,11 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.search-msg-detail { .search-msg-detail {
.detail-content { .detail-content {
margin: 80px 20px 0; margin: 80px 20px 0 20px;
padding: 0 20px; padding: 0 0px 0 20px;
background: #fff; background: #fff;
#scroll-set { #scroll-set {
overflow-x: hidden;
overflow: scroll; overflow: scroll;
} }
.split-line { .split-line {
...@@ -293,22 +299,22 @@ export default { ...@@ -293,22 +299,22 @@ export default {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
margin: 15px 0; // margin: 15px 0;
font-size: 14px; font-size: 14px;
color: #999999; color: #333;
&::before { &::before {
flex: 1; flex: 1;
content: ''; content: '';
height: 1px; height: 1px;
margin-right: 18px; margin-right: 18px;
background: #f0f1f2; background:#C7C8C9;
} }
&::after { &::after {
flex: 1; flex: 1;
content: ''; content: '';
height: 1px; height: 1px;
margin-left: 18px; margin-left: 18px;
background: #f0f1f2; background:#C7C8C9;
} }
} }
.msg-container { .msg-container {
...@@ -401,5 +407,13 @@ export default { ...@@ -401,5 +407,13 @@ export default {
border-top: 1px solid #F0F1F2; border-top: 1px solid #F0F1F2;
} }
} }
#scroll-set::-webkit-scrollbar {
width: 10px;
height: 5px;
background-color: #F0F1F2 !important;
}
#scroll-set::-webkit-scrollbar-thumb {
background-color: #F0F1F2 !important;
}
} }
</style> </style>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册