File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5858 "@types/diff" : " ^5.0.0" ,
5959 "@types/diff-match-patch" : " ^1.0.32" ,
6060 "@types/node" : " ^18.11.18" ,
61+ "@vueuse/core" : " ^10.6.1" ,
6162 "bumpp" : " ^8.2.1" ,
6263 "eslint" : " ^8.45.0" ,
6364 "npm-run-all" : " ^4.1.5" ,
Original file line number Diff line number Diff line change @@ -7,6 +7,24 @@ import SplitViewer from './split/SplitViewer.vue'
77import ' ./style.scss'
88import ' highlight.js/scss/vs.scss'
99
10+ const props = withDefaults (defineProps <Props >(), {
11+ language: ' plaintext' ,
12+ context: 10 ,
13+ diffStyle: ' word' ,
14+ outputFormat: ' line-by-line' ,
15+ trim: false ,
16+ noDiffLineFeed: false ,
17+ maxHeight: undefined ,
18+ filename: undefined ,
19+ newFilename: undefined ,
20+ hideHeader: false ,
21+ hideStat: false ,
22+ })
23+
24+ const emits = defineEmits <{
25+ (e : ' diff' , diffResult : DiffResult ): void
26+ }>()
27+
1028interface Props {
1129 newString: string
1230 oldString: string
@@ -31,24 +49,6 @@ interface DiffResult {
3149 }
3250}
3351
34- const props = withDefaults (defineProps <Props >(), {
35- language: ' plaintext' ,
36- context: 10 ,
37- diffStyle: ' word' ,
38- outputFormat: ' line-by-line' ,
39- trim: false ,
40- noDiffLineFeed: false ,
41- maxHeight: undefined ,
42- filename: undefined ,
43- newFilename: undefined ,
44- hideHeader: false ,
45- hideStat: false ,
46- })
47-
48- const emits = defineEmits <{
49- (e : ' diff' , diffResult : DiffResult ): void
50- }>()
51-
5252const isUnifiedViewer = computed (() => props .outputFormat === ' line-by-line' )
5353
5454const oldString = computed (() => {
You can’t perform that action at this time.
0 commit comments