Element Card 卡片的具體使用
更新時間:2020年07月26日 11:20:39 作者:ForeverJPB.
這篇文章主要介紹了Element Card 卡片的具體使用,文中通過示例代碼介紹的非常詳細,對大家的學(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ù) | 類型 | 說明 | 可選值 | 默認值 |
---|---|---|---|---|
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)文章
Vue中computed和watch的區(qū)別小結(jié)
watch和computed都是以Vue的依賴追蹤機制為基礎(chǔ)的,當(dāng)某一個依賴型數(shù)據(jù)發(fā)生變化的時候,所有依賴這個數(shù)據(jù)的相關(guān)數(shù)據(jù)會自動發(fā)生變化,即自動調(diào)用相關(guān)的函數(shù),來實現(xiàn)數(shù)據(jù)的變動,這篇文章簡單介紹下Vue中computed和watch的區(qū)別異同,感興趣的朋友一起看看吧2022-12-12vue實現(xiàn)tab標(biāo)簽(標(biāo)簽超出自動滾動)
當(dāng)創(chuàng)建的tab標(biāo)簽超出頁面可視區(qū)域時自動滾動一個tab標(biāo)簽距離,并可手動點擊滾動tab標(biāo)簽,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2021-05-05Cookbook組件形式:優(yōu)化 Vue 組件的運行時性能
本文仿照Vue Cookbook 組織形式,對優(yōu)化 Vue 組件的運行時性能進行闡述。通過基本的示例代碼給大家講解,需要的朋友參考下2018-11-11前端Vue設(shè)置cookie、刪除cookie,獲取cookie方式
這篇文章主要介紹了前端Vue設(shè)置cookie、刪除cookie,獲取cookie方式,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教2022-10-10