This commit is contained in:
zmj 2024-01-30 10:00:50 +08:00
parent df822e8324
commit b4edbaf21d
2 changed files with 9 additions and 12 deletions

View File

@ -3,9 +3,11 @@
<popup ref="popupRef" title="导出设置" width="500px" confirm-button-text="确认导出" @confirm="handleConfirm" :async="true"
@open="getData">
<template #trigger>
<!-- <el-button>导出</el-button> -->
<li class="el-dropdown-menu__item action-menu-li" :tabindex="-1" role="menuitem" aria-disabled="false">导出
<li class="el-dropdown-menu__item action-menu-li" v-if="isMenuLi" :tabindex="-1" role="menuitem"
aria-disabled="false">导出
</li>
<el-button v-else>导出</el-button>
</template>
<div>
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
@ -49,6 +51,7 @@
import feedback from '@/utils/feedback'
import Popup from '@/components/popup/index.vue'
import type { FormInstance } from 'element-plus'
const formRef = shallowRef<FormInstance>()
const props = defineProps({
params: {
@ -62,7 +65,8 @@ const props = defineProps({
fetchFun: {
type: Function,
required: true
}
},
isMenuLi: Boolean
})
const popupRef = shallowRef<InstanceType<typeof Popup>>()
const formData = reactive({
@ -133,13 +137,6 @@ const handleConfirm = async () => {
// getData()
</script>
<style lang="scss">
.action-menu-li {
// transform: translateX(-10px);
background-color: red;
width: 70px;
margin: 0 !important;
}
.action-menu-li:hover {
background-color: #EDEFFF;
color: blue;

View File

@ -13,8 +13,8 @@
<el-dropdown-item @click="handleAdd">添加</el-dropdown-item>
<el-dropdown-item> 编辑</el-dropdown-item>
<el-dropdown-item> 删除</el-dropdown-item>
<export-data class="ml-2.5" :fetch-fun="baseData.fetchFun" :params="baseData.queryParams"
:page-size="15" />
<export-data :fetch-fun="baseData.fetchFun" :params="baseData.queryParams" :page-size="15"
:isMenuLi="true" />
</el-dropdown-menu>
</template>
</el-dropdown>