@@ -4,6 +4,8 @@ import { reactive, ref, watch } from 'vue'
44import { newShortText } from ' ./text/new-short-text'
55import { oldShortText } from ' ./text/old-short-text'
66
7+ const appVersion = __APP_VERSION__
8+
79const formState = reactive ({
810 language: ' json' ,
911 theme: ' light' ,
@@ -55,9 +57,11 @@ function printEvent(e) {
5557 <h1 >v-code-diff</h1 >
5658 <p >A code diff display plugin, available for Vue2 / Vue3.</p >
5759 <p align =" center" >
58- Vue version: {{ version }}. CodeDiff version: 1.8.0
60+ Vue version: {{ version }}. CodeDiff version: {{ appVersion }}
5961 </p >
60- <a-button ><a href =" https://github.com/Shimada666/v-code-diff" >View on Github</a ></a-button >
62+ <a-button type =" primary" >
63+ <a href =" https://github.com/Shimada666/v-code-diff" >View on Github</a >
64+ </a-button >
6165 </div >
6266 <div style =" display : flex ; justify-content : space-between ;" >
6367 <div style =" margin-right : 5px ;" >
@@ -68,7 +72,6 @@ function printEvent(e) {
6872 <a-input v-model:value =" formState.newFilename" />
6973 <textarea v-model =" newString" style =" width : 48vw ;" :rows =" 20" />
7074 </div >
71-
7275 </div >
7376 <div style =" margin-top : 10px ;" >
7477 <a-button style =" margin-right : 5px ;" @click =" resetText" >
@@ -85,8 +88,9 @@ function printEvent(e) {
8588 <a-form-item label =" 语言(langauge)" >
8689 <a-select v-model:value =" formState.language" style =" width : 12vw ;" >
8790 <a-select-option
88- v-for =" item in ['plaintext', 'json', 'yaml', 'javascript', 'java', 'python', 'sql', 'xml', 'bash'] "
89- :key =" item" :value =" item" >
91+ v-for =" item in ['plaintext', 'json', 'yaml', 'javascript', 'java', 'python', 'sql', 'xml', 'bash']"
92+ :key =" item" :value =" item"
93+ >
9094 {{ item }}
9195 </a-select-option >
9296 </a-select >
@@ -157,11 +161,13 @@ function printEvent(e) {
157161 </a-form >
158162 </a-card >
159163 <div >
160- <CodeDiff :theme =" formState.theme" :old-string =" oldString" :new-string =" newString" :language =" formState.language"
164+ <CodeDiff
165+ :theme =" formState.theme" :old-string =" oldString" :new-string =" newString" :language =" formState.language"
161166 :diff-style =" formState.diffStyle" :output-format =" formState.outputFormat" :context =" formState.context"
162167 :trim =" formState.trim" :no-diff-line-feed =" formState.noDiffLineFeed" :filename =" formState.filename"
163168 :new-filename =" formState.newFilename" :hide-header =" formState.hideHeader" :hide-stat =" formState.hideStat"
164- @diff =" printEvent" />
169+ @diff =" printEvent"
170+ />
165171 </div >
166172 </div >
167173</template >
0 commit comments