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

53 lines
915 B
Markdown
Raw Normal View History

2021-10-26 01:13:23 +08:00
::: title 基础使用
2021-10-19 22:28:44 +08:00
:::
2021-10-01 18:20:41 +08:00
::: demo
<template>
<lay-collapse :openKeys="openKeys">
<lay-collapse-item title="标题" id="1"> 内容 </lay-collapse-item>
<lay-collapse-item title="标题" id="2"> 内容 </lay-collapse-item>
<lay-collapse-item title="标题" id="3"> 内容 </lay-collapse-item>
2021-10-01 18:20:41 +08:00
</lay-collapse>
</template>
<script>
import { ref } from 'vue'
export default {
setup() {
const openKeys = ref(["1","2","3"])
2021-10-01 18:20:41 +08:00
return {
openKeys
2021-10-01 18:20:41 +08:00
}
}
}
</script>
:::
2021-11-05 00:07:45 +08:00
::: title Collapse 属性
:::
2021-10-12 18:00:09 +08:00
2021-11-07 15:55:08 +08:00
::: table
2021-10-26 01:14:17 +08:00
| Name | Description | Accepted Values |
| -------- | ----------- | --------------- |
| openKeys | 打开的目录 | `array` |
2021-10-13 10:19:38 +08:00
2021-11-07 15:55:08 +08:00
:::
2021-10-13 10:19:38 +08:00
2021-11-07 15:55:08 +08:00
::: title Collapse-item 属性
2021-10-13 10:19:38 +08:00
:::
2021-11-07 15:55:08 +08:00
::: table
2021-10-26 01:14:17 +08:00
| Name | Description | Accepted Values |
| ----- | ----------- | --------------- |
| id | 编号 | -- |
| title | 标题 | -- |
2021-11-07 15:55:08 +08:00
2021-11-07 15:56:24 +08:00
:::