1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-13 15:15:53 +08:00

fix: Style form view. (#452)

This commit is contained in:
Edwin Betancourt 2020-04-19 21:12:08 -04:00 committed by GitHub
parent 42b5adb97c
commit fbe00c4478
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,21 @@
class="view-base" class="view-base"
style="height: 84vh;" style="height: 84vh;"
> >
<el-header style="height: 39px;">
<context-menu
:menu-parent-uuid="$route.meta.parentUuid"
:container-uuid="formUuid"
:panel-type="panelType"
/>
</el-header>
<el-main>
<el-row :gutter="20">
<el-col :span="24">
<el-card
class="content-collapse"
:style="isEmptyValue(formMetadata.fieldList) ? 'height: 75vh !important;' : ''"
>
<h3 class="warn-content text-center">
<el-popover <el-popover
v-if="!isEmptyValue(formMetadata.help)" v-if="!isEmptyValue(formMetadata.help)"
ref="helpTitle" ref="helpTitle"
@ -15,8 +30,6 @@
> >
<div v-html="formMetadata.help" /> <div v-html="formMetadata.help" />
</el-popover> </el-popover>
<div class="w-33">
<div class="center">
<el-button <el-button
v-popover:helpTitle v-popover:helpTitle
type="text" type="text"
@ -24,8 +37,7 @@
> >
{{ formTitle }} {{ formTitle }}
</el-button> </el-button>
</div> </h3>
</div>
<form-panel <form-panel
:metadata="{ :metadata="{
...formMetadata, ...formMetadata,
@ -33,6 +45,10 @@
title: formTitle title: formTitle
}" }"
/> />
</el-card>
</el-col>
</el-row>
</el-main>
</el-container> </el-container>
<div <div
v-else v-else
@ -46,18 +62,21 @@
</template> </template>
<script> <script>
import ContextMenu from '@/components/ADempiere/ContextMenu'
import FormPanel from '@/components/ADempiere/Form' import FormPanel from '@/components/ADempiere/Form'
export default { export default {
name: 'FormView', name: 'FormView',
components: { components: {
ContextMenu,
FormPanel FormPanel
}, },
data() { data() {
return { return {
formUuid: this.$route.meta.uuid, formUuid: this.$route.meta.uuid,
formMetadata: {}, formMetadata: {},
isLoaded: false isLoaded: false,
panelType: 'form'
} }
}, },
computed: { computed: {
@ -94,7 +113,15 @@ export default {
} }
</script> </script>
<style scoped> <style>
.el-card__body {
padding-top: 0px !important;
padding-right: 20px;
padding-bottom: 20px;
padding-left: 20px;
}
</style>
<style scoped >
.view-base { .view-base {
height: 100%; height: 100%;
min-height: calc(100vh - 84px); min-height: calc(100vh - 84px);
@ -105,18 +132,11 @@ export default {
height: 100%; height: 100%;
} }
.custom-title { .title, .custom-title {
color: #000000; color: #000;
text-size-adjust: 20px; text-size-adjust: 20px;
font-size: 100%; font-size: 100%;
font-weight: 605 !important; font-weight: 605 !important;
}
.title {
color: #000000;
text-size-adjust: 20px;
font-size: 100%;
font-weight: 605!important;
/* left: 50%; */ /* left: 50%; */
} }