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

91 lines
1.5 KiB
Markdown
Raw Normal View History

2021-10-26 01:13:23 +08:00
::: title 基础使用
2021-10-19 22:28:44 +08:00
:::
2021-10-06 23:22:30 +08:00
::: demo
<template>
2021-10-07 02:03:35 +08:00
<lay-dropdown>
2021-10-27 02:04:47 +08:00
<lay-button type="primary">下拉菜单</lay-button>
2021-10-07 02:03:35 +08:00
<template #content>
<lay-dropdown-item>选项一</lay-dropdown-item>
<lay-dropdown-item>选项二</lay-dropdown-item>
<lay-dropdown-item>选项三</lay-dropdown-item>
2021-10-07 02:03:35 +08:00
</template>
</lay-dropdown>
</template>
<script>
import { ref } from 'vue'
export default {
setup() {
return {
}
}
}
</script>
:::
2021-10-26 01:13:23 +08:00
::: title 触发方式
2021-10-19 22:28:44 +08:00
:::
2021-10-07 02:03:35 +08:00
::: demo
<template>
<lay-dropdown trigger="hover">
2021-10-07 02:03:35 +08:00
<lay-button>Hover 触发</lay-button>
<template #content>
<lay-dropdown-item>选项一</lay-dropdown-item>
<lay-dropdown-item>选项二</lay-dropdown-item>
<lay-dropdown-item>选项三</lay-dropdown-item>
2021-10-07 02:03:35 +08:00
</template>
</lay-dropdown>
&nbsp;&nbsp;
<lay-dropdown>
<lay-button>Click 触发</lay-button>
<template #content>
<lay-dropdown-item>选项一</lay-dropdown-item>
<lay-dropdown-item>选项二</lay-dropdown-item>
<lay-dropdown-item>选项三</lay-dropdown-item>
2021-10-07 02:03:35 +08:00
</template>
</lay-dropdown>
2021-10-06 23:22:30 +08:00
</template>
<script>
import { ref } from 'vue'
export default {
setup() {
return {
}
}
}
</script>
2021-10-08 00:17:34 +08:00
:::
::: title 下拉属性
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
| 属性 | 描述 | 可选值 |
| ------- | -------- | --------------- |
| trigger | 触发方式 | `click` `hover` |
2021-11-07 15:55:08 +08:00
:::
::: title 下拉插槽
:::
2021-11-07 15:55:08 +08:00
::: table
| 插槽 | 描述 | 可选值 |
| ------- | -------- | ------ |
| content | 下拉内容 | -- |
2021-11-07 15:55:08 +08:00
2021-11-07 15:56:24 +08:00
:::