Compare commits
2 Commits
336a09f259
...
ef62875a57
Author | SHA1 | Date | |
---|---|---|---|
ef62875a57 | |||
4361812e62 |
@ -12,21 +12,36 @@
|
|||||||
@typing="getAsyncData"
|
@typing="getAsyncData"
|
||||||
@select="(option) => (selected = option)"
|
@select="(option) => (selected = option)"
|
||||||
>
|
>
|
||||||
<template slot-scope="props">
|
<!-- <template slot-scope="props">-->
|
||||||
<div class="media">
|
<!-- <div class="media">-->
|
||||||
<div class="media-left"></div>
|
<!-- <div class="media-left"></div>-->
|
||||||
<div class="media-content">
|
<!-- <div class="media-content">-->
|
||||||
{{ props.option.title }}
|
<!-- {{ props.name }}-->
|
||||||
<br />
|
<!-- <br />-->
|
||||||
<small>
|
<!-- <small>-->
|
||||||
Released at {{ props.option.release_date }}, rated
|
<!-- Released at {{ props.option.release_date }}, rated-->
|
||||||
<b>{{ props.option.vote_average }}</b>
|
<!-- <b>{{ props.option.vote_average }}</b>-->
|
||||||
</small>
|
<!-- </small>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</b-autocomplete>
|
</b-autocomplete>
|
||||||
</b-field>
|
</b-field>
|
||||||
|
Résultats possibles: {{ data.length }}
|
||||||
|
<div v-if="data.length">
|
||||||
|
<ul>
|
||||||
|
<li v-for="item in data" :key="item.properties.id">
|
||||||
|
<div class="columns">
|
||||||
|
<div class="column">
|
||||||
|
{{ item.properties.name }}
|
||||||
|
</div>
|
||||||
|
<div class="column">
|
||||||
|
{{ item.properties.context }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="map">
|
<section class="map">
|
||||||
<br />
|
<br />
|
||||||
@ -120,9 +135,9 @@
|
|||||||
></b-input>
|
></b-input>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field>
|
<b-field>
|
||||||
<b-switch v-model="xml.tags.takeaway"> Vente à emporter </b-switch>
|
<b-switch v-model="xml.tags.takeaway"> Vente à emporter</b-switch>
|
||||||
<b-switch v-model="xml.tags['parking:velo']"> Parking vélo </b-switch>
|
<b-switch v-model="xml.tags['parking:velo']"> Parking vélo</b-switch>
|
||||||
<b-switch v-model="xml.tags['webaccess']"> Accès Internet </b-switch>
|
<b-switch v-model="xml.tags['webaccess']"> Accès Internet</b-switch>
|
||||||
<b-switch v-model="xml.tags['elecborne']">
|
<b-switch v-model="xml.tags['elecborne']">
|
||||||
borne de recharge électrique sur parking
|
borne de recharge électrique sur parking
|
||||||
</b-switch>
|
</b-switch>
|
||||||
@ -170,11 +185,11 @@ export default {
|
|||||||
}
|
}
|
||||||
this.isFetching = true
|
this.isFetching = true
|
||||||
this.$axios
|
this.$axios
|
||||||
.get(`https://demo.addok.xyz/search/?q=${name}`)
|
.get(`https://demo.addok.xyz/search?&type=poi&q=${name}`)
|
||||||
.then(({ data }) => {
|
.then(({ data }) => {
|
||||||
console.log('data', data)
|
console.log('data', data)
|
||||||
this.data = []
|
this.data = []
|
||||||
data.results.forEach((item) => this.data.push(item))
|
data.features.forEach((item) => this.data.push(item))
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
this.data = []
|
this.data = []
|
||||||
|
Loading…
Reference in New Issue
Block a user