forked from PanJiaChen/vue-element-admin
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed Filters cannot be displayed in the smart browser (#1546)
* #1454 * minimal changes * fixe style * #1545 * minimal changes Co-authored-by: elsiosanchez <elsiossanches@gmail.com>
- Loading branch information
1 parent
f50be02
commit eb11f7b
Showing
4 changed files
with
171 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
<!-- | ||
ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution | ||
Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A. | ||
Contributor(s): Elsio Sanchez elsiosanches@gmail.com www.erpya.com | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
|
||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <https:www.gnu.org/licenses/>. | ||
--> | ||
|
||
<template> | ||
<el-main class="default-table" style="border-top: 1px solid #dde6fa;padding-bottom: 1%;padding-top: 1%;border-bottom: 1px solid #dde6fa"> | ||
<el-divider class="divider" /> | ||
<el-row style="display: flex;"> | ||
<el-col :span="19" style="display: grid;"> | ||
<div class="title" @click="handlePanel(isShowPanel)"> | ||
<b class="label"> | ||
{{ title }} | ||
</b> | ||
</div> | ||
</el-col> | ||
<el-col :span="4"> | ||
<filter-fields | ||
:parent-uuid="parentUuid" | ||
:container-uuid="containerUuid" | ||
:fields-list="panelMetadata.fieldsList" | ||
:filter-manager="containerManager.changeFieldShowedFromUser" | ||
:showed-manager="containerManager.isDisplayedField" | ||
/> | ||
</el-col> | ||
<el-col :span="1" style="text-align: center;"> | ||
<el-button type="text" :icon="icon" class="change-icon" @click="handlePanel(isShowPanel)" /> | ||
</el-col> | ||
</el-row> | ||
<transition name="el-zoom-in-top"> | ||
<div v-show="isShowPanel" class="transition-box"> | ||
<el-row> | ||
<el-col :span="24"> | ||
<slot /> | ||
</el-col> | ||
</el-row> | ||
</div> | ||
</transition> | ||
<el-divider class="divider" /> | ||
</el-main> | ||
</template> | ||
|
||
<script> | ||
import { defineComponent, computed, ref } from '@vue/composition-api' | ||
import FilterFields from '@/components/ADempiere/FilterFields' | ||
|
||
export default defineComponent({ | ||
name: 'Collapse', | ||
|
||
components: { | ||
FilterFields | ||
}, | ||
|
||
props: { | ||
title: { | ||
type: String, | ||
default: '' | ||
}, | ||
parentUuid: { | ||
type: String, | ||
default: undefined | ||
}, | ||
containerUuid: { | ||
type: String, | ||
required: true | ||
}, | ||
containerManager: { | ||
type: Object, | ||
required: true | ||
}, | ||
panelMetadata: { | ||
type: Object, | ||
required: false | ||
} | ||
}, | ||
|
||
setup(props, { root, refs }) { | ||
const isShowPanel = ref(false) | ||
|
||
const icon = computed(() => { | ||
if (isShowPanel.value) { | ||
return 'el-icon-arrow-down' | ||
} | ||
return 'el-icon-arrow-right' | ||
}) | ||
|
||
function handlePanel(show) { | ||
isShowPanel.value = !show | ||
} | ||
|
||
return { | ||
// data | ||
isShowPanel, | ||
// computeds | ||
icon, | ||
// methods | ||
handlePanel | ||
} | ||
} | ||
}) | ||
</script> | ||
|
||
<style lang="scss"> | ||
.title { | ||
margin-top: 0%; | ||
} | ||
.title:hover, .title:focus { | ||
cursor: pointer; | ||
} | ||
.change-icon { | ||
font-size: 20px; | ||
color: #000000; | ||
font-weight: 605 !important; | ||
} | ||
.change-icon:hover, .change-icon:focus { | ||
color: #000000; | ||
border-color: transparent; | ||
background-color: transparent; | ||
} | ||
.collapse { | ||
border-top: 1px solid rgba(255, 255, 255, 0.5); | ||
} | ||
.divider { | ||
margin-left: 0px; | ||
margin-right: 0px; | ||
margin-bottom: 5px; | ||
margin-top: 5px; | ||
} | ||
.label { | ||
margin-top: 1%; | ||
display: block; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters