组件— 卡片
基础用法
<el-card class="box-card">
 <div slot="header" class="clearfix">
  <span>卡片名称</span>
  <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>
 </div>
 <div v-for="o in 4" :key="o" class="text item">
  {{'列表内容 ' + o }}
 </div>
</el-card>
<style>
 .text {
  font-size: 14px;
 }
 .item {
  margin-bottom: 18px;
 }
 .clearfix:before,
 .clearfix:after {
  display: table;
  content: "";
 }
 .clearfix:after {
  clear: both
 }
 .box-card {
  width: 480px;
 }
</style>
简单卡片
<el-card class="box-card">
 <div v-for="o in 4" :key="o" class="text item">
  {{'列表内容 ' + o }}
 </div>
</el-card>
<style>
 .text {
  font-size: 14px;
 }
 .item {
  padding: 18px 0;
 }
 .box-card {
  width: 480px;
 }
</style>
带图片
<el-row>
 <el-col :span="8" v-for="(o, index) in 2" :key="o" :offset="index > 0 ">
  <el-card :body-style="{ padding: '0px' }">
   
   <div style="padding: 14px;">
    <span>好吃的汉堡</span>
    <div class="bottom clearfix">
     <time class="time">{{ currentDate }}</time>
     <el-button type="text" class="button">操作按钮</el-button>
    </div>
   </div>
  </el-card>
 </el-col>
</el-row>
<style>
 .time {
  font-size: 13px;
  color: #999;
 }
 
 .bottom {
  margin-top: 13px;
  line-height: 12px;
 }
 .button {
  padding: 0;
  float: right;
 }
 .image {
  width: 100%;
  display: block;
 }
 .clearfix:before,
 .clearfix:after {
   display: table;
   content: "";
 }
 
 .clearfix:after {
   clear: both
 }
</style>
<script>
export default {
 data() {
  return {
   currentDate: new Date()
  };
 }
}
</script>
卡片阴影
<el-row :gutter="12"> <el-col :span="8"> <el-card shadow="always"> 总是显示 </el-card> </el-col> <el-col :span="8"> <el-card shadow="hover"> 鼠标悬浮时显示 </el-card> </el-col> <el-col :span="8"> <el-card shadow="never"> 从不显示 </el-card> </el-col> </el-row>
Attributes:
  
    
      参数 
      类型 
      说明 
      可选值 
      默认值 
    
  
  
    
      header
      设置 header,也可以通过 slot#header 传入 DOM
      string
      —
      —
    
    
      body-style
      设置 body 的样式
      object
      —
      { padding: ‘20px' }
    
  
                                免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
                                如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
                            
                        暂无“Element Card 卡片的具体使用”评论...
                                    更新动态
2025年10月31日
                                2025年10月31日
                    - 小骆驼-《草原狼2(蓝光CD)》[原抓WAV+CUE]
- 群星《欢迎来到我身边 电影原声专辑》[320K/MP3][105.02MB]
- 群星《欢迎来到我身边 电影原声专辑》[FLAC/分轨][480.9MB]
- 雷婷《梦里蓝天HQⅡ》 2023头版限量编号低速原抓[WAV+CUE][463M]
- 群星《2024好听新歌42》AI调整音效【WAV分轨】
- 王思雨-《思念陪着鸿雁飞》WAV
- 王思雨《喜马拉雅HQ》头版限量编号[WAV+CUE]
- 李健《无时无刻》[WAV+CUE][590M]
- 陈奕迅《酝酿》[WAV分轨][502M]
- 卓依婷《化蝶》2CD[WAV+CUE][1.1G]
- 群星《吉他王(黑胶CD)》[WAV+CUE]
- 齐秦《穿乐(穿越)》[WAV+CUE]
- 发烧珍品《数位CD音响测试-动向效果(九)》【WAV+CUE】
- 邝美云《邝美云精装歌集》[DSF][1.6G]
- 吕方《爱一回伤一回》[WAV+CUE][454M]
 
                         
                        


