提交 53910903 编写于 作者: WodahsOrez's avatar WodahsOrez

lxm--formitem,label位置适配必填样式

上级 03499eca
.app-form-item-wrapper {
height: 100%;
}
.app-form-item {
height: 100%;
>.ivu-form-item-label {
text-decoration: none;
display: block;
overflow: hidden;
white-space: nowrap;
}
>.ivu-form-item-content {
.editor {
height: 100%;
min-height: 36px;
>.editor {
.ivu-form-item-content {
height: 100%;
min-height: 36px;
}
}
.app-form-item-label {
padding: 6px 12px 6px 0px;
}
}
.app-form-item.label-top, .app-form-item.label-bottom {
.app-form-item-label {
height: 16px;
}
.editor {
height: calc(100% - 16px);
display: block;
}
}
.app-form-item.label-left, .app-form-item.label-right {
.app-form-item-label, .editor {
height: 100%;
}
}
.app-form-item.label-left {
.app-form-item-label {
float: left;
text-align: right;
padding-right: 10px;
}
}
.app-form-item.label-right {
.app-form-item-label {
float: right;
text-align: left;
padding-left: 10px;
padding-left: 12px;
}
}
.app-form-item.label-none {
.app-form-item-label {
display: none !important;
}
.editor {
height: 100%;
}
}
\ No newline at end of file
<template>
<div class="app-form-item-wrapper">
<div :class="classes">
<template v-if="this.uiStyle === 'STYLE2'">
<app-form-item2
:caption="caption"
......@@ -16,28 +16,32 @@
</app-form-item2>
</template>
<template v-if="this.uiStyle !== 'STYLE2'">
<form-item :prop="name" :error="error" :required="required" :rules="rules" :class="classes">
<div
v-if="Object.is(this.labelPos,'BOTTOM') || Object.is(this.labelPos,'NONE') || !this.labelPos"
class="editor"
:style="slotstyle"
>
<div
v-if="Object.is(this.labelPos,'BOTTOM') || Object.is(this.labelPos,'NONE') || !this.labelPos"
class="editor"
:style="slotstyle"
>
<form-item :prop="name" :error="error" :required="required" :rules="rules">
<slot></slot>
</div>
<span
v-if="!Object.is(this.labelPos,'NONE') && this.isShowCaption && this.labelWidth > 0"
:style="labelstyle"
:class="labelclasses"
>
{{this.isEmptyCaption ? '' : this.caption}}</span>
<div
v-if="Object.is(this.labelPos,'TOP') || Object.is(this.labelPos,'LEFT') || Object.is(this.labelPos,'RIGHT')"
class="editor"
:style="slotstyle"
>
</form-item>
</div>
<span
v-if="!Object.is(this.labelPos,'NONE') && this.isShowCaption && this.labelWidth > 0"
:style="labelstyle"
:class="labelclasses"
>
<span v-if="required" style="color:red;">* </span>
{{this.isEmptyCaption ? '' : this.caption}}
</span>
<div
v-if="Object.is(this.labelPos,'TOP') || Object.is(this.labelPos,'LEFT') || Object.is(this.labelPos,'RIGHT')"
class="editor"
:style="slotstyle"
>
<form-item :prop="name" :error="error" :required="required" :rules="rules">
<slot></slot>
</div>
</form-item>
</form-item>
</div>
</template>
</div>
</template>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册