source:
ReserveNGo-frontend/src/components/Project/Locale_.vue
Last change on this file was f49ddda, checked in by , 3 months ago | |
---|---|
|
|
File size: 562 bytes |
Rev | Line | |
---|---|---|
[17db9d2] | 1 | <script> |
2 | ||
[f49ddda] | 3 | import { restaurantStore } from '@/PiniaStores/restaurantStore.js' |
4 | ||
[17db9d2] | 5 | export default { |
6 | data() { | |
7 | return { | |
[f49ddda] | 8 | locale:{}, |
9 | ||
[17db9d2] | 10 | } |
11 | }, | |
[f49ddda] | 12 | mounted() { |
13 | fetch(`http://localhost:8080/api/locals/${restaurantStore().id}`) | |
14 | .then(res => res.json()) | |
15 | .then(data => this.locale = data) | |
16 | .catch(err => console.log(err)); | |
17 | }, | |
18 | ||
[17db9d2] | 19 | } |
[f49ddda] | 20 | /*console.log(restaurantStore().id)*/ |
[17db9d2] | 21 | |
22 | </script> | |
23 | ||
24 | <template> | |
25 | <div id="container" class="border my-3 p-2"> | |
[f49ddda] | 26 | |
[17db9d2] | 27 | <h3>{{locale.id}}</h3> |
28 | <h5>{{locale.name}}</h5> | |
29 | ||
30 | </div></template> | |
31 | ||
32 | <style scoped> | |
33 | ||
34 | </style> |
Note:
See TracBrowser
for help on using the repository browser.