<template>
  <BasicModal
    width="800px"
    title="新增指标"
    @register="registerModal"
    v-bind="$attrs"
    @ok="handleSubmit"
  >
    <a-row v-for="(item, index) in props.data" :key="index">
      <a-col span="8">{{ item.name }}</a-col>
      <a-col span="16">{{ item.value }}</a-col>
    </a-row>
  </BasicModal>
</template>
<script lang="ts" setup>
  import { BasicModal, useModalInner } from '/@/components/Modal';

  const props = defineProps({
    data: {
      type: Object,
      default: null as any,
    },
  });
  const [registerModal, { closeModal }] = useModalInner();

  function handleSubmit() {
    closeModal();
  }
</script>
<style lang="less" scoped></style>
