Commit 12f399d4 authored by yaya's avatar yaya

feat: UI优化

parent 1cfef73a
......@@ -5,6 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="referrer" content="no-referrer" />
<title>泉库管理后台</title>
</head>
<body>
......
......@@ -25,7 +25,17 @@
highlight-current-row>
<el-table-column align="center" label="排行" width="100px" type="index" />
<el-table-column align="center" label="笔记信息" prop="title" />
<el-table-column align="center" min-width="250px" label="笔记信息" class-name="small-padding fixed-width">
<template slot-scope="scope">
<div class="info" style="display: flex;" @click="handlerJumpDetail(scope.row.sourceUrl)">
<img :src="scope.row.img" class="info_image" style="width: 40px; height: 40px;margin-right: 10px">
<div class="info_content" style="display: flex;flex-direction: column;align-items: start; justify-content: start">
<div>{{ scope.row.title || '-' }}</div>
<div>{{ scope.row.noteTime || '-' }}</div>
</div>
</div>
</template>
</el-table-column>
<el-table-column align="center" label="累计出现次数" prop="num" sortable />
......@@ -119,7 +129,6 @@ export default {
.then(res => {
console.log('===类目列表', res.data)
this.categoryList = res.data.data
debugger
if (this.categoryList && this.categoryList.length > 0) {
this.listQuery.category = this.categoryList[0].name
}
......@@ -155,6 +164,11 @@ export default {
}).catch((e) => {
this.listLoading = false
})
},
handlerJumpDetail(jumpUrl) {
if (jumpUrl) {
window.open(jumpUrl, '_blank')
}
}
}
}
......
......@@ -26,8 +26,17 @@
fit
highlight-current-row>
<el-table-column align="center" label="排行" width="100px" type="index" />
<el-table-column align="center" label="笔记信息" prop="title" />
<el-table-column align="center" min-width="250px" label="笔记信息" class-name="small-padding fixed-width">
<template slot-scope="scope">
<div class="info" style="display: flex;" @click="handlerJumpDetail(scope.row.sourceUrl)">
<img :src="scope.row.img" class="info_image" style="width: 40px; height: 40px;margin-right: 10px">
<div class="info_content" style="display: flex;flex-direction: column;align-items: start; justify-content: start">
<div>{{ scope.row.title || '-' }}</div>
<div>{{ scope.row.noteTime || '-' }}</div>
</div>
</div>
</template>
</el-table-column>
<el-table-column align="center" label="点赞数" prop="differLikedNum" sortable />
......@@ -128,7 +137,6 @@ export default {
.then(res => {
console.log('===类目列表', res.data)
this.categoryList = res.data.data
debugger
if (this.categoryList && this.categoryList.length > 0) {
this.listQuery.category = this.categoryList[0].name
}
......@@ -158,6 +166,11 @@ export default {
}).catch((e) => {
this.listLoading = false
})
},
handlerJumpDetail(jumpUrl) {
if (jumpUrl) {
window.open(jumpUrl, '_blank')
}
}
}
}
......@@ -205,6 +218,15 @@ export default {
}
}
.info {
display: flex;
flex-direction: row;
}
.info_image {
width: 40px;
height: 40px;
display: block;
}
}
</style>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment