1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-11 05:11:59 +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,34 +5,50 @@
class="view-base" class="view-base"
style="height: 84vh;" style="height: 84vh;"
> >
<el-popover <el-header style="height: 39px;">
v-if="!isEmptyValue(formMetadata.help)" <context-menu
ref="helpTitle" :menu-parent-uuid="$route.meta.parentUuid"
placement="top-start" :container-uuid="formUuid"
:title="formTitle" :panel-type="panelType"
width="400" />
trigger="hover" </el-header>
> <el-main>
<div v-html="formMetadata.help" /> <el-row :gutter="20">
</el-popover> <el-col :span="24">
<div class="w-33"> <el-card
<div class="center"> class="content-collapse"
<el-button :style="isEmptyValue(formMetadata.fieldList) ? 'height: 75vh !important;' : ''"
v-popover:helpTitle >
type="text" <h3 class="warn-content text-center">
class="title text-center" <el-popover
> v-if="!isEmptyValue(formMetadata.help)"
{{ formTitle }} ref="helpTitle"
</el-button> placement="top-start"
</div> :title="formTitle"
</div> width="400"
<form-panel trigger="hover"
:metadata="{ >
...formMetadata, <div v-html="formMetadata.help" />
containerUuid: formUuid, </el-popover>
title: formTitle <el-button
}" v-popover:helpTitle
/> type="text"
class="title text-center"
>
{{ formTitle }}
</el-button>
</h3>
<form-panel
:metadata="{
...formMetadata,
containerUuid: formUuid,
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%; */
} }