Skip to content

Commit 73979a5

Browse files
committed
fix(CodeReview): 修复单行点击抛出数据错误问题
1 parent fb395db commit 73979a5

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

packages/devui-vue/devui/code-review/src/composables/use-code-review-comment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
export function useCodeReviewComment(reviewContentRef: Ref<HTMLElement>, props: CodeReviewProps, ctx: SetupContext) {
1515
const { outputFormat, allowComment, allowChecked } = toRefs(props);
1616
const ns = useNamespace('code-review');
17-
const { onMousedown } = useCodeReviewLineSelection(reviewContentRef, props, updateLineNumbers, updateLineNumbers, afterCheckLines);
17+
const { onMousedown } = useCodeReviewLineSelection(reviewContentRef, props, updateLineNumbers, afterCheckLines);
1818
const commentLeft = ref(-100);
1919
const commentTop = ref(-100);
2020
let currentLeftLineNumber = -1;

packages/devui-vue/devui/code-review/src/composables/use-code-review-line-selection.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { findParentTrNode } from '../utils';
66
export function useCodeReviewLineSelection(
77
reviewContentRef: Ref<HTMLElement>,
88
props: CodeReviewProps,
9-
mouseDownCb: () => void,
109
mouseMoveCb: () => void,
1110
mouseupCb: () => void
1211
) {
@@ -45,7 +44,6 @@ export function useCodeReviewLineSelection(
4544
dragging = true;
4645
shouldClear = true;
4746
isMouseMoved = false;
48-
mouseDownCb();
4947
e.preventDefault();
5048
e.stopPropagation();
5149
document.addEventListener('mousemove', onMousemove);

0 commit comments

Comments
 (0)