mirror of https://github.com/halo-dev/halo-admin
				
				
				
			自定义页面新增点击标题预览功能
							parent
							
								
									99ab0dfa06
								
							
						
					
					
						commit
						4b441e5b87
					
				| 
						 | 
				
			
			@ -508,4 +508,7 @@ export default {
 | 
			
		|||
		margin-left: 15px;
 | 
			
		||||
		text-decoration: none;
 | 
			
		||||
	}
 | 
			
		||||
  a {
 | 
			
		||||
    text-decoration: none;
 | 
			
		||||
  }
 | 
			
		||||
</style>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -659,7 +659,7 @@ a {
 | 
			
		|||
  text-decoration: none;
 | 
			
		||||
}
 | 
			
		||||
.post-title {
 | 
			
		||||
  width: 100px;
 | 
			
		||||
  max-width: 100px;
 | 
			
		||||
  display: block;
 | 
			
		||||
  white-space: nowrap;
 | 
			
		||||
  overflow: hidden;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue