diff --git a/src/components/export-data/index.vue b/src/components/export-data/index.vue index 7c5d54e..4c3e339 100644 --- a/src/components/export-data/index.vue +++ b/src/components/export-data/index.vue @@ -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; diff --git a/src/views/project_list/components/myTable.vue b/src/views/project_list/components/myTable.vue index a1ca291..806c877 100644 --- a/src/views/project_list/components/myTable.vue +++ b/src/views/project_list/components/myTable.vue @@ -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>