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

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; margin-left: 15px;
text-decoration: none; text-decoration: none;
} }
a {
text-decoration: none;
}
</style> </style>

View File

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

View File

@ -96,6 +96,18 @@
:dataSource="formattedSheets" :dataSource="formattedSheets"
:pagination="false" :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 <span
slot="status" slot="status"
slot-scope="statusProperty" slot-scope="statusProperty"
@ -103,7 +115,6 @@
<a-badge :status="statusProperty.status" /> <a-badge :status="statusProperty.status" />
{{ statusProperty.text }} {{ statusProperty.text }}
</span> </span>
<span <span
slot="updateTime" slot="updateTime"
slot-scope="updateTime" slot-scope="updateTime"
@ -189,7 +200,8 @@ const internalColumns = [
const customColumns = [ const customColumns = [
{ {
title: '标题', title: '标题',
dataIndex: 'title' dataIndex: 'title',
scopedSlots: { customRender: 'sheetTitle' }
}, },
{ {
title: '状态', title: '状态',
@ -276,3 +288,16 @@ export default {
} }
} }
</script> </script>
<style scoped>
a{
text-decoration: none;
}
.sheet-title{
max-width: 300px;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>