提交 8dbcddb0 authored 作者: lihuihui's avatar lihuihui

修改样式

上级 1636db12
......@@ -301,8 +301,28 @@ export default {
overflow-y: scroll;
padding: 0 20px;
box-sizing: border-box;
// &::-webkit-scrollbar{
// display:none;
// }
&::-webkit-scrollbar{
display:none;
width: 4px;
height: 4px;
}
&::-webkit-scrollbar-button{
width: 0;
height: 0;
}
&::-webkit-scrollbar-track{
}
&::-webkit-scrollbar-thumb{
border-radius: 8px;
background-color: rgba(0, 203, 255, .5);
}
&::-webkit-scrollbar-thumb:hover {
background-color: rgba(0, 203, 255, 1);
}
&::-webkit-scrollbar-thumb:active {
background-color: rgba(0, 203, 255, 1);
}
}
li{
......
......@@ -15,14 +15,15 @@
<p>学校名称</p>
<p>姓名</p>
<p>日期</p>
<p>分值</p>
<p v-if="selectValue == 11 || selectValue == 21 || selectValue == 31">次数</p>
<p v-else>分值</p>
</div>
<ul class="ranking-list">
<li v-for="item in list" :key="item.id">
<p>{{ item.rank }}</p>
<p>{{ item.school }}</p>
<p>{{ item.username }}</p>
<p>{{ item.date_index }}</p>
<p>{{ getNowTime(item.date_index) }}</p>
<p>{{ item.score }}</p>
</li>
</ul>
......@@ -41,6 +42,7 @@ export default {
return {
isSelectShow: false,
caseIndex: 0,
selectValue: 10,
caseData: [
{
name: '全局-分数',
......@@ -97,6 +99,21 @@ export default {
this.getRankingList()
},
methods: {
getNowTime(n) {
let dateTime = ''
const date = n > 1 ? new Date(n * 1000) : new Date()
const yy = date.getFullYear()
const mm = date.getMonth() + (n === 1 ? 0 : 1)
const dd = date.getDate()
const hh = date.getHours()
const mf = date.getMinutes()
const ss = date.getSeconds()
dateTime = this.toDo(yy) + '-' + this.toDo(mm) + '-' + this.toDo(dd) + ' ' + this.toDo(hh) + ':' + this.toDo(mf) + ':' + this.toDo(ss)
return dateTime
},
toDo(n) {
return n < 10 ? `0${n}` : n
},
getUserSchoolInfo() {
api
.getUserSchoolInfo()
......@@ -131,6 +148,7 @@ export default {
.finally(() => {})
},
tabCase(n, value, name) {
this.selectValue = value
this.title = name
this.caseIndex = n
this.isSelectShow = false
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论