<!--
 * @Author: Gui
 * @Date: 2023-03-01 19:20:44
 * @LastEditors: guicheng 1625811865@qq.com
 * @LastEditTime: 2025-03-24 17:43:19
 * @Description: kxs files
 * @filePath: 
-->
<script setup lang="ts">
import { ref, useRenderIcon, Close } from "@/utils/importUsed";

const props = defineProps<{
  formData: {
    type: Object;
    default: () => {};
  };
  visible: false;
  closeFn: any;
  formsubmit: any;
}>();
// 弹窗是否全屏
const isFullscreen = ref(false);
</script>

<template>
  <div>
    <el-dialog
      v-model="props.visible"
      width="50%"
      :fullscreen="isFullscreen"
      title="新增"
      draggable
      @close="closeFn"
    >
      <omega-form
        ref="formRef"
        :formData="formData"
        labelPosition="left"
        labelWidth="100px"
        size="default"
        @search="formsubmit"
        formWidth="!w-[230px]"
        :searchAll="false"
        searchText="确认提交"
      />
      <div class="flex justify-end">
        <el-button :icon="useRenderIcon(Close)" @click="closeFn">
          关闭
        </el-button>
      </div>
    </el-dialog>
  </div>
</template>
<style scoped>
:deep(.el-dropdown-menu__item i) {
  margin: 0;
}

:deep(.el-form-item__label) {
  font-weight: 700;
}

:deep(.el-pagination) {
  flex-flow: wrap;
}

:deep(.is-draggable) {
  max-height: 80vh;
  overflow: auto;
}

:deep(.el-dialog__header) {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
}

.collapsedom {
  padding: 0 20px;
  background-color: #fff;
}

.ovh-x {
  height: 40vh;
  overflow-y: auto;
}

:deep(.el-descriptions__header) {
  margin: 16px 0 !important;
}

.el-select {
  width: 100%;
}
</style>
