提交 0f3e2cd5 编写于 作者: Neuromancer255's avatar Neuromancer255

下拉编辑器样式bug修改

上级 eae32288
<template>
<ion-item :class="[classes,labelPos.toLowerCase()]">
<template v-if="uiStyle == 'STYLE2'">
<ion-label :class="required?'app-form-item-label-required':''" :style="{minWidth:labelWidth+'px'}" position="floating" v-if="isShowCaption && labelWidth > 0">{{isEmptyCaption ? '' : caption}}</ion-label>
<ion-label :class="required?requiredStyle:notRequiredStyle" :style="{minWidth:labelWidth+'px'}" position="floating" v-if="isShowCaption && labelWidth > 0">{{isEmptyCaption ? '' : caption}}</ion-label>
<slot></slot>
</template>
<template v-else>
<template v-if="labelPos == 'LEFT'">
<ion-label :class="required?'app-form-item-label-required':''" :style="{minWidth:labelWidth+'px'}" v-if="isShowCaption && labelWidth > 0">{{isEmptyCaption ? '' : caption}}</ion-label>
<ion-label :class="required?requiredStyle:notRequiredStyle" :style="{minWidth:labelWidth+'px'}" v-if="isShowCaption && labelWidth > 0">{{isEmptyCaption ? '' : caption}}</ion-label>
<div :style="contentStyle" style="display: flex;align-items: center;">
<slot></slot>
</div>
......@@ -14,7 +14,7 @@
</template>
<template v-if="labelPos == 'TOP'">
<ion-label
:class="required?'app-form-item-label-required':''"
:class="required?requiredStyle:notRequiredStyle"
:style="{minWidth:labelWidth+'px'}"
position="floating"
v-if="isShowCaption && labelWidth > 0"
......@@ -25,7 +25,7 @@
<template v-if="labelPos == 'RIGHT' ">
<slot></slot>
<div class="prompt_text_right">{{errorText}}</div>
<ion-label :class="required?'app-form-item-label-required':''" :style="{minWidth:labelWidth+'px'}" v-if="isShowCaption && labelWidth > 0">{{isEmptyCaption ? '' : caption}}</ion-label>
<ion-label :class="required?requiredStyle:notRequiredStyle" :style="{minWidth:labelWidth+'px'}" v-if="isShowCaption && labelWidth > 0">{{isEmptyCaption ? '' : caption}}</ion-label>
</template>
<template v-if="labelPos == 'NONE'" >
<slot></slot>
......@@ -39,7 +39,6 @@ import { Vue, Component, Prop, Watch } from 'vue-property-decorator';
import { Util } from '@/ibiz-core/utils';
@Component({})
export default class AppFormItem extends Vue {
/**
* 内容样式
*
......@@ -175,6 +174,22 @@ export default class AppFormItem extends Vue {
*/
public required: boolean = false;
/**
* 必填时label的样式
*
* @type {string}
* @memberof AppFormItem
*/
public requiredStyle:string = 'app-form-item-label-required'
/**
* 非必填时label的样式
*
* @type {string}
* @memberof AppFormItem
*/
public notRequiredStyle:string = 'app-form-item-label-notRequired sc-ion-label-ios-h sc-ion-label-ios-s ios hydrated'
/**
* 表单项值规则监控
*
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册