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

下拉编辑器样式bug修改

上级 eae32288
<template> <template>
<ion-item :class="[classes,labelPos.toLowerCase()]"> <ion-item :class="[classes,labelPos.toLowerCase()]">
<template v-if="uiStyle == 'STYLE2'"> <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> <slot></slot>
</template> </template>
<template v-else> <template v-else>
<template v-if="labelPos == 'LEFT'"> <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;"> <div :style="contentStyle" style="display: flex;align-items: center;">
<slot></slot> <slot></slot>
</div> </div>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</template> </template>
<template v-if="labelPos == 'TOP'"> <template v-if="labelPos == 'TOP'">
<ion-label <ion-label
:class="required?'app-form-item-label-required':''" :class="required?requiredStyle:notRequiredStyle"
:style="{minWidth:labelWidth+'px'}" :style="{minWidth:labelWidth+'px'}"
position="floating" position="floating"
v-if="isShowCaption && labelWidth > 0" v-if="isShowCaption && labelWidth > 0"
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<template v-if="labelPos == 'RIGHT' "> <template v-if="labelPos == 'RIGHT' ">
<slot></slot> <slot></slot>
<div class="prompt_text_right">{{errorText}}</div> <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>
<template v-if="labelPos == 'NONE'" > <template v-if="labelPos == 'NONE'" >
<slot></slot> <slot></slot>
...@@ -39,7 +39,6 @@ import { Vue, Component, Prop, Watch } from 'vue-property-decorator'; ...@@ -39,7 +39,6 @@ import { Vue, Component, Prop, Watch } from 'vue-property-decorator';
import { Util } from '@/ibiz-core/utils'; import { Util } from '@/ibiz-core/utils';
@Component({}) @Component({})
export default class AppFormItem extends Vue { export default class AppFormItem extends Vue {
/** /**
* 内容样式 * 内容样式
* *
...@@ -175,6 +174,22 @@ export default class AppFormItem extends Vue { ...@@ -175,6 +174,22 @@ export default class AppFormItem extends Vue {
*/ */
public required: boolean = false; 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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册