mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 09:50:58 +08:00
b8c38a9fe5
* chore: enhance eslint rules * chore: enhance eslint rules
51 lines
1.5 KiB
Vue
51 lines
1.5 KiB
Vue
<template>
|
|
<div class="flex flex-wrap items-center">
|
|
<el-dropdown>
|
|
<el-button type="primary">
|
|
Dropdown List<el-icon class="el-icon--right"><arrow-down /></el-icon>
|
|
</el-button>
|
|
<template #dropdown>
|
|
<el-dropdown-menu>
|
|
<el-dropdown-item>Action 1</el-dropdown-item>
|
|
<el-dropdown-item>Action 2</el-dropdown-item>
|
|
<el-dropdown-item>Action 3</el-dropdown-item>
|
|
<el-dropdown-item>Action 4</el-dropdown-item>
|
|
<el-dropdown-item>Action 5</el-dropdown-item>
|
|
</el-dropdown-menu>
|
|
</template>
|
|
</el-dropdown>
|
|
<el-dropdown split-button type="primary" @click="handleClick">
|
|
Dropdown List
|
|
<template #dropdown>
|
|
<el-dropdown-menu>
|
|
<el-dropdown-item>Action 1</el-dropdown-item>
|
|
<el-dropdown-item>Action 2</el-dropdown-item>
|
|
<el-dropdown-item>Action 3</el-dropdown-item>
|
|
<el-dropdown-item>Action 4</el-dropdown-item>
|
|
<el-dropdown-item>Action 5</el-dropdown-item>
|
|
</el-dropdown-menu>
|
|
</template>
|
|
</el-dropdown>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { ArrowDown } from '@element-plus/icons-vue'
|
|
|
|
const handleClick = () => {
|
|
// eslint-disable-next-line no-alert
|
|
alert('button click')
|
|
}
|
|
</script>
|
|
<style scoped>
|
|
.example-showcase .el-dropdown + .el-dropdown {
|
|
margin-left: 15px;
|
|
}
|
|
.example-showcase .el-dropdown-link {
|
|
cursor: pointer;
|
|
color: var(--el-color-primary);
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
</style>
|