Element Card 卡片的具體使用
更新時間:2020年07月26日 11:20:39 作者:ForeverJPB.
這篇文章主要介紹了Element Card 卡片的具體使用,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
組件— 卡片
基礎(chǔ)用法

<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">
{{'列表內(nèi)容 ' + 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">
{{'列表內(nèi)容 ' + 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 ? 2 : 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"> 鼠標(biāo)懸浮時顯示 </el-card> </el-col> <el-col :span="8"> <el-card shadow="never"> 從不顯示 </el-card> </el-col> </el-row>
Attributes:
| 參數(shù) | 類型 | 說明 | 可選值 | 默認(rèn)值 |
|---|---|---|---|---|
| header | 設(shè)置 header,也可以通過 slot#header 傳入 DOM | string | — | — |
| body-style | 設(shè)置 body 的樣式 | object | — | { padding: ‘20px' } |
到此這篇關(guān)于Element Card 卡片的具體使用的文章就介紹到這了,更多相關(guān)Element Card 卡片內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
Vue3.0路由跳轉(zhuǎn)攜帶參數(shù)的示例詳解
這篇文章主要介紹了Vue3.0路由跳轉(zhuǎn)攜帶參數(shù)的示例代碼,本文給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下2023-04-04
關(guān)于vue中對window.openner的使用指南
opener屬性是一個可讀可寫的屬性,可返回對創(chuàng)建該窗口的Window對象的引用,下面這篇文章主要給大家介紹了關(guān)于vue中對window.openner使用的相關(guān)資料,需要的朋友可以參考下2022-11-11
elementUI中el-table表頭和內(nèi)容全部一行顯示完整的方法
最近參與web開發(fā)時,讓我解決一個elementui控制內(nèi)容單行顯示,下面這篇文章主要給大家介紹了關(guān)于elementUI中el-table表頭和內(nèi)容全部一行顯示完整的方法,需要的朋友可以參考下2023-06-06

