mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
feat(cli): DemoBlock add card style (#6702)
This commit is contained in:
parent
f731b38cc7
commit
4aff784d65
@ -1,7 +1,10 @@
|
||||
<template>
|
||||
<div class="van-doc-demo-block">
|
||||
<h2 class="van-doc-demo-block__title">{{ title }}</h2>
|
||||
<slot />
|
||||
<div v-if="card" class="van-doc-demo-block__card">
|
||||
<slot />
|
||||
</div>
|
||||
<slot v-else />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -10,6 +13,7 @@ export default {
|
||||
name: 'demo-block',
|
||||
|
||||
props: {
|
||||
card: Boolean,
|
||||
title: String,
|
||||
},
|
||||
};
|
||||
@ -28,6 +32,12 @@ export default {
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
&__card {
|
||||
margin: 0 12px 0;
|
||||
overflow: hidden;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
&:first-of-type {
|
||||
.van-doc-demo-block__title {
|
||||
padding-top: 20px;
|
||||
|
Loading…
x
Reference in New Issue
Block a user