<template>
  <el-button type="danger" @click="submitBug">提交bug</el-button>
</template>

<script setup lang="ts">
import { ref } from "vue";
import { SubmitBug } from '../api/api'
import { useBugIdStore } from '../store/BugID';

let bugId = useBugIdStore();

const submitBug = async () => {
  if (bugId.bug_id == undefined || bugId.bug_id == "") {
    alert('请先预测结果！')
    return;
  }

  // SubmitBug(api, bugId.bug_id).then(res => {
  //   console.log(res.code, res.data)
  // }).catch(function (err) {
  //   console.log(err)
  //   // loading.value = !loading.value;
  // });
};
</script>