新增点击文字标题预览文章功能

pull/34/head
guqing 2019-07-03 15:56:12 +08:00
parent 26ac96322b
commit a784533d56
1 changed files with 30 additions and 3 deletions

View File

@ -128,12 +128,27 @@
:loading="postsLoading" :loading="postsLoading"
:pagination="false" :pagination="false"
> >
<ellipsis <!-- ellipsis内嵌a标签后文本会被置空
<ellipsis
:length="25" :length="25"
tooltip tooltip
slot="postTitle" slot="postTitle"
slot-scope="postTitle" slot-scope="text,record"
>{{ postTitle }}</ellipsis> >
{{ text }}
</ellipsis> -->
<span
slot="postTitle"
slot-scope="text,record"
class="post-title"
>
<a
:href="options.blog_url+'/archives/'+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"
@ -639,3 +654,15 @@ export default {
} }
} }
</script> </script>
<style scoped>
a {
text-decoration: none;
}
.post-title {
width: 100px;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>