File tree Expand file tree Collapse file tree 1 file changed +35
-11
lines changed Expand file tree Collapse file tree 1 file changed +35
-11
lines changed Original file line number Diff line number Diff line change 14
14
<template v-else >
15
15
<a-card :hoverable =" true" >
16
16
<a-card-meta >
17
- <div style = " margin-bottom : 3 px " slot =" title" >{{ item.title }}</div >
17
+ <a slot =" title" >{{ item.title }}</a >
18
18
<a-avatar class =" card-avatar" slot =" avatar" :src =" item.avatar" size =" large" />
19
19
<div class =" meta-content" slot =" description" >{{ item.content }}</div >
20
20
</a-card-meta >
@@ -59,6 +59,38 @@ export default {
59
59
</script >
60
60
61
61
<style lang="less" scoped>
62
+ @import " ~@/components/index.less" ;
63
+
64
+ .card-list {
65
+ / deep/ .ant-card-body :hover {
66
+ .ant-card-meta-title > a {
67
+ color : @primary-color ;
68
+ }
69
+ }
70
+
71
+ / deep/ .ant-card-meta-title {
72
+ margin-bottom : 12px ;
73
+
74
+ & > a {
75
+ display : inline-block ;
76
+ max-width : 100% ;
77
+ color : rgba (0 ,0 ,0 ,.85 );
78
+ }
79
+ }
80
+
81
+ / deep/ .meta-content {
82
+ position : relative ;
83
+ overflow : hidden ;
84
+ text-overflow : ellipsis ;
85
+ display : -webkit-box ;
86
+ height : 64px ;
87
+ -webkit-line-clamp : 3 ;
88
+ -webkit-box-orient : vertical ;
89
+
90
+ margin-bottom : 1em ;
91
+ }
92
+ }
93
+
62
94
.card-avatar {
63
95
width : 48px ;
64
96
height : 48px ;
@@ -67,6 +99,7 @@ export default {
67
99
68
100
.ant-card-actions {
69
101
background : #f7f9fa ;
102
+
70
103
li {
71
104
float : left ;
72
105
text-align : center ;
@@ -84,7 +117,7 @@ export default {
84
117
display : inline-block ;
85
118
width : 100% ;
86
119
& :hover {
87
- color : #1890ff ;
120
+ color : @primary-color ;
88
121
}
89
122
}
90
123
}
@@ -97,13 +130,4 @@ export default {
97
130
height : 188px ;
98
131
}
99
132
100
- .meta-content {
101
- position : relative ;
102
- overflow : hidden ;
103
- text-overflow : ellipsis ;
104
- display : -webkit-box ;
105
- height : 64px ;
106
- -webkit-line-clamp : 3 ;
107
- -webkit-box-orient : vertical ;
108
- }
109
133
</style >
You can’t perform that action at this time.
0 commit comments