自定义页面新增点击标题预览功能

pull/34/head
guqing 2019-07-03 17:23:32 +08:00
parent 99ab0dfa06
commit 4b441e5b87
3 changed files with 31 additions and 3 deletions

View File

@ -508,4 +508,7 @@ export default {
margin-left: 15px;
text-decoration: none;
}
a {
text-decoration: none;
}
</style>

View File

@ -659,7 +659,7 @@ a {
text-decoration: none;
}
.post-title {
width: 100px;
max-width: 100px;
display: block;
white-space: nowrap;
overflow: hidden;

View File

@ -96,6 +96,18 @@
:dataSource="formattedSheets"
:pagination="false"
>
<span
slot="sheetTitle"
slot-scope="text,record"
class="sheet-title"
>
<a
:href="options.blog_url+'/s/'+record.url"
target="_blank"
>
<a-tooltip placement="topLeft" :title="'点击预览 '+text">{{ text }}</a-tooltip>
</a>
</span>
<span
slot="status"
slot-scope="statusProperty"
@ -103,7 +115,6 @@
<a-badge :status="statusProperty.status" />
{{ statusProperty.text }}
</span>
<span
slot="updateTime"
slot-scope="updateTime"
@ -189,7 +200,8 @@ const internalColumns = [
const customColumns = [
{
title: '标题',
dataIndex: 'title'
dataIndex: 'title',
scopedSlots: { customRender: 'sheetTitle' }
},
{
title: '状态',
@ -276,3 +288,16 @@ export default {
}
}
</script>
<style scoped>
a{
text-decoration: none;
}
.sheet-title{
max-width: 300px;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>