Skip to content

Commit 6eb3629

Browse files
committed
feat: reslove code problem
1 parent ccb2ff1 commit 6eb3629

4 files changed

Lines changed: 8 additions & 5 deletions

File tree

packages/collab-ui/avatar/src/Main.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<p>ID: {{ user.id || user.user.id }}</p>
3737
<p>Email: {{ user.email || user.user.email || 'not-set' }}</p>
3838
<p v-if="user.selection" class="editing-status">
39-
正在编辑
39+
Editing
4040
<span class="editing-target">{{
4141
`${user.selection.componentName}组件 ID:${user.selection.schema.id}`
4242
}}</span>

packages/plugins/versioncontrol/src/components/VersionDiffDialog.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<div class="file-diff-header">
5555
<span class="file-name">{{ file.name }}</span>
5656
<div style="font-size: 12px; color: #6b7280">
57-
+{{ file.additions ? 1 : 0 }} / -{{ file.deletions ? 1 : 0 }}
57+
+{{ file.additions || 0 }} / -{{ file.deletions || 0 }}
5858
</div>
5959
</div>
6060
<div class="file-stats">

packages/plugins/versioncontrol/src/composable/useVersionControlAction.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,12 @@ export function useVersionControlActions(
129129
}
130130

131131
const compareWithCurrent = () => {
132-
compareCommit(selectedCommit.value!)
133-
closeDialog()
132+
if (selectedCommit.value) {
133+
compareCommit(selectedCommit.value)
134+
closeDialog()
135+
} else {
136+
useNotify({ type: 'warning', message: '请先选择一个提交' })
137+
}
134138
}
135139

136140
const createTag = () => {

packages/plugins/versioncontrol/test/component/VersionCommitCreate.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ vi.mock('@opentiny/tiny-engine-utils', () => ({
3737
}
3838
}))
3939

40-
import { VersionManager } from '../../src/js'
4140
describe('CommitDialog.vue', () => {
4241
let wrapper
4342

0 commit comments

Comments
 (0)