layui/example/docs/zh-CN/components/card.md

139 lines
1.5 KiB
Markdown
Raw Normal View History

::: anchor
:::
2021-10-26 01:13:23 +08:00
::: title 基础使用
2021-10-19 22:28:44 +08:00
:::
2021-09-27 08:43:12 +08:00
::: demo
<template>
<div class="card-container">
<lay-card title="标题">
内容
</lay-card>
</div>
</template>
<script>
import { ref } from 'vue'
export default {
setup() {
return {
}
}
}
</script>
<style>
.card-container {
background: whitesmoke;
padding: 20px;
}
</style>
2021-10-26 01:14:17 +08:00
:::
2021-10-26 01:13:23 +08:00
::: title 卡片插槽
2021-10-19 22:28:44 +08:00
:::
::: demo
<template>
<div class="card-container">
2021-09-27 08:43:12 +08:00
<lay-card>
<template v-slot:header>
标题
</template>
<template v-slot:body>
内容
</template>
</lay-card>
</div>
2021-09-27 08:43:12 +08:00
</template>
<script>
import { ref } from 'vue'
export default {
setup() {
return {
}
}
}
</script>
<style>
.card-container {
background: whitesmoke;
padding: 20px;
}
</style>
2021-10-26 01:14:17 +08:00
2021-09-29 10:56:20 +08:00
:::
2021-10-26 01:13:23 +08:00
::: title 简单使用
2021-10-19 22:28:44 +08:00
:::
2021-09-29 10:56:20 +08:00
::: demo
<template>
<div class="card-container">
2021-09-29 10:56:20 +08:00
<lay-card>
内容
</lay-card>
</div>
2021-09-29 10:56:20 +08:00
</template>
<script>
import { ref } from 'vue'
export default {
setup() {
return {
}
}
}
</script>
<style>
.card-container {
background: whitesmoke;
padding: 20px;
}
</style>
2021-10-01 18:20:41 +08:00
2021-10-26 01:14:17 +08:00
:::
2022-01-10 01:17:03 +08:00
::: title Card 属性
2021-10-13 10:19:38 +08:00
:::
2021-10-12 18:00:09 +08:00
2021-11-07 15:55:08 +08:00
::: table
| 属性 | 描述 | 可选值 |
| ----- | ---- | ------ |
| title | 标题 | -- |
2021-11-07 15:55:08 +08:00
:::
2022-01-10 01:17:03 +08:00
::: title Card 插槽
2021-10-13 10:19:38 +08:00
:::
2021-11-07 15:55:08 +08:00
::: table
| 插槽 | 描述 | 可选值 |
| ------ | -------- | ------ |
2021-12-07 16:06:36 +08:00
| default| 默认插槽 | -- |
| header | 头部插槽 | -- |
| body | 内容插槽 | -- |
2021-11-07 15:55:08 +08:00
2021-11-07 15:56:24 +08:00
:::
2021-12-16 17:57:59 +08:00
::: comment
2022-01-12 14:19:06 +08:00
:::
::: previousNext card
2021-12-16 17:57:59 +08:00
:::