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

View File

@ -13,8 +13,8 @@
<el-dropdown-item @click="handleAdd">添加</el-dropdown-item> <el-dropdown-item @click="handleAdd">添加</el-dropdown-item>
<el-dropdown-item> 编辑</el-dropdown-item> <el-dropdown-item> 编辑</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" <export-data :fetch-fun="baseData.fetchFun" :params="baseData.queryParams" :page-size="15"
:page-size="15" /> :isMenuLi="true" />
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
</el-dropdown> </el-dropdown>