Internal error occurred but is skipped: FindTagsByCommitIDs

Files
Situation-Awareness-Platfor…/src/views/Mobile/Repo/Issue/Detail/IssueDescription.vue

51 lines
1.3 KiB
Vue
Raw Normal View History

2025-03-12 18:41:20 +08:00
<template>
<DiscussionItem
:author="author"
:canEdit="isDeveloper || isIssueAuthor"
:can-delete="false"
:body="temp?.description"
:repo-id="repoId"
@save-content="saveDescription"
eventIcon="gt-comment"
:loading="loading"
:key="key"
:targetId="temp?.iid"
event-msg="评论:"
@quote-reply="$emit('quote-reply',temp?.description)"
/>
</template>
<script lang="ts" setup>
defineOptions({ name: 'IssueDescript' });
import { ref, inject, watch } from 'vue';
import type { IAuthor } from '@/api/issue/types';
import DiscussionItem from '@/views/Repo/components/DiscussionItem/index.vue';
import { updateIssue } from '@/api/issue';
import { reqCatch } from '@/utils/catch';
const repoId = inject('repoId');
const issueId = inject('issueId');
const props = defineProps<{
data: object;
user: IAuthor;
author: IAuthor;
}>();
defineEmits<{
'quote-reply':[value:string]
}>();
const key = ref(0);
const loading = ref(false);
const temp = ref(props.data);
const isDeveloper = inject('isDeveloper');
const isIssueAuthor = inject('isIssueAuthor');
const saveDescription = async(str: string) => {
loading.value = true;
const res = await reqCatch(updateIssue, {
project_id: repoId,
issue_iid: issueId,
description: str
});
temp.value = res?.data?.data;
// key.value++;
loading.value = false;
};
</script>