night-cherry vor 1 Monat
Ursprung
Commit
28c2445d57
2 geänderte Dateien mit 7 neuen und 7 gelöschten Zeilen
  1. 3 6
      index.html
  2. 4 1
      index.js

+ 3 - 6
index.html

@@ -20,7 +20,7 @@
 			<router-link to="/about">关于</router-link>
 		</p>
 		<router-view></router-view>
-		
+
 		<div class="flex flex-wrap gap-4 item-center">
 			<el-select
 				v-model="value"
@@ -49,14 +49,11 @@
 		<hr/>
 		<button @click="interface_web()">connect to tomcat</button>
 		<br/>
-		<h4>tomcat_res -></h4><h4> {{ tomcat_res }}</h4>
+		<h4>tomcat_res -></h4><h4> {{ tomcat_res==""?"content empty":tomcat_res }}</h4>
 		<hr/>
 		<h2>书籍列表</h2>
 		<ul  v-for="iterm in books">
-			<li>{{item.title}}</li>
-			<li>{{item.author}}</li>
-			<li>{{item.publisher}}</li>
-			<li>{{item.pages}}</li>
+			<li>{{item.title}}&nbsp;{{item.author}}&nbsp;{{item.publisher}}&nbsp;{{item.pages}}</li>
 		</ul>
 		<hr/>
 		<!--<input type="button" text="中文" @click="changelang('zh')"/>

+ 4 - 1
index.js

@@ -64,7 +64,10 @@ const app=createApp({
         {value: 'ja', label: 'にほんご',},
       ],
       tomcat_res:"",
-      books:[{"title":"Linux从入门到精通","author":"night-cherry","publisher":"peking press","pages":123}],
+      books:[
+        {"title":"Linux从入门到精通","author":"night-cherry","publisher":"peking press","pages":123},
+        {"title":"MySQL必知必会","author":"李晓兵","publisher":"peking press","pages":456},
+      ],
     }
   },
   methods:{