<el-dropdown @command="handleExport" class="export-dropdown">
<el-button>
导出<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<template #dropdown>
<el-dropdown-menu slot="dropdown" class="export-dropdown-menu">
<el-dropdown-item command="png"> PNG</el-dropdown-item>
<el-dropdown-item command="csv"> CSV</el-dropdown-item>
<el-dropdown-item command="json"> JSON</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
问题:下拉框不显示
解决:el-dropdown-menu元素外添加<template #dropdown>
参考下面的文章:
http://t.csdnimg.cn/YlSNB