Skip to content

Commit

Permalink
Merge pull request #19 from humian1974/b-table
Browse files Browse the repository at this point in the history
gpt rewrite vue3
  • Loading branch information
xy01dv2 authored Nov 6, 2023
2 parents bf3bad5 + 26952fd commit 1266848
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
Binary file added favicon.ico
Binary file not shown.
34 changes: 16 additions & 18 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>Eta</title>
<link rel="icon" type="image/x-icon" href="favicon.ico">
<style>
.map {
height: 500px;
Expand All @@ -33,6 +34,7 @@
</style>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<script src="https://unpkg.com/vue@next"></script>
<script src="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue-icons.min.js"></script>
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.7.0.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>

Expand Down Expand Up @@ -226,13 +228,13 @@
</tr>
</thead>
<tbody>
<tr v-on:mouseover="mouseover(index)" v-on:mouseleave="mouseleave(index)" v-for="apt, index in tbl_array">
<th scope="row">{{ index +1 }}</th>
<td>{{apt.icao}}</td>
<td>{{apt.city}}</td>
<td>{{apt.country}}</td>
<td>{{apt.rwy}}</td>
<td>{{apt.elevation}}</td>
<tr v-for="(apt, index) in tbl_array" :key="index" @mouseover="mouseover(index)" @mouseleave="mouseleave(index)">
<th scope="row">{{ index + 1 }}</th>
<td>{{ apt.icao }}</td>
<td>{{ apt.city }}</td>
<td>{{ apt.country }}</td>
<td>{{ apt.rwy }}</td>
<td>{{ apt.elevation }}</td>
</tr>
</tbody>
</table>
Expand All @@ -248,29 +250,25 @@
Plot airport location with Openlayers WKT / VUE / Azure SWA / X-plane DB. Code <a href="https://github.com/humian1974/eta">HERE</a>
</div>

// <script src="https://unpkg.com/vue@next"></script>
<script>
// import { createApp } from 'vue'

const tbl = Vue.createApp({
el: '#tbl',
data() {
return { tbl_array: [] };
return {
tbl_array: []
}
},
mounted: function () {
mounted() {
this.tbl_array = apiArray;
},
methods: {
mouseover (i) {
mouseover(i) {
plotPnt(JSON.parse(JSON.stringify(apiArray[i])));
},
mouseleave (i) {
mouseleave(i) {
clearMap_Point();
}
}
});

tbl.mount('#tbl');
}).mount('#tbl');

</script>

Expand Down

0 comments on commit 1266848

Please sign in to comment.