|
@@ -11,7 +11,13 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="card-content-container" @click="onClickContent">
|
|
|
- <div class="card-content" :class="{ 'ellipsis inline': (!expand && overflowEllipsis) }">
|
|
|
+ <div
|
|
|
+ class="card-content"
|
|
|
+ :class="{
|
|
|
+ 'ellipsis inline': !expand && overflowEllipsis,
|
|
|
+ 'need-scroll': scroll
|
|
|
+ }"
|
|
|
+ >
|
|
|
<slot name="default"></slot>
|
|
|
</div>
|
|
|
<button class="expand-button" v-if="showExpandButton" @click.stop="changeExpandState">
|
|
@@ -49,6 +55,11 @@ export default {
|
|
|
type: Boolean,
|
|
|
default: true
|
|
|
},
|
|
|
+ // 是否需要滚动
|
|
|
+ scroll: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
+ },
|
|
|
/**
|
|
|
* 是否展示头部右侧箭头
|
|
|
*/
|
|
@@ -99,7 +110,7 @@ export default {
|
|
|
}
|
|
|
.card-content-container {
|
|
|
position: relative;
|
|
|
- padding: 8px 12px;
|
|
|
+ padding: 8px 0;
|
|
|
min-height: 40px;
|
|
|
line-height: 22px;
|
|
|
font-size: 13px;
|
|
@@ -121,7 +132,13 @@ export default {
|
|
|
border-radius: 4px;
|
|
|
z-index: 2;
|
|
|
}
|
|
|
-.card-content.inline > * {
|
|
|
- display: inline-block;
|
|
|
+.card-content {
|
|
|
+ &.need-scroll {
|
|
|
+ max-height: 320px;
|
|
|
+ overflow-y: auto;
|
|
|
+ }
|
|
|
+ &.inline > * {
|
|
|
+ display: inline-block;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|