适配
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
<el-dialog
|
||||
v-model="visible"
|
||||
:title="title"
|
||||
width="600px"
|
||||
:width="isMobile ? '90%' : '600px'"
|
||||
:close-on-click-modal="false"
|
||||
class="export-dialog"
|
||||
>
|
||||
<div class="space-y-4">
|
||||
<!-- 企业选择 -->
|
||||
@@ -119,12 +120,13 @@
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<div class="flex justify-end gap-3">
|
||||
<el-button @click="handleCancel">取消</el-button>
|
||||
<div :class="['flex justify-end gap-3', isMobile ? 'flex-col' : '']">
|
||||
<el-button @click="handleCancel" :class="isMobile ? 'w-full' : ''">取消</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
:loading="loading"
|
||||
@click="handleConfirm"
|
||||
:class="isMobile ? 'w-full' : ''"
|
||||
>
|
||||
确认导出
|
||||
</el-button>
|
||||
@@ -135,8 +137,12 @@
|
||||
|
||||
<script setup>
|
||||
import { productApi, userApi } from '@/api'
|
||||
import { useMobileTable } from '@/composables/useMobileTable'
|
||||
import { reactive, ref, watch } from 'vue'
|
||||
|
||||
// 移动端检测
|
||||
const { isMobile } = useMobileTable()
|
||||
|
||||
// Props
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
@@ -302,3 +308,14 @@ defineExpose({
|
||||
<style scoped>
|
||||
/* 样式保持简洁,主要依赖Tailwind CSS */
|
||||
</style>
|
||||
|
||||
<style>
|
||||
/* 导出弹窗移动端优化 */
|
||||
@media (max-width: 768px) {
|
||||
.export-dialog :deep(.el-dialog__body) {
|
||||
padding: 16px;
|
||||
max-height: 80vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user