提交 6d3ff6d3 编写于 作者: neko's avatar neko

优化表单布局

上级 e149f635
.app-form-group { .app-form-group {
>.ivu-card-head { >.ivu-card-head {
>p { >p {
>i { >i {
...@@ -7,9 +8,12 @@ ...@@ -7,9 +8,12 @@
} }
} }
} }
>.ivu-card-extra { >.ivu-card-extra {
.item-extract-mode { .item-extract-mode {
display: flex; display: flex;
.item { .item {
margin-left: 12px; margin-left: 12px;
} }
...@@ -26,7 +30,8 @@ ...@@ -26,7 +30,8 @@
.app-group-flex { .app-group-flex {
height: 100%; height: 100%;
overflow: auto; overflow: auto;
> .ivu-card-body {
>.ivu-card-body {
height: calc(100% - 51px); height: calc(100% - 51px);
overflow: auto; overflow: auto;
} }
......
<template> <template>
<div class="app-form-group"> <div :class="classes">
<div v-if="uiStyle=='STYLE2'"> <template v-if="uiStyle=='STYLE2'">
<app-form-group2 <app-form-group2
:caption="caption" :caption="caption"
:uiStyle="uiStyle" :uiStyle="uiStyle"
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
:titleBarCloseMode="titleBarCloseMode"> :titleBarCloseMode="titleBarCloseMode">
<slot></slot> <slot></slot>
</app-form-group2> </app-form-group2>
</div> </template>
<div v-else> <template v-else>
<card v-if="isShowCaption === true" :bordered="false" :dis-hover="true" :class="classes"> <card v-if="isShowCaption === true" :bordered="false" :dis-hover="true" :class="classes">
<p class='' slot='title'> <p class='' slot='title'>
<icon v-if="titleBarCloseMode !== 0" :type="collapseContant ? 'ios-arrow-dropright-circle' : 'ios-arrow-dropdown-circle'" <icon v-if="titleBarCloseMode !== 0" :type="collapseContant ? 'ios-arrow-dropright-circle' : 'ios-arrow-dropdown-circle'"
...@@ -87,17 +87,22 @@ ...@@ -87,17 +87,22 @@
</template> </template>
</a > </a >
</template> </template>
<div v-if="Object.is(layoutType, 'FLEX')"> <template v-if="Object.is(layoutType, 'FLEX')">
<slot></slot> <slot></slot>
</div> </template>
<div v-if="!Object.is(layoutType, 'FLEX')"> <template v-if="!Object.is(layoutType, 'FLEX')">
<row :gutter="10"><slot></slot></row> <row :gutter="10"><slot></slot></row>
</div> </template>
</card> </card>
<row v-if="isShowCaption === false" :class="classes"> <template v-if="isShowCaption === false">
<slot></slot> <template v-if="Object.is(layoutType, 'FLEX')">
</row> <slot></slot>
</div> </template>
<template v-if="!Object.is(layoutType, 'FLEX')">
<row :gutter="10"><slot></slot></row>
</template>
</template>
</template>
</div> </div>
</template> </template>
......
.app-form-item { .app-form-item {
// margin-bottom: 16px; height: 100%;
>.ivu-form-item-label {
text-decoration: none; >.ivu-form-item-label {
display: block; text-decoration: none;
overflow: hidden; display: block;
white-space: nowrap; overflow: hidden;
} white-space: nowrap;
>.ivu-form-item-content { }
min-height: 36px;
} >.ivu-form-item-content {
height: 100%;
min-height: 36px;
>.editor {
height: 100%;
}
}
} }
.app-form-item-label-top {
>.ivu-form-item-label { .app-form-item.label-top, .app-form-item.label-bottom {
float: none;
display: inline-block; .app-form-item-label {
padding: 0 0 10px; height: 16px;
} }
.editor {
height: calc(100% - 16px);
}
} }
.app-form-item-label-left{ .app-form-item.label-left, .app-form-item.label-right {
.app-form-item-label{
float: left; .app-form-item-label, .editor {
text-align: right; height: 100%;
padding-right: 12px;
} }
} }
.app-form-item-label-right{
.app-form-item-label{ .app-form-item.label-left {
float: right;
text-align: left; .app-form-item-label {
padding-left: 12px; float: left;
} }
} }
.app-form-item-label-top{
.app-form-item-label{ .app-form-item.label-right {
display: block;
padding-bottom: 10px; .app-form-item-label {
float: right;
} }
} }
.app-form-item-label-bottom{
.app-form-item-label{ .app-form-item.label-none {
display: block;
padding-top: 10px; .app-form-item-label {
display: none !important;
}
.editor {
height: 100%;
} }
} }
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册