<template>
  <a-modal v-model:visible="visible" :title="title" @ok="handleOk" @cancel="handleOk">
    <div>123</div>
  </a-modal>
</template>
<script lang="ts" setup>
  import { onMounted, ref, defineEmits, onUnmounted, computed } from 'vue';
  import { defHttp } from '/@/utils/http/axios';

  const getLinkAlarmInfo = (params?) => defHttp.post({ url: '/safety/ventanalyDeviceInfo/getLinkAlarmInfo', params });

  const emit = defineEmits(['close']);
  const props = withDefaults(
    defineProps<{
      deviceId?: string;
      modalIsShow?: boolean;
      modalTitle?: string;
    }>(),
    {
      deviceId: '',
      modalIsShow: false,
      modalTitle: '',
    }
  );

  const title = computed(() => props.modalTitle);
  const visible = computed(() => {
    // getLinkAlarmInfo({ id: props.deviceId + '' });
    return props.modalIsShow;
  });

  function handleOk() {
    emit('close');
  }

  onMounted(async () => {});
  onUnmounted(() => {});
</script>
<style scoped lang="less">
  @import '/@/design/theme.less';
  @import '/@/design/vent/modal.less';
</style>
