fix(缺陷管理): 缺陷管理详情评论重复刷新

This commit is contained in:
xinxin.wu 2024-09-12 15:44:25 +08:00 committed by Craftsman
parent daa4f43aec
commit 3cad440eb5
4 changed files with 11 additions and 7 deletions

View File

@ -125,7 +125,7 @@
const currentProjectId = computed(() => appStore.currentProjectId); const currentProjectId = computed(() => appStore.currentProjectId);
const props = defineProps<{ const props = defineProps<{
bugId: string; // id bugId?: string; // id
}>(); }>();
const emit = defineEmits<{ const emit = defineEmits<{

View File

@ -55,7 +55,6 @@
scroll: { x: '100%' }, scroll: { x: '100%' },
selectable: false, selectable: false,
noDisable: false, noDisable: false,
debug: true,
}); });
const fetchData = async (id: string) => { const fetchData = async (id: string) => {

View File

@ -102,13 +102,18 @@
} }
}); });
watch(
() => props.bugId,
(val) => {
if (val) {
initData(props.bugId);
}
}
);
defineExpose({ defineExpose({
initData, initData,
}); });
watchEffect(() => {
initData(props.bugId);
});
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

View File

@ -153,8 +153,8 @@
bugDetailRef.value?.resetForm(); bugDetailRef.value?.resetForm();
} else { } else {
handleDrawerCancel(); handleDrawerCancel();
emit('success');
} }
emit('success');
} catch (error) { } catch (error) {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
console.log(error); console.log(error);