1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-10 12:01:57 +08:00

Intuitive output on the point-of-sale product search panel (#1024)

* Intuitive output on the point-of-sale product search panel

* Update index.vue

Co-authored-by: elsiosanchez <elsiossanches@gmail.com>
This commit is contained in:
Elsio Sanchez 2021-08-06 17:10:12 -04:00 committed by GitHub
parent 8a54f46df9
commit 2e64bb5d35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -21,10 +21,15 @@
<template slot="label"> <template slot="label">
{{ $t('form.productInfo.codeProduct') }} {{ $t('form.productInfo.codeProduct') }}
<el-popover <el-popover
v-model="visible"
v-shortkey="keyShortcuts"
placement="right" placement="right"
trigger="click" trigger="click"
width="800" width="800"
@shortkey.native="close"
> >
<el-button icon="el-icon-close" type="text" style="float: right;padding: 1% 1% 0px 0px;font-size: 20px;" @click="close" />
<br>
<product-info-list /> <product-info-list />
<el-button <el-button
slot="reference" slot="reference"
@ -106,6 +111,7 @@ export default {
}, },
data() { data() {
return { return {
visible: false,
timeOut: null timeOut: null
} }
}, },
@ -207,6 +213,9 @@ export default {
// call callback function to return suggestions // call callback function to return suggestions
callBack(results) callBack(results)
}, },
close() {
this.visible = false
},
handleSelect(elementSelected) { handleSelect(elementSelected) {
const valueProduct = this.isEmptyValue(elementSelected.product) ? elementSelected.value : elementSelected.product.value const valueProduct = this.isEmptyValue(elementSelected.product) ? elementSelected.value : elementSelected.product.value
this.$store.dispatch('notifyActionKeyPerformed', { this.$store.dispatch('notifyActionKeyPerformed', {

View File

@ -18,6 +18,7 @@
<template> <template>
<el-main <el-main
v-shortkey="shortsKey" v-shortkey="shortsKey"
style="padding-top: 0px;"
@shortkey.native="keyAction" @shortkey.native="keyAction"
> >
<el-form <el-form