index.html 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>index</title>
  7. </head>
  8. <body>
  9. <!-- <h3>this is node -> Vue test</h3> -->
  10. <div id='app' style='color:red; font-size:20px; font-weight:bold;'>app node start...</div>
  11. <template id="my-app">
  12. <!--<div v-html='info'></div>
  13. <Home @op="add">home vue</Home>
  14. <h5 style="color:oranged">{{number}}</h5>
  15. <About>this is About</About>
  16. <test></test>-->
  17. <p>
  18. <router-link to="/home">首页</router-link>
  19. <router-link to="/test">test</router-link>
  20. <router-link to="/about">关于</router-link>
  21. </p>
  22. <router-view></router-view>
  23. <div class="flex flex-wrap gap-4 item-center">
  24. <el-select
  25. v-model="value"
  26. placeholder="Select"
  27. size="large"
  28. style="width: 240px"
  29. >
  30. <el-option
  31. v-for="item in options"
  32. :key="item.value"
  33. :label="item.label"
  34. :value="item.value"
  35. @click="changelang(item.value)"
  36. />
  37. </el-select>
  38. </div>
  39. <br/>
  40. <!--避免使用单标签,组件按照双标签规范用; js代码相对位置导入后可以直接使用 -->
  41. <!-- <p>before i18n label</p> -->
  42. <div v-t="'messages.username'"></div>
  43. {{$t('messages.login')}}
  44. <!-- <p>after i18n label</p> -->
  45. <!-- <label @click="changelang('zh')">中文</label>
  46. <label @click="changelang('en')">english</label> -->
  47. <hr/>
  48. <button @click="interface_web()">connect to tomcat</button>
  49. <br/>
  50. <h4>tomcat_res -> {{ tomcat_res==""?"content empty":tomcat_res }}</h4>
  51. <hr/>
  52. <h2>书籍列表</h2>
  53. <table>
  54. <th>index</th><th>title</th><th>author</th><th>publisher</th><th>pages</th><th>operation</th>
  55. <tr v-for="(value,key,index) in books">
  56. <td>{{key}}</td>
  57. <td>{{value.title}}</td>
  58. <td>{{value.author}}</td>
  59. <td>{{value.publisher}}</td>
  60. <td>{{value.pages}}</td>
  61. </tr>
  62. </table>
  63. <!-- <ul v-for="(value,key,index) in books">
  64. <li v-for="(iterm,key,value) in books">{{value}}-{{key}}-{{item}}</li>
  65. <li>{{item}}</li>
  66. <li>{{value.title}}</li><li>{{value.author}}</li><li>{{value.publisher}}</li><li>{{value.pages}}</li>
  67. <li>{{item["title"]}}&nbsp;{{item["author"]}}&nbsp;{{item["publisher"]}}&nbsp;{{item["pages"]}}</li>
  68. </ul> -->
  69. <hr/>
  70. <!--<input type="button" text="中文" @click="changelang('zh')"/>
  71. <input type="button" text="english" @click="changelang('en')"/>-->
  72. </template>
  73. <!-- <template style="width:100%; backgroud-color:oranged;">
  74. <Home @op="add">home vue</Home>
  75. <h2>{{number}}</h2>
  76. </template> -->
  77. </body>
  78. </html>