@@ -13,6 +13,7 @@ const formState = reactive({
13
13
trim: false ,
14
14
noDiffLineFeed: false ,
15
15
filename: ' package.json' ,
16
+ newFilename: ' newPackage.json' ,
16
17
hideHeader: false ,
17
18
hideStat: false ,
18
19
})
@@ -59,12 +60,18 @@ function printEvent(e) {
59
60
<a-button ><a href =" https://github.com/Shimada666/v-code-diff" >View on Github</a ></a-button >
60
61
</div >
61
62
<div style =" display : flex ; justify-content : space-between ;" >
62
- <textarea v-model =" oldString" style =" width : 48vw ; margin-right : 10px ;" :rows =" 20" />
63
- <textarea v-model =" newString" style =" width : 48vw ;" :rows =" 20" />
63
+ <div style =" margin-right : 5px ;" >
64
+ <a-input v-model:value =" formState.filename" />
65
+ <textarea v-model =" oldString" style =" width : 48vw ;" :rows =" 20" />
66
+ </div >
67
+ <div >
68
+ <a-input v-model:value =" formState.newFilename" />
69
+ <textarea v-model =" newString" style =" width : 48vw ;" :rows =" 20" />
70
+ </div >
71
+
64
72
</div >
65
73
<div style =" margin-top : 10px ;" >
66
- <a-button style =" margin-right : 5px ;"
67
- @click =" resetText" >
74
+ <a-button style =" margin-right : 5px ;" @click =" resetText" >
68
75
重置文本(reset text)
69
76
</a-button >
70
77
<a-button type =" default" @click =" clearText" >
@@ -152,8 +159,8 @@ function printEvent(e) {
152
159
<div >
153
160
<CodeDiff :theme =" formState.theme" :old-string =" oldString" :new-string =" newString" :language =" formState.language"
154
161
:diff-style =" formState.diffStyle" :output-format =" formState.outputFormat" :context =" formState.context"
155
- :trim =" formState.trim" :no-diff-line-feed =" formState.noDiffLineFeed" filename =" File Name "
156
- new-filename =" New File Name " :hide-header =" formState.hideHeader" :hide-stat =" formState.hideStat"
162
+ :trim =" formState.trim" :no-diff-line-feed =" formState.noDiffLineFeed" : filename =" formState.filename "
163
+ : new-filename =" formState.newFilename " :hide-header =" formState.hideHeader" :hide-stat =" formState.hideStat"
157
164
@diff =" printEvent" />
158
165
</div >
159
166
</div >
0 commit comments