1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-12 22:29:59 +08:00

Improve the display when recording the location (#1051)

Co-authored-by: elsiosanchez <elsiossanches@gmail.com>
This commit is contained in:
Elsio Sanchez 2021-08-12 17:11:50 -04:00 committed by GitHub
parent 2ce8853978
commit 427ffd0b75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 24 deletions

View File

@ -16,28 +16,26 @@
along with this program. If not, see <https:www.gnu.org/licenses/>. along with this program. If not, see <https:www.gnu.org/licenses/>.
--> -->
<template> <template>
<div>
<el-popover <el-popover
ref="locationAddress" ref="locationAddress"
v-model="isShowedLocationForm" v-model="isShowedLocationForm"
:placement="popoverPlacement" placement="left-end"
width="300" width="300"
trigger="manual" trigger="manual"
> >
<location-address-form <location-address-form
v-if="isShowedLocationForm"
:values="localValues" :values="localValues"
:parent-metadata="metadata" :parent-metadata="metadata"
/> />
</el-popover> <el-button slot="reference" type="text" style="width: -webkit-fill-available;" @click="setShowedLocationForm(true)">
<el-input <el-input
v-model="displayedValue" v-model="displayedValue"
readonly readonly
@focus="setShowedLocationForm(true)"
> >
<i slot="prefix" class="el-icon-location-information el-input__icon" /> <i slot="prefix" class="el-icon-location-information el-input__icon" />
</el-input> </el-input>
</div> </el-button>
</el-popover>
</template> </template>
<script> <script>

View File

@ -42,8 +42,7 @@
style="min-height: calc(50vh - 84px)" style="min-height: calc(50vh - 84px)"
class="loading-panel" class="loading-panel"
/> />
<el-col :span="24" style="padding-left: 12px;padding-right: 12px;padding-top: 3%;padding-bottom: 3%;">
<el-col :span="24">
<samp style="float: right; padding-right: 10px;"> <samp style="float: right; padding-right: 10px;">
<el-button <el-button
:disabled="!isLoaded" :disabled="!isLoaded"

View File

@ -24,6 +24,7 @@
placement="right" placement="right"
width="400" width="400"
trigger="click" trigger="click"
@hide="popoverClose"
> >
<business-partner-create <business-partner-create
:parent-metadata="parentMetadata" :parent-metadata="parentMetadata"
@ -402,6 +403,9 @@ export default {
}, },
popoverOpen(value) { popoverOpen(value) {
this.$store.dispatch('changePopover', true) this.$store.dispatch('changePopover', true)
},
popoverClose(value) {
this.$store.commit('setShowedLocation', false)
} }
} }
} }