whereinput don't search address if not allow_geolocation
This commit is contained in:
parent
4814bb96f1
commit
6bd5935d3c
2 changed files with 18 additions and 16 deletions
|
@ -22,16 +22,17 @@ v-row.mb-4
|
||||||
v-list-item-title(v-text='item.name')
|
v-list-item-title(v-text='item.name')
|
||||||
v-list-item-subtitle(v-text='item.address')
|
v-list-item-subtitle(v-text='item.address')
|
||||||
|
|
||||||
//- v-text-field(
|
|
||||||
//- ref='address'
|
|
||||||
//- :prepend-icon='mdiMap'
|
|
||||||
//- :disabled='disableAddress'
|
|
||||||
//- :rules="[ v => disableAddress ? true : $validators.required('common.address')(v)]"
|
|
||||||
//- :label="$t('common.address')"
|
|
||||||
//- @change="changeAddress"
|
|
||||||
//- :value="value.address")
|
|
||||||
v-col(cols=12 md=6)
|
v-col(cols=12 md=6)
|
||||||
v-combobox(ref='address'
|
v-text-field(v-if="!settings.allow_geolocation"
|
||||||
|
ref='address'
|
||||||
|
:prepend-icon='mdiMap'
|
||||||
|
:disabled='disableAddress'
|
||||||
|
:rules="[ v => disableAddress ? true : $validators.required('common.address')(v)]"
|
||||||
|
:label="$t('common.address')"
|
||||||
|
@change="changeAddress"
|
||||||
|
:value="value.address")
|
||||||
|
v-combobox(ref='address' v-if="settings.allow_geolocation"
|
||||||
:prepend-icon='mdiMapSearch'
|
:prepend-icon='mdiMapSearch'
|
||||||
:disabled='disableAddress'
|
:disabled='disableAddress'
|
||||||
@input.native='searchAddress'
|
@input.native='searchAddress'
|
||||||
|
@ -182,11 +183,11 @@ export default {
|
||||||
}
|
}
|
||||||
this.$emit('input', { ...this.place })
|
this.$emit('input', { ...this.place })
|
||||||
},
|
},
|
||||||
// changeAddress (v) {
|
changeAddress (v) {
|
||||||
// this.place.address = v
|
this.place.address = v
|
||||||
// this.$emit('input', { ...this.place })
|
this.$emit('input', { ...this.place })
|
||||||
// this.disableDetails = false
|
this.disableDetails = false
|
||||||
// },
|
},
|
||||||
selectAddress (v) {
|
selectAddress (v) {
|
||||||
if (!v) { return }
|
if (!v) { return }
|
||||||
if (typeof v === 'object') {
|
if (typeof v === 'object') {
|
||||||
|
|
|
@ -179,6 +179,7 @@ export default {
|
||||||
filteredTags() {
|
filteredTags() {
|
||||||
if (!this.tagName) { return this.tags.slice(0, 10).map(t => t.tag) }
|
if (!this.tagName) { return this.tags.slice(0, 10).map(t => t.tag) }
|
||||||
const tagName = this.tagName.trim().toLowerCase()
|
const tagName = this.tagName.trim().toLowerCase()
|
||||||
|
console.log(tagName)
|
||||||
return this.tags.filter(t => t.tag.toLowerCase().includes(tagName)).map(t => t.tag)
|
return this.tags.filter(t => t.tag.toLowerCase().includes(tagName)).map(t => t.tag)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue